A minimal ruby REST client for the zadara storage REST API.
- A Zadara VPSA and an access token
- Ruby >= 2.0
Add this line to your application's Gemfile:
gem 'zadarest'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zadarest
You need to run this within a network that can access your zadara VPSA or set up an SSH tunnel thusly:
ssh -A -L 8080:<your vpsa API url>:80 <your_proxy_host_that_can_access_zadara.com>
And then, in ruby:
config = Zadarest::Config.new(api_endpoint: 'http://localhost:8080', access_key: '<your access key>')
user_client = Zadarest::Users.new(config: config)
puts user_client.all.inspect # a list of users appears!
pool_client = Zadarest::Pools.new(config: config)
puts pool_client.all.inspect # A list of pools appears!
- Support the most useful API endpoints
After checking out the repo, run bin/setup
to install dependencies. Then, run
bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To
release a new version, update the version number in version.rb
, and then run
bundle exec rake release
to create a git tag for the version, push git
commits and tags, and push the .gem
file to
rubygems.org.
- Fork it ( https://github.com/[my-github-username]/zadarest/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Write tests. We use rspec and only documentation fixes will be accepted without tests.
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Dan Collis-Puro - djcp
2015 President and Fellows of Harvard College