digitalocean 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/digitalocean/droplet.rb +5 -0
- data/lib/digitalocean/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -46,6 +46,7 @@ Then in your application initialize the gem:
|
|
46
46
|
$ Digitalocean::Droplet.power_off(id)
|
47
47
|
$ Digitalocean::Droplet.power_on(id)
|
48
48
|
$ Digitalocean::Droplet.snapshot(id)
|
49
|
+
$ Digitalocean::Droplet.destroy(id)
|
49
50
|
$ Digitalocean::Image.all
|
50
51
|
$ Digitalocean::Region.all
|
51
52
|
$ Digitalocean::Size.all
|
data/lib/digitalocean/droplet.rb
CHANGED
@@ -53,5 +53,10 @@ module Digitalocean
|
|
53
53
|
response = Digitalocean.request.get "droplets/new", attrs
|
54
54
|
RecursiveOpenStruct.new(response.body, :recurse_over_arrays => true)
|
55
55
|
end
|
56
|
+
|
57
|
+
def self.destroy(droplet_id=nil)
|
58
|
+
response = Digitalocean.request.get "droplets/#{droplet_id}/destroy"
|
59
|
+
RecursiveOpenStruct.new(response.body, :recurse_over_arrays => true)
|
60
|
+
end
|
56
61
|
end
|
57
62
|
end
|
data/lib/digitalocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digitalocean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
segments:
|
168
168
|
- 0
|
169
|
-
hash: -
|
169
|
+
hash: -3599500042094180118
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
segments:
|
177
177
|
- 0
|
178
|
-
hash: -
|
178
|
+
hash: -3599500042094180118
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
181
|
rubygems_version: 1.8.23
|