dorb 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +16 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +198 -0
  8. data/Rakefile +4 -0
  9. data/dorb.gemspec +30 -0
  10. data/lib/dorb.rb +18 -0
  11. data/lib/dorb/config.rb +36 -0
  12. data/lib/dorb/core_ext/hash.rb +24 -0
  13. data/lib/dorb/droplet.rb +10 -0
  14. data/lib/dorb/image.rb +10 -0
  15. data/lib/dorb/region.rb +10 -0
  16. data/lib/dorb/resource.rb +126 -0
  17. data/lib/dorb/size.rb +16 -0
  18. data/lib/dorb/ssh_key.rb +10 -0
  19. data/lib/dorb/version.rb +3 -0
  20. data/spec/config_spec.rb +34 -0
  21. data/spec/droplet_spec.rb +7 -0
  22. data/spec/fixtures/cassettes/DORB_Droplet/all.yml +57 -0
  23. data/spec/fixtures/cassettes/DORB_Droplet/find.yml +111 -0
  24. data/spec/fixtures/cassettes/DORB_Droplet/find_missing.yml +57 -0
  25. data/spec/fixtures/cassettes/DORB_Image/all.yml +75 -0
  26. data/spec/fixtures/cassettes/DORB_Image/find.yml +129 -0
  27. data/spec/fixtures/cassettes/DORB_Image/find_missing.yml +57 -0
  28. data/spec/fixtures/cassettes/DORB_Region/all.yml +58 -0
  29. data/spec/fixtures/cassettes/DORB_Region/find.yml +112 -0
  30. data/spec/fixtures/cassettes/DORB_Region/find_missing.yml +57 -0
  31. data/spec/fixtures/cassettes/DORB_SSHKey/all.yml +57 -0
  32. data/spec/fixtures/cassettes/DORB_SSHKey/find.yml +113 -0
  33. data/spec/fixtures/cassettes/DORB_SSHKey/find_missing.yml +57 -0
  34. data/spec/fixtures/cassettes/DORB_Size/all.yml +597 -0
  35. data/spec/fixtures/cassettes/DORB_Size/find.yml +651 -0
  36. data/spec/fixtures/cassettes/DORB_Size/find_missing.yml +57 -0
  37. data/spec/image_spec.rb +7 -0
  38. data/spec/region_spec.rb +7 -0
  39. data/spec/size_spec.rb +19 -0
  40. data/spec/spec_helper.rb +17 -0
  41. data/spec/ssh_key_spec.rb +7 -0
  42. data/spec/support/shared_examples_for_resource.rb +40 -0
  43. data/spec/support/vcr.rb +8 -0
  44. metadata +209 -0
@@ -0,0 +1,16 @@
1
+ module DORB
2
+ class Size
3
+
4
+ include Resource
5
+
6
+ self.singular_resource_name = 'size'
7
+ self.collection_resource_name = 'sizes'
8
+ self.extended_attributes = 'true'
9
+
10
+ define_attribute :memory
11
+ define_attribute :disk
12
+ define_attribute :cpu
13
+ define_attribute :cost_per_hour
14
+
15
+ end
16
+ end
@@ -0,0 +1,10 @@
1
+ module DORB
2
+ class SSHKey
3
+
4
+ include Resource
5
+
6
+ self.collection_resource_name = 'ssh_keys'
7
+ self.singular_resource_name = 'ssh_key'
8
+
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ module DORB
2
+ VERSION = "0.0.1.pre"
3
+ end
@@ -0,0 +1,34 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe DORB::Config do
4
+ describe '.setup' do
5
+ it 'should assign the options hash values to constants in the DORB namespace that correspond to the key values' do
6
+ DORB::Config.setup :client_id => 'YOUR_CLIENT_ID', :api_key => 'YOUR_API_KEY'
7
+ DORB::Config.client_id.should == 'YOUR_CLIENT_ID'
8
+ DORB::Config.api_key.should == 'YOUR_API_KEY'
9
+ end
10
+
11
+ it 'should allow changes to config after initial setup' do
12
+ DORB::Config.setup :client_id => 'ORIGINAL_CLIENT_ID', :api_key => 'ORIGINAL_API_KEY'
13
+ DORB::Config.setup :client_id => 'UPDATED_CLIENT_ID', :api_key => 'UPDATED_API_KEY'
14
+ DORB::Config.client_id.should == 'UPDATED_CLIENT_ID'
15
+ DORB::Config.api_key.should == 'UPDATED_API_KEY'
16
+ end
17
+ end
18
+ describe '.client_id' do
19
+ it 'should raise an exception when invoked before set' do
20
+ expect {
21
+ DORB::Config.client_id
22
+ }.to raise_error(DORB::ConfigurationError, \
23
+ "Cannot complete request. Please set client_id with DORB::Config.setup first!")
24
+ end
25
+ end
26
+ describe '.api_key' do
27
+ it 'should raise an exception when invoked before set' do
28
+ expect {
29
+ DORB::Config.api_key
30
+ }.to raise_error(DORB::ConfigurationError, \
31
+ "Cannot complete request. Please set api_key with DORB::Config.setup first!")
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe DORB::Droplet do
4
+
5
+ it_should_behave_like 'a resource'
6
+
7
+ end
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets?api_key=<API_KEY>&client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 13 Mar 2013 12:15:51 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - '200'
33
+ X-Powered-By:
34
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"42607d580051ac13fc81210345429e43"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTZmMTQxYTMwMWVjM2Q1MGQyZThjZGRjYjA4MDZjZTFlBjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIgF7aHR0cHM6Ly93d3cuZGlnaXRhbG9jZWFuLmNvbS9hcGkvZHJvcGxldHM%2FY2xpZW50X2lkPTg0VTlxSHdlMk43M2RFb1BGVnFLeiZhcGlfa2V5PXFROG1wUmlFWWczdU82T3JMVFRlSkQxRHZQR0VRaFZtTWVIdkRyM2RtBjsARg%3D%3D--2c4577b602e2add69d3c5c6cdad723950ecf0959;
45
+ path=/; secure; HttpOnly
46
+ X-Request-Id:
47
+ - 2718b8a697279adca0261a5e7760bf5e
48
+ X-Runtime:
49
+ - '0.151730'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '{"status":"OK","droplets":[{"id":109910,"name":"parentplace.co.uk","image_id":25489,"size_id":66,"region_id":2,"backups_active":null,"ip_address":"198.211.124.212","status":"active"}]}'
55
+ http_version:
56
+ recorded_at: Wed, 13 Mar 2013 12:15:49 GMT
57
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,111 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets?api_key=<API_KEY>&client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 13 Mar 2013 12:15:52 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - '200'
33
+ X-Powered-By:
34
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"42607d580051ac13fc81210345429e43"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTYyYjdkNTkxYjBmM2FjNjcwZDhiMmI4YTkyMGI4ZGYzBjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIgF7aHR0cHM6Ly93d3cuZGlnaXRhbG9jZWFuLmNvbS9hcGkvZHJvcGxldHM%2FY2xpZW50X2lkPTg0VTlxSHdlMk43M2RFb1BGVnFLeiZhcGlfa2V5PXFROG1wUmlFWWczdU82T3JMVFRlSkQxRHZQR0VRaFZtTWVIdkRyM2RtBjsARg%3D%3D--ba67eecd2aa5c5440e74c0cd3845740a058de10d;
45
+ path=/; secure; HttpOnly
46
+ X-Request-Id:
47
+ - a5296c1b4f34fdf6dd129d345a58216a
48
+ X-Runtime:
49
+ - '0.157784'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '{"status":"OK","droplets":[{"id":109910,"name":"parentplace.co.uk","image_id":25489,"size_id":66,"region_id":2,"backups_active":null,"ip_address":"198.211.124.212","status":"active"}]}'
55
+ http_version:
56
+ recorded_at: Wed, 13 Mar 2013 12:15:50 GMT
57
+ - request:
58
+ method: get
59
+ uri: https://api.digitalocean.com/droplets/109910?api_key=<API_KEY>&client_id=<CLIENT_ID>
60
+ body:
61
+ encoding: US-ASCII
62
+ string: ''
63
+ headers:
64
+ Accept:
65
+ - ! '*/*; q=0.5, application/xml'
66
+ Accept-Encoding:
67
+ - gzip, deflate
68
+ User-Agent:
69
+ - Ruby
70
+ response:
71
+ status:
72
+ code: 200
73
+ message: OK
74
+ headers:
75
+ Server:
76
+ - nginx
77
+ Date:
78
+ - Wed, 13 Mar 2013 12:15:52 GMT
79
+ Content-Type:
80
+ - application/json; charset=utf-8
81
+ Transfer-Encoding:
82
+ - chunked
83
+ Connection:
84
+ - keep-alive
85
+ Status:
86
+ - '200'
87
+ X-Powered-By:
88
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
89
+ Strict-Transport-Security:
90
+ - max-age=31536000
91
+ X-Ua-Compatible:
92
+ - IE=Edge,chrome=1
93
+ Etag:
94
+ - ! '"156a047867d690952d3698c1101b742b"'
95
+ Cache-Control:
96
+ - max-age=0, private, must-revalidate
97
+ Set-Cookie:
98
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTVjYTZhMjM3Nzg2OTBiZmY3NDFlY2I1YTA4ODhmOWYyBjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIgGCaHR0cHM6Ly93d3cuZGlnaXRhbG9jZWFuLmNvbS9hcGkvZHJvcGxldHMvMTA5OTEwP2NsaWVudF9pZD04NFU5cUh3ZTJONzNkRW9QRlZxS3omYXBpX2tleT1xUThtcFJpRVlnM3VPNk9yTFRUZUpEMUR2UEdFUWhWbU1lSHZEcjNkbQY7AEY%3D--e59fc857b8108b5618858bf62aaec8c24f32b437;
99
+ path=/; secure; HttpOnly
100
+ X-Request-Id:
101
+ - 0013e5ee8d75d287e0d9a1319f67954d
102
+ X-Runtime:
103
+ - '0.164101'
104
+ X-Rack-Cache:
105
+ - miss
106
+ body:
107
+ encoding: US-ASCII
108
+ string: ! '{"status":"OK","droplet":{"id":109910,"name":"parentplace.co.uk","image_id":25489,"size_id":66,"region_id":2,"backups_active":null,"ip_address":"198.211.124.212","status":"active"}}'
109
+ http_version:
110
+ recorded_at: Wed, 13 Mar 2013 12:15:51 GMT
111
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,57 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets/0?api_key=<API_KEY>&client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 13 Mar 2013 12:15:53 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - '200'
33
+ X-Powered-By:
34
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"966766364c5bfaed449523bcb537629a"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTA1Yjg1MGZhMzBiMGYwMGM1MGEyY2Q3NjU4NDk2N2Q2BjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIgF9aHR0cHM6Ly93d3cuZGlnaXRhbG9jZWFuLmNvbS9hcGkvZHJvcGxldHMvMD9jbGllbnRfaWQ9ODRVOXFId2UyTjczZEVvUEZWcUt6JmFwaV9rZXk9cVE4bXBSaUVZZzN1TzZPckxUVGVKRDFEdlBHRVFoVm1NZUh2RHIzZG0GOwBG--5f3630933867b4844657f2356e4cf50de2772baf;
45
+ path=/; secure; HttpOnly
46
+ X-Request-Id:
47
+ - 83ffc6e92a2622e47c38b830255f79f0
48
+ X-Runtime:
49
+ - '0.268753'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '{"status":"ERROR","error_message":"No Droplets Found"}'
55
+ http_version:
56
+ recorded_at: Wed, 13 Mar 2013 12:15:51 GMT
57
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/images?api_key=<API_KEY>&client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 13 Mar 2013 12:15:57 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - '200'
33
+ X-Powered-By:
34
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"7589fcbe5a1fcb30d879fc6706a468d6"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk2MWNjMTA0MDUyYzA3MmRhNWY0NjgyMjY3NmY5NmE2BjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIn5odHRwczovL3d3dy5kaWdpdGFsb2NlYW4uY29tL2FwaS9pbWFnZXM%2FY2xpZW50X2lkPTg0VTlxSHdlMk43M2RFb1BGVnFLeiZhcGlfa2V5PXFROG1wUmlFWWczdU82T3JMVFRlSkQxRHZQR0VRaFZtTWVIdkRyM2RtBjsARg%3D%3D--0224f5b4e992394482c2fb2f0bde9d43fd2c53a7;
45
+ path=/; secure; HttpOnly
46
+ X-Request-Id:
47
+ - 98d4f9a2be31190ec0ef9f1c9819325f
48
+ X-Runtime:
49
+ - '0.457259'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '{"status":"OK","images":[{"id":109578,"name":"test","distribution":"Ubuntu"},{"id":1601,"name":"CentOS
55
+ 5.8 x64","distribution":"CentOS"},{"id":1602,"name":"CentOS 5.8 x32","distribution":"CentOS"},{"id":1605,"name":"CentOS
56
+ 6.0 x32","distribution":"CentOS"},{"id":1606,"name":"Fedora 15 x64","distribution":"Fedora"},{"id":1609,"name":"Ubuntu
57
+ 11.10 x32 Server","distribution":"Ubuntu"},{"id":1611,"name":"CentOS 6.2 x64","distribution":"CentOS"},{"id":1615,"name":"Fedora
58
+ 16 x64 Server","distribution":"Fedora"},{"id":1618,"name":"Fedora 16 x64 Desktop","distribution":"Fedora"},{"id":2676,"name":"Ubuntu
59
+ 12.04 x64 Server","distribution":"Ubuntu"},{"id":12573,"name":"Debian 6.0
60
+ x64","distribution":"Debian"},{"id":12574,"name":"CentOS 6.3 x64","distribution":"CentOS"},{"id":12575,"name":"Debian
61
+ 6.0 x32","distribution":"Debian"},{"id":12578,"name":"CentOS 6.3 x32","distribution":"CentOS"},{"id":14097,"name":"Ubuntu
62
+ 10.04 x64 Server","distribution":"Ubuntu"},{"id":14098,"name":"Ubuntu 10.04
63
+ x32 Server","distribution":"Ubuntu"},{"id":14218,"name":"Ubuntu 12.04 x64
64
+ Desktop","distribution":"Ubuntu"},{"id":25306,"name":"Ubuntu 12.10 x32 Server","distribution":"Ubuntu"},{"id":25485,"name":"Ubuntu
65
+ 12.10 x32 Desktop","distribution":"Ubuntu"},{"id":25489,"name":"Ubuntu 12.10
66
+ x64 Server","distribution":"Ubuntu"},{"id":25493,"name":"Ubuntu 12.10 x64
67
+ Desktop","distribution":"Ubuntu"},{"id":32387,"name":"Fedora 17 x32 Server","distribution":"Fedora"},{"id":32399,"name":"Fedora
68
+ 17 x32 Desktop","distribution":"Fedora"},{"id":32419,"name":"Fedora 17 x64
69
+ Desktop","distribution":"Fedora"},{"id":32428,"name":"Fedora 17 x64 Server","distribution":"Fedora"},{"id":42735,"name":"Ubuntu
70
+ 12.04 x32 Server","distribution":"Ubuntu"},{"id":43458,"name":"Ubuntu 11.04x64
71
+ Server","distribution":"Ubuntu"},{"id":43462,"name":"Ubuntu 11.04x32 Desktop","distribution":"Ubuntu"},{"id":46964,"name":"LAMP
72
+ on Ubuntu 12.04","distribution":"Ubuntu"}]}'
73
+ http_version:
74
+ recorded_at: Wed, 13 Mar 2013 12:15:55 GMT
75
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,129 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/images?api_key=<API_KEY>&client_id=<CLIENT_ID>
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*; q=0.5, application/xml'
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 13 Mar 2013 12:15:58 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Status:
32
+ - '200'
33
+ X-Powered-By:
34
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
35
+ Strict-Transport-Security:
36
+ - max-age=31536000
37
+ X-Ua-Compatible:
38
+ - IE=Edge,chrome=1
39
+ Etag:
40
+ - ! '"7589fcbe5a1fcb30d879fc6706a468d6"'
41
+ Cache-Control:
42
+ - max-age=0, private, must-revalidate
43
+ Set-Cookie:
44
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWYxM2QyM2RlYTZjNzI3MjljMDI5Y2Q4MWZiYTBhZTI4BjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIn5odHRwczovL3d3dy5kaWdpdGFsb2NlYW4uY29tL2FwaS9pbWFnZXM%2FY2xpZW50X2lkPTg0VTlxSHdlMk43M2RFb1BGVnFLeiZhcGlfa2V5PXFROG1wUmlFWWczdU82T3JMVFRlSkQxRHZQR0VRaFZtTWVIdkRyM2RtBjsARg%3D%3D--6fc1bcbd192d3fdb215901d4536baaa0b09363e1;
45
+ path=/; secure; HttpOnly
46
+ X-Request-Id:
47
+ - 5bfb6b4dd57fa8a1353f5dbe41fe92d0
48
+ X-Runtime:
49
+ - '0.176977'
50
+ X-Rack-Cache:
51
+ - miss
52
+ body:
53
+ encoding: US-ASCII
54
+ string: ! '{"status":"OK","images":[{"id":109578,"name":"test","distribution":"Ubuntu"},{"id":1601,"name":"CentOS
55
+ 5.8 x64","distribution":"CentOS"},{"id":1602,"name":"CentOS 5.8 x32","distribution":"CentOS"},{"id":1605,"name":"CentOS
56
+ 6.0 x32","distribution":"CentOS"},{"id":1606,"name":"Fedora 15 x64","distribution":"Fedora"},{"id":1609,"name":"Ubuntu
57
+ 11.10 x32 Server","distribution":"Ubuntu"},{"id":1611,"name":"CentOS 6.2 x64","distribution":"CentOS"},{"id":1615,"name":"Fedora
58
+ 16 x64 Server","distribution":"Fedora"},{"id":1618,"name":"Fedora 16 x64 Desktop","distribution":"Fedora"},{"id":2676,"name":"Ubuntu
59
+ 12.04 x64 Server","distribution":"Ubuntu"},{"id":12573,"name":"Debian 6.0
60
+ x64","distribution":"Debian"},{"id":12574,"name":"CentOS 6.3 x64","distribution":"CentOS"},{"id":12575,"name":"Debian
61
+ 6.0 x32","distribution":"Debian"},{"id":12578,"name":"CentOS 6.3 x32","distribution":"CentOS"},{"id":14097,"name":"Ubuntu
62
+ 10.04 x64 Server","distribution":"Ubuntu"},{"id":14098,"name":"Ubuntu 10.04
63
+ x32 Server","distribution":"Ubuntu"},{"id":14218,"name":"Ubuntu 12.04 x64
64
+ Desktop","distribution":"Ubuntu"},{"id":25306,"name":"Ubuntu 12.10 x32 Server","distribution":"Ubuntu"},{"id":25485,"name":"Ubuntu
65
+ 12.10 x32 Desktop","distribution":"Ubuntu"},{"id":25489,"name":"Ubuntu 12.10
66
+ x64 Server","distribution":"Ubuntu"},{"id":25493,"name":"Ubuntu 12.10 x64
67
+ Desktop","distribution":"Ubuntu"},{"id":32387,"name":"Fedora 17 x32 Server","distribution":"Fedora"},{"id":32399,"name":"Fedora
68
+ 17 x32 Desktop","distribution":"Fedora"},{"id":32419,"name":"Fedora 17 x64
69
+ Desktop","distribution":"Fedora"},{"id":32428,"name":"Fedora 17 x64 Server","distribution":"Fedora"},{"id":42735,"name":"Ubuntu
70
+ 12.04 x32 Server","distribution":"Ubuntu"},{"id":43458,"name":"Ubuntu 11.04x64
71
+ Server","distribution":"Ubuntu"},{"id":43462,"name":"Ubuntu 11.04x32 Desktop","distribution":"Ubuntu"},{"id":46964,"name":"LAMP
72
+ on Ubuntu 12.04","distribution":"Ubuntu"}]}'
73
+ http_version:
74
+ recorded_at: Wed, 13 Mar 2013 12:15:56 GMT
75
+ - request:
76
+ method: get
77
+ uri: https://api.digitalocean.com/images/109578?api_key=<API_KEY>&client_id=<CLIENT_ID>
78
+ body:
79
+ encoding: US-ASCII
80
+ string: ''
81
+ headers:
82
+ Accept:
83
+ - ! '*/*; q=0.5, application/xml'
84
+ Accept-Encoding:
85
+ - gzip, deflate
86
+ User-Agent:
87
+ - Ruby
88
+ response:
89
+ status:
90
+ code: 200
91
+ message: OK
92
+ headers:
93
+ Server:
94
+ - nginx
95
+ Date:
96
+ - Wed, 13 Mar 2013 12:15:58 GMT
97
+ Content-Type:
98
+ - application/json; charset=utf-8
99
+ Transfer-Encoding:
100
+ - chunked
101
+ Connection:
102
+ - keep-alive
103
+ Status:
104
+ - '200'
105
+ X-Powered-By:
106
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
107
+ Strict-Transport-Security:
108
+ - max-age=31536000
109
+ X-Ua-Compatible:
110
+ - IE=Edge,chrome=1
111
+ Etag:
112
+ - ! '"70be74c7adb4e0e4126e670d3465b5c9"'
113
+ Cache-Control:
114
+ - max-age=0, private, must-revalidate
115
+ Set-Cookie:
116
+ - _digitalocean2_session_v2=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQ2NjYxZWMxODdmZmFmZWMxMGFmZThmMzNmZTFmZmUxBjsAVEkiEXJlZGlyZWN0X3VybAY7AEZJIgGAaHR0cHM6Ly93d3cuZGlnaXRhbG9jZWFuLmNvbS9hcGkvaW1hZ2VzLzEwOTU3OD9jbGllbnRfaWQ9ODRVOXFId2UyTjczZEVvUEZWcUt6JmFwaV9rZXk9cVE4bXBSaUVZZzN1TzZPckxUVGVKRDFEdlBHRVFoVm1NZUh2RHIzZG0GOwBG--c577b5784af80471795d06ae73b63ab797c6716e;
117
+ path=/; secure; HttpOnly
118
+ X-Request-Id:
119
+ - a237e83e9971261110a53293e02d1d6a
120
+ X-Runtime:
121
+ - '0.159824'
122
+ X-Rack-Cache:
123
+ - miss
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ! '{"status":"OK","image":{"id":109578,"name":"test","distribution":"Ubuntu"}}'
127
+ http_version:
128
+ recorded_at: Wed, 13 Mar 2013 12:15:57 GMT
129
+ recorded_with: VCR 2.4.0