digital_ocean 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTU2MzAwZjNmY2I0YzBhZDRiMzRlYTI4N2Y2MmIzOTNmNDFhNTVjNw==
5
+ data.tar.gz: !binary |-
6
+ NWMzMWNkZTQyYWExYTRlOTFiZmZlMjNkNWYxZDI0YzRkM2E1MTEzNw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NDViYzhjMGQ0Yjg4ODk0ODdmMWUyMDM2YjYyMjQ3ZDRhNjQ4MjY4ODE2ODU0
10
+ ODUwMzVlY2I3OWE5MTRlODJiZjhhMDdiY2YxZDcwYzg2ZjkzY2E5ZTJjYjVh
11
+ NDYwNjY0MzVlMGNhNzA1OGVmMDc3M2I3ZmVkM2M1MzhiZTQ2OTM=
12
+ data.tar.gz: !binary |-
13
+ NDVkYjI1ZTRjZjYxYzE3MDlkMzNiZWE5MjYwZDgxY2QwZjE3YjJmNmQxMDYx
14
+ NGIyNDE0ZTg2MDE0NzFiMjdiYjFiYmU2OTg5MTVhNjBkYmE0MDI4YjhiODA3
15
+ MTM2NDVkOTc2ZTRkM2MzNDljMzE1MDY0MjE2NzQ4MGZlM2I0MWM=
data/.travis.yml CHANGED
@@ -3,6 +3,7 @@ rvm:
3
3
  - 1.8.7
4
4
  - 1.9.2
5
5
  - 1.9.3
6
+ - 2.0.0
6
7
  - jruby-19mode
7
8
  - ruby-head
8
9
  - jruby-head
data/CHANGELOG.md CHANGED
@@ -1,21 +1,23 @@
1
- ## Unreleased Changes
1
+ ## 0.2.1 / unreleased
2
2
 
3
- [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/v0.1.0...master)
3
+ * [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/v0.1.0...master)
4
4
 
5
- **Enhancements:**
6
5
 
6
+ ## 0.2.0 / 2013-02-27
7
7
 
8
- **Bug Fixes:**
8
+ * [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/v0.1.0...v0.2.0)
9
9
 
10
+ * Added add/edit/delete of ssh keys
10
11
 
11
- ## 0.1.0 (February 20, 2013)
12
+ * reformatted Changelog, should be compliant with
13
+ https://github.com/tech-angels/vandamme/
12
14
 
13
- [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/v0.0.1...v0.1.0)
14
15
 
16
+ ## 0.1.0 / 2013-02-20
15
17
 
16
- **Enhancements:**
18
+ * [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/v0.0.1...v0.1.0)
17
19
 
18
- * support password reset (thanks )
20
+ * support password reset (contributed by github user joshfng)
19
21
 
20
22
  * documentation
21
23
 
@@ -24,17 +26,8 @@
24
26
  * add changelog :)
25
27
 
26
28
 
27
- ## 0.0.1 (January 24, 2013)
29
+ ## 0.0.1 / 2013-01-24
28
30
 
29
- [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/3afd6a3c00cf447bc890703d9221fbed9662856e...v0.0.1)
30
-
31
-
32
- **Enhancements:**
31
+ * [Full Changelog](https://github.com/rmoriz/digital_ocean/compare/3afd6a3c00cf447bc890703d9221fbed9662856e...v0.0.1)
33
32
 
34
33
  * First release
35
-
36
-
37
- **Bug Fixes:**
38
-
39
- * n/a
40
-
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # DigitalOcean
2
2
  [![Build Status](https://travis-ci.org/rmoriz/digital_ocean.png)](https://travis-ci.org/rmoriz/digital_ocean)
3
- <a href="https://gemnasium.com/rmoriz/digital_ocean"><img src="https://gemnasium.com/rmoriz/digital_ocean.png" height="13" /></a>
4
- <a href="https://codeclimate.com/github/rmoriz/digital_ocean"><img src="https://codeclimate.com/github/rmoriz/digital_ocean.png" height="13" /></a>
3
+ <a href="https://gemnasium.com/rmoriz/digital_ocean"><img src="https://gemnasium.com/rmoriz/digital_ocean.png"/></a>
4
+ <a href="https://codeclimate.com/github/rmoriz/digital_ocean"><img src="https://codeclimate.com/github/rmoriz/digital_ocean.png"/></a>
5
5
 
6
6
  DigitalOcean provides simple cloud hosting. Create and delete
7
7
  SSD-based virtual machines within seconds for a very affordable price.
@@ -136,7 +136,6 @@ resources.
136
136
  - \#disable\_backups
137
137
  - should be successful
138
138
  - \#delete
139
- #<Hashie::Rash event_id=594739 status="OK">
140
139
  - should be successful
141
140
  - \#sizes
142
141
  - \#list
@@ -158,10 +157,9 @@ resources.
158
157
  - invalid
159
158
  - should not be successful
160
159
  - \#add
161
- - does not work, ask digitalocean to fix (PENDING: No reason given)
162
- - should be successful (PENDING: Temporarily disabled with xit)
160
+ - should be successful
163
161
  - \#edit
164
- - does not work, ask digitalocean to fix (PENDING: No reason given)
162
+ - should be successful
165
163
  - \#delete
166
164
  - should be successful
167
165
  - \#images
@@ -10,18 +10,20 @@ module DigitalOcean
10
10
  end
11
11
 
12
12
  def delete(id)
13
- @connection.delete("/ssh_keys/#{id}").body
13
+ @connection.get("/ssh_keys/#{id}/destroy").body
14
14
  end
15
15
 
16
- #def add(args)
17
- # @connection.get('/ssh_keys.json') do |query|
18
- # apply_params(query, args)
19
- # end.body
20
- #end
21
- #
22
- #def edit
23
- #end
24
- #
16
+ def add(args)
17
+ @connection.get('/ssh_keys/new') do |query|
18
+ apply_params(query, args)
19
+ end.body
20
+ end
21
+
22
+ def edit(id, args)
23
+ @connection.get("/ssh_keys/#{id}/edit") do |query|
24
+ apply_params(query, args)
25
+ end.body
26
+ end
25
27
  end
26
28
  end
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module DigitalOcean
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
data/spec/api_spec.rb CHANGED
@@ -59,7 +59,7 @@ describe DigitalOcean::API, :vcr do
59
59
  # #<Hashie::Rash droplet=#<Hashie::Rash event_id=123456 id=87071 image_id=25306 name="t1" size_id=66> status="OK">
60
60
  response.status.should eql('OK')
61
61
  end
62
-
62
+
63
63
  it 'should return droplet.id' do
64
64
  response.droplet.id.should_not be_nil
65
65
  end
@@ -255,6 +255,8 @@ describe DigitalOcean::API, :vcr do
255
255
  end
256
256
 
257
257
  describe '#ssh_keys' do
258
+ let(:test_ssh_key_id) { 6757 }
259
+
258
260
  describe '#list' do
259
261
  let(:response) {
260
262
  subject.ssh_keys.list
@@ -296,29 +298,39 @@ describe DigitalOcean::API, :vcr do
296
298
  end
297
299
 
298
300
  describe '#add' do
299
- pending "does not work, ask digitalocean to fix"
300
-
301
301
  let(:response) {
302
- subject.ssh_keys.add :name => name, :ssh_key_pub => ssh_key_pub
302
+ subject.ssh_keys.add :name => name, :ssh_pub_key => ssh_key_pub
303
303
  }
304
304
  let(:name) { 'mobile computer' }
305
- let(:ssh_key_pub) {'xxx' }
305
+ let(:ssh_key_pub) { 'ssh-dss AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8= test@example.com' }
306
306
 
307
- xit 'should be successful' do
308
- puts response.status
307
+ it 'should be successful' do
309
308
  response.status.should eql('OK')
310
309
  end
311
310
  end
312
311
 
313
312
  describe '#edit' do
314
- pending "does not work, ask digitalocean to fix"
313
+ let(:response) {
314
+ subject.ssh_keys.edit test_ssh_key_id, :name => name, :ssh_pub_key => ssh_key_pub
315
+ }
316
+ let(:name) { 'mobile computer new' }
317
+ let(:ssh_key_pub) { 'ssh-rsa AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8= test@example.com' }
318
+
319
+ it 'should be successful' do
320
+ response.status.should eql('OK')
321
+ end
315
322
  end
316
323
 
317
324
  describe '#delete' do
318
- let(:id) { 3928 }
325
+ let(:name) { 'test_for_deletion' }
326
+ let(:ssh_key_pub) { 'ssh-dss AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8= test@example.com' }
327
+
328
+ let!(:create_response) {
329
+ subject.dup.ssh_keys.add :name => name, :ssh_pub_key => ssh_key_pub
330
+ }
319
331
 
320
332
  let(:response) {
321
- subject.ssh_keys.delete id
333
+ subject.ssh_keys.delete create_response.ssh_key.id
322
334
  }
323
335
 
324
336
  it 'should be successful' do
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.digitalocean.com/ssh_keys.json?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
5
+ uri: https://api.digitalocean.com/ssh_keys/new?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&name=mobile+computer&ssh_pub_key=ssh-dss+AAAAB3NzaC1kc3MAAACBAPUify%2F0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8%2BE%2Bs5hmbP6QvkWVyc1qpXuH7zyFj%2FFY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx%2B%2FxokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1%2BAQNNeUoXbDF%2Fu0B5qVgmr8rGxJ%2FC24M%2FLaLqpWB0fNb1xSF1luT33BN%2FNEFJ%2FMiUA53yffXkjFMcBbJPVDuxHh7%2FqLOWX0SlrH6IhKvTU6iowPb%2Bm0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i%2BwDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v%2FSBZPrfyir52ie1%2F%2BrH0WVnnAbc7yJRMOuRHZCZo4MXoQ%2B9%2FQoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG%2FQNKFyR25XI86ntx3dg%2Bn89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8%3D+test%40example.com
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -15,7 +15,7 @@ http_interactions:
15
15
  server:
16
16
  - nginx
17
17
  date:
18
- - Wed, 23 Jan 2013 20:20:06 GMT
18
+ - Wed, 27 Feb 2013 18:51:58 GMT
19
19
  content-type:
20
20
  - application/json; charset=utf-8
21
21
  transfer-encoding:
@@ -26,6 +26,8 @@ http_interactions:
26
26
  - '200'
27
27
  x-powered-by:
28
28
  - Phusion Passenger (mod_rails/mod_rack) 3.0.11
29
+ strict-transport-security:
30
+ - max-age=31536000
29
31
  x-ua-compatible:
30
32
  - IE=Edge,chrome=1
31
33
  etag:
@@ -35,14 +37,16 @@ http_interactions:
35
37
  set-cookie:
36
38
  - _digitalocean2_session=wtf
37
39
  x-request-id:
38
- - 4c6c620cf4b58304db623f7c0b13fc44
40
+ - 09bc85776139396e36b814334d143beb
39
41
  x-runtime:
40
- - '0.664323'
42
+ - '0.812746'
41
43
  x-rack-cache:
42
44
  - miss
43
45
  body:
44
46
  encoding: US-ASCII
45
- string: ! '{"status":"OK","ssh_keys":[{"id":3738,"name":"default"},{"id":3928,"name":"xxx"}]}'
47
+ string: ! '{"status":"OK","ssh_key":{"id":6760,"name":"mobile computer","ssh_pub_key":"ssh-dss
48
+ AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8=
49
+ test@example.com"}}'
46
50
  http_version:
47
- recorded_at: Wed, 23 Jan 2013 20:20:06 GMT
51
+ recorded_at: Wed, 27 Feb 2013 18:51:58 GMT
48
52
  recorded_with: VCR 2.4.0
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: delete
5
- uri: https://api.digitalocean.com/ssh_keys/3928?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
4
+ method: get
5
+ uri: https://api.digitalocean.com/ssh_keys/new?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&name=test_for_deletion&ssh_pub_key=ssh-dss+AAAAB3NzaC1kc3MAAACBAPUify%2F0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8%2BE%2Bs5hmbP6QvkWVyc1qpXuH7zyFj%2FFY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx%2B%2FxokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1%2BAQNNeUoXbDF%2Fu0B5qVgmr8rGxJ%2FC24M%2FLaLqpWB0fNb1xSF1luT33BN%2FNEFJ%2FMiUA53yffXkjFMcBbJPVDuxHh7%2FqLOWX0SlrH6IhKvTU6iowPb%2Bm0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i%2BwDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v%2FSBZPrfyir52ie1%2F%2BrH0WVnnAbc7yJRMOuRHZCZo4MXoQ%2B9%2FQoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG%2FQNKFyR25XI86ntx3dg%2Bn89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8%3D+test%40example.com
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -15,7 +15,7 @@ http_interactions:
15
15
  server:
16
16
  - nginx
17
17
  date:
18
- - Wed, 23 Jan 2013 20:34:51 GMT
18
+ - Wed, 27 Feb 2013 19:05:54 GMT
19
19
  content-type:
20
20
  - application/json; charset=utf-8
21
21
  transfer-encoding:
@@ -26,6 +26,8 @@ http_interactions:
26
26
  - '200'
27
27
  x-powered-by:
28
28
  - Phusion Passenger (mod_rails/mod_rack) 3.0.11
29
+ strict-transport-security:
30
+ - max-age=31536000
29
31
  x-ua-compatible:
30
32
  - IE=Edge,chrome=1
31
33
  etag:
@@ -35,14 +37,63 @@ http_interactions:
35
37
  set-cookie:
36
38
  - _digitalocean2_session=wtf
37
39
  x-request-id:
38
- - d441c933a38a556636d6c2234220f2dd
40
+ - dfccbeb8811349fdc5a1f48c28167f27
39
41
  x-runtime:
40
- - '0.540159'
42
+ - '0.502408'
41
43
  x-rack-cache:
42
- - invalidate, pass
44
+ - miss
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ! '{"status":"OK","ssh_key":{"id":6769,"name":"test_for_deletion","ssh_pub_key":"ssh-dss
48
+ AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8=
49
+ test@example.com"}}'
50
+ http_version:
51
+ recorded_at: Wed, 27 Feb 2013 19:05:54 GMT
52
+ - request:
53
+ method: get
54
+ uri: https://api.digitalocean.com/ssh_keys/6769/destroy?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
55
+ body:
56
+ encoding: US-ASCII
57
+ string: ''
58
+ headers: {}
59
+ response:
60
+ status:
61
+ code: 200
62
+ message:
63
+ headers:
64
+ server:
65
+ - nginx
66
+ date:
67
+ - Wed, 27 Feb 2013 19:05:55 GMT
68
+ content-type:
69
+ - application/json; charset=utf-8
70
+ transfer-encoding:
71
+ - chunked
72
+ connection:
73
+ - close
74
+ status:
75
+ - '200'
76
+ x-powered-by:
77
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
78
+ strict-transport-security:
79
+ - max-age=31536000
80
+ x-ua-compatible:
81
+ - IE=Edge,chrome=1
82
+ etag:
83
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
84
+ cache-control:
85
+ - max-age=0, private, must-revalidate
86
+ set-cookie:
87
+ - _digitalocean2_session=wtf
88
+ x-request-id:
89
+ - 16a421f306092b18433f952b2b708f24
90
+ x-runtime:
91
+ - '0.268753'
92
+ x-rack-cache:
93
+ - miss
43
94
  body:
44
95
  encoding: US-ASCII
45
96
  string: ! '{"status":"OK"}'
46
97
  http_version:
47
- recorded_at: Wed, 23 Jan 2013 20:34:51 GMT
98
+ recorded_at: Wed, 27 Feb 2013 19:05:55 GMT
48
99
  recorded_with: VCR 2.4.0
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/ssh_keys/6757/edit?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&name=mobile+computer+new&ssh_pub_key=ssh-rsa+AAAAB3NzaC1kc3MAAACBAPUify%2F0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8%2BE%2Bs5hmbP6QvkWVyc1qpXuH7zyFj%2FFY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx%2B%2FxokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1%2BAQNNeUoXbDF%2Fu0B5qVgmr8rGxJ%2FC24M%2FLaLqpWB0fNb1xSF1luT33BN%2FNEFJ%2FMiUA53yffXkjFMcBbJPVDuxHh7%2FqLOWX0SlrH6IhKvTU6iowPb%2Bm0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i%2BwDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v%2FSBZPrfyir52ie1%2F%2BrH0WVnnAbc7yJRMOuRHZCZo4MXoQ%2B9%2FQoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG%2FQNKFyR25XI86ntx3dg%2Bn89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8%3D+test%40example.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message:
14
+ headers:
15
+ server:
16
+ - nginx
17
+ date:
18
+ - Wed, 27 Feb 2013 18:57:21 GMT
19
+ content-type:
20
+ - application/json; charset=utf-8
21
+ transfer-encoding:
22
+ - chunked
23
+ connection:
24
+ - close
25
+ status:
26
+ - '200'
27
+ x-powered-by:
28
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
29
+ strict-transport-security:
30
+ - max-age=31536000
31
+ x-ua-compatible:
32
+ - IE=Edge,chrome=1
33
+ etag:
34
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
35
+ cache-control:
36
+ - max-age=0, private, must-revalidate
37
+ set-cookie:
38
+ - _digitalocean2_session=wtf
39
+ x-request-id:
40
+ - 7c01d3b73d60e7b8bcf32e77333bb73b
41
+ x-runtime:
42
+ - '0.551137'
43
+ x-rack-cache:
44
+ - miss
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ! '{"status":"OK","ssh_key":{"id":6757,"name":"mobile computer","ssh_pub_key":"ssh-rsa
48
+ AAAAB3NzaC1kc3MAAACBAPUify/0h4QLkkhfMiOr8o5R6LEzV1ETC4cd7UgKUiLsX8+E+s5hmbP6QvkWVyc1qpXuH7zyFj/FY5XSBdNyVVUblOxrOJVo9wPdl5ZaXxMkx+/xokVqfDvoeQa5adaBbk11xjt7F72KBeWb5WwZScblK4kOIrVT5HzNxl58xE2XAAAAFQDyqQMKaDAoUcUlEeoFC962WZE6kQAAAIAv83TOiGZ81zIqJ1+AQNNeUoXbDF/u0B5qVgmr8rGxJ/C24M/LaLqpWB0fNb1xSF1luT33BN/NEFJ/MiUA53yffXkjFMcBbJPVDuxHh7/qLOWX0SlrH6IhKvTU6iowPb+m0bBXQM8z6jR1Xyl6F2eb3HZfW0O15i+wDCjPeplfpwAAAIEA1zxtI3CackcnOAH2su9v/SBZPrfyir52ie1/+rH0WVnnAbc7yJRMOuRHZCZo4MXoQ+9/QoxBBxvBinabrlVPvwnRgGIOTcHOlo8Hs07THA6mlnLUcG/QNKFyR25XI86ntx3dg+n89fUo302dWZAQ5vSl5nbqvsBs56wfWFvOYS8=
49
+ test@example.com"}}'
50
+ http_version:
51
+ recorded_at: Wed, 27 Feb 2013 18:57:21 GMT
52
+ recorded_with: VCR 2.4.0
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digital_ocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Roland Moriz
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-20 00:00:00.000000000 Z
11
+ date: 2013-02-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: faraday_middleware
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: json
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rash
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: guard
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ! '>='
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ! '>='
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: guard-rspec
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ! '>='
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ! '>='
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: rb-fsevent
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ! '>='
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ! '>='
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: vcr
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - ~>
148
130
  - !ruby/object:Gem::Version
@@ -150,7 +132,6 @@ dependencies:
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - ~>
156
137
  - !ruby/object:Gem::Version
@@ -158,7 +139,6 @@ dependencies:
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: fakeweb
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
143
  - - ~>
164
144
  - !ruby/object:Gem::Version
@@ -166,7 +146,6 @@ dependencies:
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
150
  - - ~>
172
151
  - !ruby/object:Gem::Version
@@ -174,7 +153,6 @@ dependencies:
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: rake
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
157
  - - ! '>='
180
158
  - !ruby/object:Gem::Version
@@ -182,7 +160,6 @@ dependencies:
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
164
  - - ! '>='
188
165
  - !ruby/object:Gem::Version
@@ -190,7 +167,6 @@ dependencies:
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: yard
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
171
  - - ! '>='
196
172
  - !ruby/object:Gem::Version
@@ -198,7 +174,6 @@ dependencies:
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
178
  - - ! '>='
204
179
  - !ruby/object:Gem::Version
@@ -296,6 +271,7 @@ files:
296
271
  - spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_the_correct_ID_for_the_96GB_size.yml
297
272
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_add/should_be_successful.yml
298
273
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_delete/should_be_successful.yml
274
+ - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_edit/should_be_successful.yml
299
275
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_be_successful.yml
300
276
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_return_a_list_of_all_SSH_keys.yml
301
277
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/invalid/should_not_be_successful.yml
@@ -305,33 +281,26 @@ files:
305
281
  homepage: https://github.com/rmoriz/digital_ocean
306
282
  licenses:
307
283
  - MIT
284
+ metadata: {}
308
285
  post_install_message:
309
286
  rdoc_options: []
310
287
  require_paths:
311
288
  - lib
312
289
  required_ruby_version: !ruby/object:Gem::Requirement
313
- none: false
314
290
  requirements:
315
291
  - - ! '>='
316
292
  - !ruby/object:Gem::Version
317
293
  version: '0'
318
- segments:
319
- - 0
320
- hash: 3303230172234481898
321
294
  required_rubygems_version: !ruby/object:Gem::Requirement
322
- none: false
323
295
  requirements:
324
296
  - - ! '>='
325
297
  - !ruby/object:Gem::Version
326
298
  version: '0'
327
- segments:
328
- - 0
329
- hash: 3303230172234481898
330
299
  requirements: []
331
300
  rubyforge_project:
332
- rubygems_version: 1.8.23
301
+ rubygems_version: 2.0.0
333
302
  signing_key:
334
- specification_version: 3
303
+ specification_version: 4
335
304
  summary: This gem wraps the DigitalOcean API documented at https://api.digitalocean.com/
336
305
  test_files:
337
306
  - spec/api_spec.rb
@@ -375,6 +344,7 @@ test_files:
375
344
  - spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_the_correct_ID_for_the_96GB_size.yml
376
345
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_add/should_be_successful.yml
377
346
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_delete/should_be_successful.yml
347
+ - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_edit/should_be_successful.yml
378
348
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_be_successful.yml
379
349
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_return_a_list_of_all_SSH_keys.yml
380
350
  - spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/invalid/should_not_be_successful.yml