cloudapp-service 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/CHANGELOG.md +34 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +56 -0
  4. data/MIT-LICENSE +20 -0
  5. data/README.md +14 -0
  6. data/Rakefile +148 -0
  7. data/cloudapp-service.gemspec +115 -0
  8. data/lib/cloudapp/collection_json.rb +3 -0
  9. data/lib/cloudapp/collection_json/item.rb +20 -0
  10. data/lib/cloudapp/collection_json/representation.rb +74 -0
  11. data/lib/cloudapp/collection_json/template.rb +17 -0
  12. data/lib/cloudapp/collection_json/tint.rb +11 -0
  13. data/lib/cloudapp/service.rb +204 -0
  14. data/lib/cloudapp/service/authorized_representation.rb +17 -0
  15. data/lib/cloudapp/service/drop.rb +44 -0
  16. data/lib/cloudapp/service/drop_collection.rb +39 -0
  17. data/spec/cassettes/account_token.yml +88 -0
  18. data/spec/cassettes/create_bookmark.yml +132 -0
  19. data/spec/cassettes/create_bookmark_with_name.yml +133 -0
  20. data/spec/cassettes/create_bookmark_with_privacy.yml +133 -0
  21. data/spec/cassettes/delete_drop.yml +215 -0
  22. data/spec/cassettes/list_drops.yml +488 -0
  23. data/spec/cassettes/list_drops_with_bad_token.yml +45 -0
  24. data/spec/cassettes/list_drops_with_filter.yml +345 -0
  25. data/spec/cassettes/list_drops_with_limit.yml +129 -0
  26. data/spec/cassettes/privatize_drop.yml +222 -0
  27. data/spec/cassettes/publicize_drop.yml +222 -0
  28. data/spec/cassettes/purge_drops.yml +764 -0
  29. data/spec/cassettes/recover_drop.yml +309 -0
  30. data/spec/cassettes/rename_drop.yml +222 -0
  31. data/spec/cassettes/token_for_account.yml +88 -0
  32. data/spec/cassettes/token_for_account_with_bad_credentials.yml +86 -0
  33. data/spec/cassettes/trash_drop.yml +222 -0
  34. data/spec/cassettes/update_drop_bookmark_url.yml +222 -0
  35. data/spec/cassettes/update_file.yml +365 -0
  36. data/spec/cassettes/upload_file.yml +276 -0
  37. data/spec/cassettes/upload_file_with_name.yml +278 -0
  38. data/spec/cassettes/upload_file_with_privacy.yml +277 -0
  39. data/spec/cassettes/view_drop.yml +174 -0
  40. data/spec/cloudapp/authorized_representation_spec.rb +32 -0
  41. data/spec/cloudapp/collection_json/item_spec.rb +45 -0
  42. data/spec/cloudapp/collection_json/representation_spec.rb +118 -0
  43. data/spec/cloudapp/collection_json/template_spec.rb +53 -0
  44. data/spec/cloudapp/drop_collection_spec.rb +148 -0
  45. data/spec/cloudapp/drop_spec.rb +186 -0
  46. data/spec/cloudapp/service_spec.rb +321 -0
  47. data/spec/helper.rb +8 -0
  48. data/spec/integration_spec.rb +77 -0
  49. data/spec/support/files/favicon.ico +0 -0
  50. data/spec/support/stub_class_or_module.rb +22 -0
  51. data/spec/support/vcr.rb +24 -0
  52. metadata +194 -0
@@ -0,0 +1,133 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getcloudapp.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - Token token="abc123"
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ User-Agent:
18
+ - Ruby
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Cache-Control:
25
+ - max-age=0, private, must-revalidate
26
+ Content-Type:
27
+ - application/vnd.collection+json; charset=utf-8
28
+ Etag:
29
+ - ! '"44e8e003e0f1b5e38f7ca916ff4497d7"'
30
+ Server:
31
+ - thin 1.4.1 codename Chromeo
32
+ X-Runtime:
33
+ - '0.015321'
34
+ X-Ua-Compatible:
35
+ - IE=Edge,chrome=1
36
+ Transfer-Encoding:
37
+ - chunked
38
+ Connection:
39
+ - keep-alive
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/","links":[{"rel":"drops","href":"https://api.getcloudapp.com/drops"}]}}'
43
+ http_version:
44
+ recorded_at: Tue, 11 Sep 2012 15:46:53 GMT
45
+ - request:
46
+ method: get
47
+ uri: https://api.getcloudapp.com/drops
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Authorization:
53
+ - Token token="abc123"
54
+ Accept:
55
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
56
+ text/plain
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ User-Agent:
60
+ - Ruby
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Cache-Control:
67
+ - max-age=0, private, must-revalidate
68
+ Content-Type:
69
+ - application/vnd.collection+json; charset=utf-8
70
+ Etag:
71
+ - ! '"324ee26fe899fab0216e9bcdbbb8c70e"'
72
+ Server:
73
+ - thin 1.4.1 codename Chromeo
74
+ X-Runtime:
75
+ - '0.052327'
76
+ X-Ua-Compatible:
77
+ - IE=Edge,chrome=1
78
+ Content-Length:
79
+ - '2618'
80
+ Connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907683","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/0e0E2w0w0T0U"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907683},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:54Z"}]},{"href":"https://api.getcloudapp.com/drops/21907682","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2x3S331L1a3o"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907682},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:52Z"}]},{"href":"https://api.getcloudapp.com/drops/21907679","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/1G282W04401a"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907679},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:47Z"}]},{"href":"https://api.getcloudapp.com/drops/21907678","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/1u232n412l14"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/1u232n412l14"},{"rel":"embed","href":"http://cl.ly/image/1u232n412l14/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/1u232n412l14/download/favicon.ico"}],"data":[{"name":"id","value":21907678},{"name":"name","value":"favicon.ico"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:45Z"}]}]}}'
85
+ http_version:
86
+ recorded_at: Tue, 11 Sep 2012 15:46:53 GMT
87
+ - request:
88
+ method: post
89
+ uri: https://api.getcloudapp.com/drops
90
+ body:
91
+ encoding: UTF-8
92
+ string: ! '{"name":"New Bookmark","private":true,"trash":false,"bookmark_url":"http://getcloudapp.com","file_size":null}'
93
+ headers:
94
+ Authorization:
95
+ - Token token="abc123"
96
+ Content-Type:
97
+ - application/json
98
+ Accept:
99
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
100
+ text/plain
101
+ User-Agent:
102
+ - Ruby
103
+ response:
104
+ status:
105
+ code: 201
106
+ message: Created
107
+ headers:
108
+ Cache-Control:
109
+ - max-age=0, private, must-revalidate
110
+ Content-Type:
111
+ - application/vnd.collection+json; charset=utf-8
112
+ Etag:
113
+ - ! '"fe194c019d27cda373746ed02ca521b1"'
114
+ Server:
115
+ - thin 1.4.1 codename Chromeo
116
+ Set-Cookie:
117
+ - _engine_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWY5NmY0ZDQwYmViNTI1ODM2OWRkNWNlYzQ0ZTRiMTdkBjsAVA%3D%3D--d9f22fb421a4886be6059c15fb843f64bee9ba68;
118
+ path=/; HttpOnly
119
+ X-Runtime:
120
+ - '0.116601'
121
+ X-Ua-Compatible:
122
+ - IE=Edge,chrome=1
123
+ Transfer-Encoding:
124
+ - chunked
125
+ Connection:
126
+ - keep-alive
127
+ body:
128
+ encoding: US-ASCII
129
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907685","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2k1L0G2U2z0I"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907685},{"name":"name","value":"New
130
+ Bookmark"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:55Z"}]}]}}'
131
+ http_version:
132
+ recorded_at: Tue, 11 Sep 2012 15:46:53 GMT
133
+ recorded_with: VCR 2.0.1
@@ -0,0 +1,133 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getcloudapp.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - Token token="abc123"
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ User-Agent:
18
+ - Ruby
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Cache-Control:
25
+ - max-age=0, private, must-revalidate
26
+ Content-Type:
27
+ - application/vnd.collection+json; charset=utf-8
28
+ Etag:
29
+ - ! '"44e8e003e0f1b5e38f7ca916ff4497d7"'
30
+ Server:
31
+ - thin 1.4.1 codename Chromeo
32
+ X-Runtime:
33
+ - '0.006362'
34
+ X-Ua-Compatible:
35
+ - IE=Edge,chrome=1
36
+ Content-Length:
37
+ - '139'
38
+ Connection:
39
+ - keep-alive
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/","links":[{"rel":"drops","href":"https://api.getcloudapp.com/drops"}]}}'
43
+ http_version:
44
+ recorded_at: Tue, 11 Sep 2012 15:46:54 GMT
45
+ - request:
46
+ method: get
47
+ uri: https://api.getcloudapp.com/drops
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Authorization:
53
+ - Token token="abc123"
54
+ Accept:
55
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
56
+ text/plain
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ User-Agent:
60
+ - Ruby
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Cache-Control:
67
+ - max-age=0, private, must-revalidate
68
+ Content-Type:
69
+ - application/vnd.collection+json; charset=utf-8
70
+ Etag:
71
+ - ! '"92ce7a5600e3fb346557a697f750f825"'
72
+ Server:
73
+ - thin 1.4.1 codename Chromeo
74
+ X-Runtime:
75
+ - '0.035803'
76
+ X-Ua-Compatible:
77
+ - IE=Edge,chrome=1
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907685","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2k1L0G2U2z0I"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907685},{"name":"name","value":"New
85
+ Bookmark"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:55Z"}]},{"href":"https://api.getcloudapp.com/drops/21907683","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/0e0E2w0w0T0U"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907683},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:54Z"}]},{"href":"https://api.getcloudapp.com/drops/21907682","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2x3S331L1a3o"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907682},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:52Z"}]},{"href":"https://api.getcloudapp.com/drops/21907679","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/1G282W04401a"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907679},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:47Z"}]},{"href":"https://api.getcloudapp.com/drops/21907678","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/1u232n412l14"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/1u232n412l14"},{"rel":"embed","href":"http://cl.ly/image/1u232n412l14/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/1u232n412l14/download/favicon.ico"}],"data":[{"name":"id","value":21907678},{"name":"name","value":"favicon.ico"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:45Z"}]}]}}'
86
+ http_version:
87
+ recorded_at: Tue, 11 Sep 2012 15:46:54 GMT
88
+ - request:
89
+ method: post
90
+ uri: https://api.getcloudapp.com/drops
91
+ body:
92
+ encoding: UTF-8
93
+ string: ! '{"name":null,"private":false,"trash":false,"bookmark_url":"http://getcloudapp.com","file_size":null}'
94
+ headers:
95
+ Authorization:
96
+ - Token token="abc123"
97
+ Content-Type:
98
+ - application/json
99
+ Accept:
100
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
101
+ text/plain
102
+ User-Agent:
103
+ - Ruby
104
+ response:
105
+ status:
106
+ code: 201
107
+ message: Created
108
+ headers:
109
+ Cache-Control:
110
+ - max-age=0, private, must-revalidate
111
+ Content-Type:
112
+ - application/vnd.collection+json; charset=utf-8
113
+ Etag:
114
+ - ! '"5674688d9a89afeca2e2682c34320299"'
115
+ Server:
116
+ - thin 1.4.1 codename Chromeo
117
+ Set-Cookie:
118
+ - _engine_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJWFmMjExMDI0NjhlYTJkNGI5NWM5MGU5ZTI2ZjAwZGIwBjsAVA%3D%3D--0c8a92e0f3da183ac9259e3ed8cbea18239d81be;
119
+ path=/; HttpOnly
120
+ X-Runtime:
121
+ - '0.146676'
122
+ X-Ua-Compatible:
123
+ - IE=Edge,chrome=1
124
+ Content-Length:
125
+ - '998'
126
+ Connection:
127
+ - keep-alive
128
+ body:
129
+ encoding: US-ASCII
130
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907686","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/JNXA"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907686},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:56Z"}]}]}}'
131
+ http_version:
132
+ recorded_at: Tue, 11 Sep 2012 15:46:54 GMT
133
+ recorded_with: VCR 2.0.1
@@ -0,0 +1,215 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.getcloudapp.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - Token token="abc123"
12
+ Accept:
13
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
14
+ text/plain
15
+ Accept-Encoding:
16
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
17
+ User-Agent:
18
+ - Ruby
19
+ response:
20
+ status:
21
+ code: 200
22
+ message: OK
23
+ headers:
24
+ Cache-Control:
25
+ - max-age=0, private, must-revalidate
26
+ Content-Type:
27
+ - application/vnd.collection+json; charset=utf-8
28
+ Etag:
29
+ - ! '"44e8e003e0f1b5e38f7ca916ff4497d7"'
30
+ Server:
31
+ - thin 1.4.1 codename Chromeo
32
+ X-Runtime:
33
+ - '0.005993'
34
+ X-Ua-Compatible:
35
+ - IE=Edge,chrome=1
36
+ Transfer-Encoding:
37
+ - chunked
38
+ Connection:
39
+ - keep-alive
40
+ body:
41
+ encoding: US-ASCII
42
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/","links":[{"rel":"drops","href":"https://api.getcloudapp.com/drops"}]}}'
43
+ http_version:
44
+ recorded_at: Tue, 11 Sep 2012 15:47:15 GMT
45
+ - request:
46
+ method: get
47
+ uri: https://api.getcloudapp.com/drops
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Authorization:
53
+ - Token token="abc123"
54
+ Accept:
55
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
56
+ text/plain
57
+ Accept-Encoding:
58
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
59
+ User-Agent:
60
+ - Ruby
61
+ response:
62
+ status:
63
+ code: 200
64
+ message: OK
65
+ headers:
66
+ Cache-Control:
67
+ - max-age=0, private, must-revalidate
68
+ Content-Type:
69
+ - application/vnd.collection+json; charset=utf-8
70
+ Etag:
71
+ - ! '"a3844b4aea26b26b4088829a18001e7c"'
72
+ Server:
73
+ - thin 1.4.1 codename Chromeo
74
+ X-Runtime:
75
+ - '0.050563'
76
+ X-Ua-Compatible:
77
+ - IE=Edge,chrome=1
78
+ Transfer-Encoding:
79
+ - chunked
80
+ Connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907702","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/1N291V302m2S"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907702},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:15Z"}]},{"href":"https://api.getcloudapp.com/drops/21907698","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/JOI3"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907698},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:11Z"}]},{"href":"https://api.getcloudapp.com/drops/21907697","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/3U1Q170u0g2b"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907697},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:09Z"}]},{"href":"https://api.getcloudapp.com/drops/21907695","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/3Q313d440a3B"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/3Q313d440a3B"},{"rel":"embed","href":"http://cl.ly/image/3Q313d440a3B/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/3Q313d440a3B/download/favicon.ico"}],"data":[{"name":"id","value":21907695},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:06Z"}]},{"href":"https://api.getcloudapp.com/drops/21907694","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/02073a0O3m0F"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907694},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:04Z"}]},{"href":"https://api.getcloudapp.com/drops/21907693","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/JNym"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907693},{"name":"name","value":"New
85
+ Drop Name"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:02Z"}]},{"href":"https://api.getcloudapp.com/drops/21907691","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/JNxB"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/JNxB"},{"rel":"embed","href":"http://cl.ly/JNxB/favicon.ico"},{"rel":"download","href":"http://cl.ly/JNxB/download/favicon.ico"}],"data":[{"name":"id","value":21907691},{"name":"name","value":"favicon.ico"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:01Z"}]},{"href":"https://api.getcloudapp.com/drops/21907690","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/1o3e271l1G0n"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/1o3e271l1G0n"},{"rel":"embed","href":"http://cl.ly/image/1o3e271l1G0n/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/1o3e271l1G0n/download/favicon.ico"}],"data":[{"name":"id","value":21907690},{"name":"name","value":"New
86
+ File"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:59Z"}]},{"href":"https://api.getcloudapp.com/drops/21907688","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/0o2S0W1n2L30"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/0o2S0W1n2L30"},{"rel":"embed","href":"http://cl.ly/image/0o2S0W1n2L30/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/0o2S0W1n2L30/download/favicon.ico"}],"data":[{"name":"id","value":21907688},{"name":"name","value":"favicon.ico"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:57Z"}]},{"href":"https://api.getcloudapp.com/drops/21907686","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/JNXA"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907686},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":false},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:56Z"}]},{"href":"https://api.getcloudapp.com/drops/21907685","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2k1L0G2U2z0I"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907685},{"name":"name","value":"New
87
+ Bookmark"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:55Z"}]},{"href":"https://api.getcloudapp.com/drops/21907683","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/0e0E2w0w0T0U"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907683},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:54Z"}]},{"href":"https://api.getcloudapp.com/drops/21907682","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2x3S331L1a3o"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907682},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:52Z"}]},{"href":"https://api.getcloudapp.com/drops/21907679","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/1G282W04401a"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907679},{"name":"name","value":"http://cl.ly"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:47Z"}]},{"href":"https://api.getcloudapp.com/drops/21907678","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/image/1u232n412l14"},{"rel":"icon","href":"https://thumbs.getcloudapp.com/1u232n412l14"},{"rel":"embed","href":"http://cl.ly/image/1u232n412l14/favicon.ico"},{"rel":"download","href":"http://cl.ly/image/1u232n412l14/download/favicon.ico"}],"data":[{"name":"id","value":21907678},{"name":"name","value":"favicon.ico"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:46:45Z"}]}]}}'
88
+ http_version:
89
+ recorded_at: Tue, 11 Sep 2012 15:47:16 GMT
90
+ - request:
91
+ method: post
92
+ uri: https://api.getcloudapp.com/drops
93
+ body:
94
+ encoding: UTF-8
95
+ string: ! '{"name":null,"private":true,"trash":false,"bookmark_url":"http://getcloudapp.com","file_size":null}'
96
+ headers:
97
+ Authorization:
98
+ - Token token="abc123"
99
+ Content-Type:
100
+ - application/json
101
+ Accept:
102
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
103
+ text/plain
104
+ User-Agent:
105
+ - Ruby
106
+ response:
107
+ status:
108
+ code: 201
109
+ message: Created
110
+ headers:
111
+ Cache-Control:
112
+ - max-age=0, private, must-revalidate
113
+ Content-Type:
114
+ - application/vnd.collection+json; charset=utf-8
115
+ Etag:
116
+ - ! '"1bb36e64f8cfb0cf08f5e9e5a760391f"'
117
+ Server:
118
+ - thin 1.4.1 codename Chromeo
119
+ Set-Cookie:
120
+ - _engine_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJThmMjY5MWZhOTVhNjJjMzYyNzM4MTBkYjdhMGIxMmFiBjsAVA%3D%3D--917d10dee3828855f8be6fb24e2185224fa1af23;
121
+ path=/; HttpOnly
122
+ X-Runtime:
123
+ - '0.047992'
124
+ X-Ua-Compatible:
125
+ - IE=Edge,chrome=1
126
+ Content-Length:
127
+ - '1005'
128
+ Connection:
129
+ - keep-alive
130
+ body:
131
+ encoding: US-ASCII
132
+ string: ! '{"collection":{"version":"1.0","href":"https://api.getcloudapp.com/drops","links":[{"rel":"drops-stream","href":"https://api.getcloudapp.com/drops/stream"}],"queries":[{"href":"https://api.getcloudapp.com/drops","rel":"drops-list","data":[{"name":"filter","value":"active"},{"name":"limit","value":20}]}],"template":{"data":[{"name":"name","value":null},{"name":"private","value":true},{"name":"trash","value":false},{"name":"bookmark_url","value":null},{"name":"file_size","value":null}]},"items":[{"href":"https://api.getcloudapp.com/drops/21907703","links":[{"rel":"collection","href":"https://api.getcloudapp.com/drops"},{"rel":"canonical","href":"http://cl.ly/2E3k2Z3Z2J2m"},{"rel":"icon","href":"https://d9yac136u048z.cloudfront.net/images/thumbnails/bookmark.png"}],"data":[{"name":"id","value":21907703},{"name":"name","value":"http://getcloudapp.com"},{"name":"private","value":true},{"name":"trash","value":false},{"name":"views","value":0},{"name":"created","value":"2012-09-11T15:47:17Z"}]}]}}'
133
+ http_version:
134
+ recorded_at: Tue, 11 Sep 2012 15:47:16 GMT
135
+ - request:
136
+ method: delete
137
+ uri: https://api.getcloudapp.com/drops/21907703
138
+ body:
139
+ encoding: US-ASCII
140
+ string: ''
141
+ headers:
142
+ Authorization:
143
+ - Token token="abc123"
144
+ Accept:
145
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
146
+ text/plain
147
+ User-Agent:
148
+ - Ruby
149
+ response:
150
+ status:
151
+ code: 204
152
+ message: No Content
153
+ headers:
154
+ Cache-Control:
155
+ - no-cache
156
+ Server:
157
+ - thin 1.4.1 codename Chromeo
158
+ Set-Cookie:
159
+ - _engine_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTU5MWM1YTFhMmY5YTgxYTliOWRmMzZlY2UzMTI1NTk5BjsAVA%3D%3D--9dc0410382b54dc5989fc0a8d4d418ca56836f96;
160
+ path=/; HttpOnly
161
+ X-Runtime:
162
+ - '0.049071'
163
+ X-Ua-Compatible:
164
+ - IE=Edge,chrome=1
165
+ Connection:
166
+ - keep-alive
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ http_version:
171
+ recorded_at: Tue, 11 Sep 2012 15:47:16 GMT
172
+ - request:
173
+ method: get
174
+ uri: https://api.getcloudapp.com/drops/21907703
175
+ body:
176
+ encoding: US-ASCII
177
+ string: ''
178
+ headers:
179
+ Authorization:
180
+ - Token token="abc123"
181
+ Accept:
182
+ - application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
183
+ text/plain
184
+ Accept-Encoding:
185
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
186
+ User-Agent:
187
+ - Ruby
188
+ response:
189
+ status:
190
+ code: 404
191
+ message: Not Found
192
+ headers:
193
+ Content-Type:
194
+ - text/html; charset=utf-8
195
+ Server:
196
+ - thin 1.4.1 codename Chromeo
197
+ X-Runtime:
198
+ - '0.016841'
199
+ Content-Length:
200
+ - '600'
201
+ Connection:
202
+ - keep-alive
203
+ body:
204
+ encoding: US-ASCII
205
+ string: ! "<!doctype html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n\n
206
+ \ <title>CloudApp &mdash; Not Found</title>\n\n <link href='/favicon.ico'
207
+ rel='shortcut icon' />\n <link href=\"/stylesheets/application/error.css\"
208
+ rel=\"stylesheet\" type=\"text/css\" />\n\n <!--[if lt IE 9]>\n <script
209
+ src=\"//html5shim.googlecode.com/svn/trunk/html5.js\"></script>\n <![endif]-->\n
210
+ \ </head>\n\n <body>\n <div class=\"wrapper\">\n <h1>Cloud<em>App</em></h1>\n\n
211
+ \ <h2>Sorry, nothing lives here.</h2>\n\n <p>\n Perhaps the
212
+ link you clicked was broken or we messed up.\n </p>\n </div>\n </body>\n</html>\n"
213
+ http_version:
214
+ recorded_at: Tue, 11 Sep 2012 15:47:16 GMT
215
+ recorded_with: VCR 2.0.1