digital_ocean 0.0.1alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/.gitignore +18 -0
  2. data/.rspec +2 -0
  3. data/.travis.yml +9 -0
  4. data/Gemfile +4 -0
  5. data/Guardfile +11 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +32 -0
  8. data/Rakefile +17 -0
  9. data/digital_ocean.gemspec +38 -0
  10. data/lib/digital_ocean/api.rb +46 -0
  11. data/lib/digital_ocean/authentication_middleware.rb +29 -0
  12. data/lib/digital_ocean/resource/base.rb +22 -0
  13. data/lib/digital_ocean/resource/droplet.rb +84 -0
  14. data/lib/digital_ocean/resource/image.rb +17 -0
  15. data/lib/digital_ocean/resource/region.rb +9 -0
  16. data/lib/digital_ocean/resource/size.rb +9 -0
  17. data/lib/digital_ocean/resource/ssh_key.rb +27 -0
  18. data/lib/digital_ocean/resource.rb +12 -0
  19. data/lib/digital_ocean/version.rb +3 -0
  20. data/lib/digital_ocean.rb +10 -0
  21. data/spec/api_spec.rb +421 -0
  22. data/spec/digital_ocean_spec.rb +7 -0
  23. data/spec/spec_helper.rb +21 -0
  24. data/spec/support/vcr.rb +21 -0
  25. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_create/should_be_successful.yml +48 -0
  26. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_delete/should_be_successful.yml +48 -0
  27. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_disable_backups/should_be_successful.yml +48 -0
  28. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_enable_backups/should_be_successful.yml +48 -0
  29. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_list/should_be_successful.yml +48 -0
  30. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_list/should_return_a_list_of_all_droplets.yml +48 -0
  31. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_cycle/should_be_successful.yml +48 -0
  32. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_off/should_be_successful.yml +48 -0
  33. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_on/should_be_successful.yml +48 -0
  34. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_reboot/should_be_successful.yml +48 -0
  35. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_rebuild/should_be_successful.yml +48 -0
  36. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_reset_root_password/should_be_successful.yml +49 -0
  37. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_resize/should_be_successful.yml +48 -0
  38. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_restore/should_be_successful.yml +48 -0
  39. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_show/should_be_successful.yml +48 -0
  40. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_shutdown/should_be_successful.yml +48 -0
  41. data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_snapshot/should_be_successful.yml +48 -0
  42. data/spec/vcr/cassettes/DigitalOcean_API/_images/_delete/invalid/should_not_be_successful.yml +48 -0
  43. data/spec/vcr/cassettes/DigitalOcean_API/_images/_delete/valid/should_be_successful.yml +49 -0
  44. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_global/should_be_successful.yml +69 -0
  45. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_global/should_return_global_images.yml +69 -0
  46. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_my_images/should_be_successful.yml +48 -0
  47. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_my_images/should_return_my_images.yml +48 -0
  48. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/without_filter/should_be_successful.yml +70 -0
  49. data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/without_filter/should_return_a_list_of_all_images.yml +70 -0
  50. data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/invalid/should_not_be_successful.yml +48 -0
  51. data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/valid/should_be_successful.yml +48 -0
  52. data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/valid/should_return_the_image.yml +48 -0
  53. data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_be_successful.yml +49 -0
  54. data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_return_a_list_of_all_available_regions.yml +49 -0
  55. data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_return_a_list_of_all_regions.yml +49 -0
  56. data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_be_successful.yml +48 -0
  57. data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_a_list_of_all_droplet_sizes.yml +48 -0
  58. data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_the_correct_ID_for_the_96GB_size.yml +48 -0
  59. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_add/should_be_successful.yml +48 -0
  60. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_delete/should_be_successful.yml +48 -0
  61. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_be_successful.yml +48 -0
  62. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_return_a_list_of_all_SSH_keys.yml +48 -0
  63. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/invalid/should_not_be_successful.yml +48 -0
  64. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_be_successful.yml +50 -0
  65. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_return_a_list_of_all_SSH_keys.yml +50 -0
  66. data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_return_the_public_keykey.yml +50 -0
  67. metadata +353 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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, 23 Jan 2013 12:38:25 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 2110036f9f67090da25bd1956e627f57
39
+ x-runtime:
40
+ - '0.865003'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","droplets":[{"id":83102,"name":"app200.ams.nl.moriz.net","image_id":25306,"size_id":63,"region_id":2,"backups_active":true,"ip_address":"185.14.185.158","status":"active"}]}'
46
+ http_version:
47
+ recorded_at: Wed, 23 Jan 2013 12:38:25 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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, 23 Jan 2013 12:38:26 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - e17b3c3510da15664d0408c0ecc49e00
39
+ x-runtime:
40
+ - '0.163229'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","droplets":[{"id":83102,"name":"app200.ams.nl.moriz.net","image_id":25306,"size_id":63,"region_id":2,"backups_active":true,"ip_address":"185.14.185.158","status":"active"}]}'
46
+ http_version:
47
+ recorded_at: Wed, 23 Jan 2013 12:38:26 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.digitalocean.com/droplets/87071/power_cycle?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:24:12 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 43364ec0a2c0e669b13eba1159badc1e
39
+ x-runtime:
40
+ - '0.119125'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594614}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:24:12 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.digitalocean.com/droplets/87071/power_off?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:29:11 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 1a90d42067f0088d95dcd963a43658c1
39
+ x-runtime:
40
+ - '0.598098'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594625}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:29:11 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.digitalocean.com/droplets/87071/power_on?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:27:54 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - c72fa7a7edd44044a02ae853d66ce4a9
39
+ x-runtime:
40
+ - '0.200646'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594622}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:27:54 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.digitalocean.com/droplets/87071/reboot?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:22:29 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 5c9785309b567ed5ed3457fa77c2a44b
39
+ x-runtime:
40
+ - '0.570607'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594612}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:22:29 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.digitalocean.com/droplets/87071/rebuild?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&image_id=57658
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
+ - Thu, 24 Jan 2013 09:51:19 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 3febf0dfdde7dd48d4c54c419b7e2fbc
39
+ x-runtime:
40
+ - '0.680994'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594691}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:51:19 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets/87071/reset_root_password?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:32:49 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 9afe59e1a314b1439025a541fe490efd
39
+ x-runtime:
40
+ - '0.102896'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"ERROR","error_message":{"action":["Invalid Action - The
46
+ action you specified cannot be found"]}}'
47
+ http_version:
48
+ recorded_at: Thu, 24 Jan 2013 09:32:50 GMT
49
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets/87071/resize?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&size_id=63
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
+ - Thu, 24 Jan 2013 09:37:25 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 01cc9883f3c1d0e1ec22c299d9f2c78d
39
+ x-runtime:
40
+ - '0.637549'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594644}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:37:25 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.digitalocean.com/droplets/87071/restore?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&image_id=57658
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
+ - Thu, 24 Jan 2013 09:50:05 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - ab22ceddb50c65414f136b028428bd56
39
+ x-runtime:
40
+ - '0.670554'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594687}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:50:05 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets/83102?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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, 23 Jan 2013 12:54:31 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - ab0fe504dbc14930cf6f3fde3ccaf143
39
+ x-runtime:
40
+ - '0.775382'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","droplet":{"id":83102,"name":"app200.ams.nl.moriz.net","image_id":25306,"size_id":63,"region_id":2,"backups_active":true,"ip_address":"185.14.185.158","status":"active"}}'
46
+ http_version:
47
+ recorded_at: Wed, 23 Jan 2013 12:54:31 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://api.digitalocean.com/droplets/87071/shutdown?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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
+ - Thu, 24 Jan 2013 09:26:01 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - e131def10d626b38a82b4506bd4c03aa
39
+ x-runtime:
40
+ - '0.559939'
41
+ x-rack-cache:
42
+ - invalidate, pass
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594619}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:26:01 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/droplets/87071/snapshot?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&name=test_snapshot_1
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
+ - Thu, 24 Jan 2013 09:48:01 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - adb7af95465c9c789ec2dc0144296a9f
39
+ x-runtime:
40
+ - '0.685729'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"OK","event_id":594682}'
46
+ http_version:
47
+ recorded_at: Thu, 24 Jan 2013 09:48:01 GMT
48
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.digitalocean.com/images/0/destroy?client_id=client_id_XXXXXXXXXXXXXXXXXXX&api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
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, 23 Jan 2013 21:16:25 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
+ x-ua-compatible:
30
+ - IE=Edge,chrome=1
31
+ etag:
32
+ - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
33
+ cache-control:
34
+ - max-age=0, private, must-revalidate
35
+ set-cookie:
36
+ - _digitalocean2_session=wtf
37
+ x-request-id:
38
+ - 5ec250d765a000e3770193c43ab840d2
39
+ x-runtime:
40
+ - '0.099544'
41
+ x-rack-cache:
42
+ - miss
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"status":"ERROR","error_message":"No Image Was Found"}'
46
+ http_version:
47
+ recorded_at: Wed, 23 Jan 2013 21:16:25 GMT
48
+ recorded_with: VCR 2.4.0