This gem is a wrapper for DigitalOcean.com's API.
Add this line to your application's Gemfile:
gem 'digitalocean'
And then execute:
$ bundle
Or install it yourself as:
$ gem install digitalocean
Then in your application initialize the gem:
$ Digitalocean.client_id = "your_client_id"
$ Digitalocean.api_key = "your_api_key"
$ Digitalocean::Droplet.all
$ Digitalocean::Droplet.retrieve("id_of_droplet")
$ Digitalocean::Droplet.create({:name => droplet_name, :size_id => size_id, :image_id => image_id, :region_id => region_id)
$ Digitalocean::Droplet.all
$ Digitalocean::Droplet.retrieve(id)
$ Digitalocean::Droplet.create({})
$ Digitalocean::Droplet.reboot(id)
$ Digitalocean::Droplet.power_cycle(id)
$ Digitalocean::Droplet.shut_down(id)
$ Digitalocean::Droplet.power_off(id)
$ Digitalocean::Droplet.power_on(id)
$ Digitalocean::Droplet.snapshot(id)
$ Digitalocean::Droplet.destroy(id)
$ Digitalocean::Image.all
$ Digitalocean::Region.all
$ Digitalocean::Size.all
$ Digitalocean::SshKey.all
$ Digitalocean::SshKey.retrieve(id)
$ Digitalocean::SshKey.create({})
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- cp .env-example .env
- Set your credentials in the .env file
- bundle exec foreman run bundle exec rspec spec/digitalocean/*