Linode
Ruby API¶ ↑
NOTICE¶ ↑
Please welcome Marques Johansson and Robert DeRose, both of Linode
, as new maintainers of the ruby Linode
API library!
INSTALLATION:¶ ↑
The recommended way to use this library is to include linode
in your Gemfile and use Bundler.
gem 'linode', '~> 0.9.0'
By default, this will also install the latest version of the linode library's dependencies:
-
httparty
The latest version of these dependencies requires Ruby >= 1.9.3
If for some reason you need to use an older version of Ruby (1.8.7), you can include the following dependencies in your Gemfile.
gem 'json', '~>1.8' gem 'httparty', '0.11'
Running on versions of Ruby older than 1.9.3 is considered deprecated and support will not actively be maintained for older versions of Ruby. Using this library with EOL versions of Ruby is frowned upon :(
At this point you can use Bundler to install or update your dependencies.
bundle install
CONTRIBUTING¶ ↑
If you would like to submit a bug fix or feature, you can do so with the traditional GitHub workflow.
-
Fork this repo
-
Git clone your repo locally
-
cd
into the repo -
bundle install
to get all runtime and development dependencies -
Make a new branch
-
Submit a PR
Development¶ ↑
Bug fixes and features should include new tests using the RSpec format. Reviewing the current way tests are written is the best way to understand this. All tests live under the spec
folder at the root of the repo.
You can run the tests suite by executing:
rake test
Adding new dependencies is highly discouraged!
Maintaining compatibility with Ruby 1.9.3 is currently required.
Testing your changes against Ruby 1.9.3 and ~> 2.3 should be enough to ensure compatibilty between all version inclusively.
RVM can greatly help with testing different versions of Ruby.
RUNNING:¶ ↑
Consult the Linode
API guide here: {https://www.linode.com/api/}[https://www.linode.com/api/]
You will need to get an API key (check your account profile).
Here is an annoyingly exhaustive IRB session where I play around with the API:
bundle exec irb irb> require 'linode' irb> api_key = 'TOPSECRETAPIKEY' irb> l = Linode.new(:api_key => api_key) =>
CREDITS:¶ ↑
-
Thanks to Kenn Ejima (kenn) for json library improvements, OStruct cleanups, README improvements, etc.
-
Thanks to Arthur D'Antonio III (arthurD) for a patch to fix string decoding via HTTParty.parsed_response.
-
Thanks to Aditya Sanghi (asanghi) for a patch to properly namespace stackscripts functionality.
-
Thanks to Dan Hodos (danhodos) for diagnosing and fixing an issue with sending GET requests instead of POST request.
-
Thanks to Aaron Hamid for updates for RSpec 2 and work on user.getapikey + username/password initialization.
-
Thanks to Musfuut (musfuut) for diagnosing and recommending a fix for OpenStruct and 'type' data members in
Linode
returned results. -
Thanks to mihaibirsan (mihaibirsan) for diagnosing a problem with dependencies on the 'crack' library.
-
Thanks to Adam Durana (durana) for adding support for linode.ip.addprivate.
-
Thanks to Gustavo Beathyate (goddamnhippie) for markdownifying the README.
-
Thanks to Robbert Klarenbeek (rubencaro) for API updates.
-
Thanks to rubencaro for adding logger functionality.
-
Thanks to Marques Johansson displague for API updates