digital_ocean 0.0.1alpha1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +17 -0
- data/digital_ocean.gemspec +38 -0
- data/lib/digital_ocean/api.rb +46 -0
- data/lib/digital_ocean/authentication_middleware.rb +29 -0
- data/lib/digital_ocean/resource/base.rb +22 -0
- data/lib/digital_ocean/resource/droplet.rb +84 -0
- data/lib/digital_ocean/resource/image.rb +17 -0
- data/lib/digital_ocean/resource/region.rb +9 -0
- data/lib/digital_ocean/resource/size.rb +9 -0
- data/lib/digital_ocean/resource/ssh_key.rb +27 -0
- data/lib/digital_ocean/resource.rb +12 -0
- data/lib/digital_ocean/version.rb +3 -0
- data/lib/digital_ocean.rb +10 -0
- data/spec/api_spec.rb +421 -0
- data/spec/digital_ocean_spec.rb +7 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/vcr.rb +21 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_create/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_delete/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_disable_backups/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_enable_backups/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_list/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_list/should_return_a_list_of_all_droplets.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_cycle/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_off/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_power_on/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_reboot/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_rebuild/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_reset_root_password/should_be_successful.yml +49 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_resize/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_restore/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_show/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_shutdown/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_droplets/_snapshot/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_delete/invalid/should_not_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_delete/valid/should_be_successful.yml +49 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_global/should_be_successful.yml +69 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_global/should_return_global_images.yml +69 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_my_images/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/with_filter_my_images/should_return_my_images.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/without_filter/should_be_successful.yml +70 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_list/without_filter/should_return_a_list_of_all_images.yml +70 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/invalid/should_not_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/valid/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_images/_show/valid/should_return_the_image.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_be_successful.yml +49 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_return_a_list_of_all_available_regions.yml +49 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_return_a_list_of_all_regions.yml +49 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_a_list_of_all_droplet_sizes.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_the_correct_ID_for_the_96GB_size.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_add/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_delete/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_return_a_list_of_all_SSH_keys.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/invalid/should_not_be_successful.yml +48 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_be_successful.yml +50 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_return_a_list_of_all_SSH_keys.yml +50 -0
- data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_return_the_public_keykey.yml +50 -0
- metadata +353 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/regions?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 14:07:28 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
|
+
- 628583753f8436f6fddbdeae16fc0751
|
39
|
+
x-runtime:
|
40
|
+
- '0.665693'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","regions":[{"id":1,"name":"New York 1"},{"id":2,"name":"Amsterdam
|
46
|
+
1"}]}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Wed, 23 Jan 2013 14:07:28 GMT
|
49
|
+
recorded_with: VCR 2.4.0
|
data/spec/vcr/cassettes/DigitalOcean_API/_regions/_list/should_return_a_list_of_all_regions.yml
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/regions?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 14:07: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
|
+
- 3411f2e3db7ce530036a6caf6ffd6eaf
|
39
|
+
x-runtime:
|
40
|
+
- '0.142028'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","regions":[{"id":1,"name":"New York 1"},{"id":2,"name":"Amsterdam
|
46
|
+
1"}]}'
|
47
|
+
http_version:
|
48
|
+
recorded_at: Wed, 23 Jan 2013 14:07:31 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/sizes?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 14:00:02 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
|
+
- ffe527ff682a7319399ba74c7b4e98aa
|
39
|
+
x-runtime:
|
40
|
+
- '0.667186'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","sizes":[{"id":66,"name":"512MB"},{"id":63,"name":"1GB"},{"id":62,"name":"2GB"},{"id":64,"name":"4GB"},{"id":65,"name":"8GB"},{"id":61,"name":"16GB"},{"id":60,"name":"32GB"},{"id":70,"name":"48GB"},{"id":69,"name":"64GB"},{"id":68,"name":"96GB"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 14:00:02 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
data/spec/vcr/cassettes/DigitalOcean_API/_sizes/_list/should_return_a_list_of_all_droplet_sizes.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/sizes?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 14:02: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
|
+
- e639e3e114faefcf2e1af7b99146f80e
|
39
|
+
x-runtime:
|
40
|
+
- '0.568007'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","sizes":[{"id":66,"name":"512MB"},{"id":63,"name":"1GB"},{"id":62,"name":"2GB"},{"id":64,"name":"4GB"},{"id":65,"name":"8GB"},{"id":61,"name":"16GB"},{"id":60,"name":"32GB"},{"id":70,"name":"48GB"},{"id":69,"name":"64GB"},{"id":68,"name":"96GB"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 14:02:26 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/sizes?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 14:03:47 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
|
+
- 88cededee8f718e169ab752911ff006c
|
39
|
+
x-runtime:
|
40
|
+
- '0.800044'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","sizes":[{"id":66,"name":"512MB"},{"id":63,"name":"1GB"},{"id":62,"name":"2GB"},{"id":64,"name":"4GB"},{"id":65,"name":"8GB"},{"id":61,"name":"16GB"},{"id":60,"name":"32GB"},{"id":70,"name":"48GB"},{"id":69,"name":"64GB"},{"id":68,"name":"96GB"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 14:03:47 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/ssh_keys.json?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 20:20:06 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
|
+
- 4c6c620cf4b58304db623f7c0b13fc44
|
39
|
+
x-runtime:
|
40
|
+
- '0.664323'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_keys":[{"id":3738,"name":"default"},{"id":3928,"name":"xxx"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 20:20:06 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://api.digitalocean.com/ssh_keys/3928?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 20:34:51 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
|
+
- d441c933a38a556636d6c2234220f2dd
|
39
|
+
x-runtime:
|
40
|
+
- '0.540159'
|
41
|
+
x-rack-cache:
|
42
|
+
- invalidate, pass
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 20:34:51 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/ssh_keys?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 14:10: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
|
+
- 1a24ea99225e01b780da8680abc514db
|
39
|
+
x-runtime:
|
40
|
+
- '0.645345'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_keys":[{"id":1000,"name":"xxxxxx"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 14:10:49 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_list/should_return_a_list_of_all_SSH_keys.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/ssh_keys?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 14:37:07 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
|
+
- efbf10a6ca23420c16818e152d1fe1e3
|
39
|
+
x-runtime:
|
40
|
+
- '0.598182'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_keys":[{"id":1000,"name":"xxxxxx"}]}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 14:37:07 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/ssh_keys/1?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:20:38 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
|
+
- 6d6d6d7f31c541d3b70c2e9e0ae687ec
|
39
|
+
x-runtime:
|
40
|
+
- '0.709843'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"ERROR","error_message":"No SSH Key Found"}'
|
46
|
+
http_version:
|
47
|
+
recorded_at: Wed, 23 Jan 2013 21:20:38 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/ssh_keys/3738?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 20:12: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
|
+
- 32e594483d2d06fe2dfad351f3010df0
|
39
|
+
x-runtime:
|
40
|
+
- '0.612660'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_key":{"id":3738,"name":"default","ssh_pub_key":"ssh-dss
|
46
|
+
AAAAB3NzaC1kc3MAAACBAPThLrORruKPqm9B9WQ3Sc215mytV0R0tmGX3LowdFwLrsuhshgBQc0jQzXMrr4V+INn51ICHnNVQAgNdpglexvkevyGIw2uWqeKhHOFwKX4/vrFeCtb+MNFiI4bTuAZ2WPOrUqm9gXal3VysanjK3DQ9HxNQUjHOcPVMXrm2OzvAAAAFQCHMswAbrQ/stlOaAjz0tyxHGEHywAAAIEA0SmM7J6nZhhvY2HTviFDBsyq1acRAQ0t3ZOY030Z4XE56JvMGgkIl1ioejVNObWyNs5omSO+zpntBrvVdl2+dKe8OxUH5YS54rNA1hkJmcoPla3P/oVqvRsVoFdWjOv/KeWFoBdC/x/KGdVsI0/vJF6jpnrjkOKcGR0ih4ss29wAAACBALZxAEu9qlgTaGNPc0J041UMmbROlgayVZ0HlhqQn7jd1jjqmtJeNlG86axtbza2F3VwOhXmegTLLMHowlOoLLLzB3cCgYLT0N98uov3+1nAudnTmUVujBHNwa/oAH+1pE94ob/BPgef2mp59LRgMaes1/u8yOCURcrWU4oPsEO5
|
47
|
+
rmoriz@moriz\r\n"}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Wed, 23 Jan 2013 20:12:11 GMT
|
50
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/ssh_keys/3738?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 20:12: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
|
+
- cc374bfded6da38dd91dd361c280ad6a
|
39
|
+
x-runtime:
|
40
|
+
- '0.096844'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_key":{"id":3738,"name":"default","ssh_pub_key":"ssh-dss
|
46
|
+
AAAAB3NzaC1kc3MAAACBAPThLrORruKPqm9B9WQ3Sc215mytV0R0tmGX3LowdFwLrsuhshgBQc0jQzXMrr4V+INn51ICHnNVQAgNdpglexvkevyGIw2uWqeKhHOFwKX4/vrFeCtb+MNFiI4bTuAZ2WPOrUqm9gXal3VysanjK3DQ9HxNQUjHOcPVMXrm2OzvAAAAFQCHMswAbrQ/stlOaAjz0tyxHGEHywAAAIEA0SmM7J6nZhhvY2HTviFDBsyq1acRAQ0t3ZOY030Z4XE56JvMGgkIl1ioejVNObWyNs5omSO+zpntBrvVdl2+dKe8OxUH5YS54rNA1hkJmcoPla3P/oVqvRsVoFdWjOv/KeWFoBdC/x/KGdVsI0/vJF6jpnrjkOKcGR0ih4ss29wAAACBALZxAEu9qlgTaGNPc0J041UMmbROlgayVZ0HlhqQn7jd1jjqmtJeNlG86axtbza2F3VwOhXmegTLLMHowlOoLLLzB3cCgYLT0N98uov3+1nAudnTmUVujBHNwa/oAH+1pE94ob/BPgef2mp59LRgMaes1/u8yOCURcrWU4oPsEO5
|
47
|
+
rmoriz@moriz\r\n"}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Wed, 23 Jan 2013 20:12:12 GMT
|
50
|
+
recorded_with: VCR 2.4.0
|
data/spec/vcr/cassettes/DigitalOcean_API/_ssh_keys/_show/valid/should_return_the_public_keykey.yml
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.digitalocean.com/ssh_keys/3738?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 20:13: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
|
+
- d8a8432a2842ecb0857310298e3fc2d5
|
39
|
+
x-runtime:
|
40
|
+
- '0.701737'
|
41
|
+
x-rack-cache:
|
42
|
+
- miss
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ! '{"status":"OK","ssh_key":{"id":3738,"name":"default","ssh_pub_key":"ssh-dss
|
46
|
+
AAAAB3NzaC1kc3MAAACBAPThLrORruKPqm9B9WQ3Sc215mytV0R0tmGX3LowdFwLrsuhshgBQc0jQzXMrr4V+INn51ICHnNVQAgNdpglexvkevyGIw2uWqeKhHOFwKX4/vrFeCtb+MNFiI4bTuAZ2WPOrUqm9gXal3VysanjK3DQ9HxNQUjHOcPVMXrm2OzvAAAAFQCHMswAbrQ/stlOaAjz0tyxHGEHywAAAIEA0SmM7J6nZhhvY2HTviFDBsyq1acRAQ0t3ZOY030Z4XE56JvMGgkIl1ioejVNObWyNs5omSO+zpntBrvVdl2+dKe8OxUH5YS54rNA1hkJmcoPla3P/oVqvRsVoFdWjOv/KeWFoBdC/x/KGdVsI0/vJF6jpnrjkOKcGR0ih4ss29wAAACBALZxAEu9qlgTaGNPc0J041UMmbROlgayVZ0HlhqQn7jd1jjqmtJeNlG86axtbza2F3VwOhXmegTLLMHowlOoLLLzB3cCgYLT0N98uov3+1nAudnTmUVujBHNwa/oAH+1pE94ob/BPgef2mp59LRgMaes1/u8yOCURcrWU4oPsEO5
|
47
|
+
rmoriz@moriz\r\n"}}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Wed, 23 Jan 2013 20:13:12 GMT
|
50
|
+
recorded_with: VCR 2.4.0
|