cloudapp 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/bin/cloudapp +16 -23
- data/cloudapp.gemspec +4 -3
- data/lib/cloudapp/drop_service.rb +30 -11
- data/lib/cloudapp.rb +1 -1
- data/spec/cassettes/DropService/create_bookmark.yml +29 -87
- data/spec/cassettes/DropService/create_bookmark_with_bad_credentials.yml +8 -16
- data/spec/cassettes/DropService/create_bookmark_with_name.yml +25 -30
- data/spec/cassettes/DropService/create_private_bookmark.yml +24 -38
- data/spec/cassettes/DropService/create_public_bookmark.yml +25 -41
- data/spec/cassettes/DropService/list_drops.yml +18 -24
- data/spec/cassettes/DropService/list_drops_with_bad_credentials.yml +8 -16
- data/spec/cassettes/DropService/list_drops_with_limit.yml +17 -23
- data/spec/cassettes/DropService/list_trash.yml +20 -26
- data/spec/cassettes/DropService/list_trash_with_bad_credentials.yml +10 -19
- data/spec/cassettes/DropService/retrieve_token.yml +42 -0
- data/spec/cassettes/DropService/retrieve_token_with_bad_credentials.yml +43 -0
- data/spec/cassettes/DropService/upload_file.yml +67 -72
- data/spec/cassettes/DropService/upload_public_file.yml +47 -66
- data/spec/cloudapp/drop_service_spec.rb +78 -72
- metadata +26 -25
- data/lib/cloudapp/digestable_typhoeus.rb +0 -17
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cloudapp (0.0.
|
4
|
+
cloudapp (0.0.15)
|
5
5
|
addressable
|
6
6
|
faraday (~> 0.8.0.rc2)
|
7
7
|
gli
|
@@ -35,7 +35,7 @@ GEM
|
|
35
35
|
link_header (0.0.5)
|
36
36
|
mime-types (1.17.2)
|
37
37
|
multi_json (1.0.4)
|
38
|
-
multipart-post (1.1.
|
38
|
+
multipart-post (1.1.5)
|
39
39
|
mustache (0.99.4)
|
40
40
|
rake (0.9.2.2)
|
41
41
|
rdiscount (1.6.8)
|
data/bin/cloudapp
CHANGED
@@ -10,32 +10,33 @@ require 'yaml'
|
|
10
10
|
require 'cloudapp'
|
11
11
|
require 'cloudapp/drop_presenter'
|
12
12
|
require 'cloudapp/drop_service'
|
13
|
-
require 'cloudapp/identity'
|
14
13
|
|
15
14
|
|
16
15
|
def service
|
17
|
-
CloudApp::DropService.
|
18
|
-
|
19
|
-
|
16
|
+
CloudApp::DropService.using_token token
|
17
|
+
end
|
18
|
+
|
19
|
+
def token_for_account(email, password)
|
20
|
+
CloudApp::DropService.retrieve_token email, password
|
20
21
|
end
|
21
22
|
|
22
23
|
def config_file
|
23
24
|
File.expand_path '~/.cloudapprc'
|
24
25
|
end
|
25
26
|
|
26
|
-
def
|
27
|
+
def token
|
27
28
|
return unless File.exist?(config_file)
|
28
29
|
config = File.open(config_file) {|file| YAML::load(file) }
|
29
|
-
|
30
|
+
config[:token]
|
30
31
|
end
|
31
32
|
|
32
|
-
def
|
33
|
+
def save_token(token)
|
33
34
|
File.open(config_file, 'w', 0600) do |file|
|
34
|
-
YAML.dump({
|
35
|
+
YAML.dump({ token: token }, file)
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
38
|
-
def
|
39
|
+
def clear_token
|
39
40
|
return unless File.exist?(config_file)
|
40
41
|
File.delete(config_file)
|
41
42
|
end
|
@@ -44,24 +45,16 @@ def color(*args)
|
|
44
45
|
HighLine.new.color *args
|
45
46
|
end
|
46
47
|
|
47
|
-
def plain_text_credentials_warning
|
48
|
-
"""
|
49
|
-
#{ color('WARNING', :bold) }
|
50
|
-
Your credentials are stored #{ color('in plain text', :bold) } at ~/.cloudapprc. If this worries you,
|
51
|
-
keep an eye on issue #10 (https://github.com/cloudapp/cloudapp/issues/10). Some
|
52
|
-
sort of non-plaintext authentication is planned before 1.0 is released.
|
53
|
-
"""
|
54
|
-
end
|
55
|
-
|
56
48
|
def check_for_credentials
|
57
|
-
return unless
|
49
|
+
return unless token.nil?
|
58
50
|
|
59
|
-
$stdout.puts
|
60
|
-
'Sign into your CloudApp account.' ]
|
51
|
+
$stdout.puts 'Sign into your CloudApp account.'
|
61
52
|
|
62
53
|
email = HighLine.new.ask('Email: ')
|
63
54
|
password = HighLine.new.ask('Password: ') {|q| q.echo = false }
|
64
|
-
|
55
|
+
token = CloudApp::DropService.retrieve_token email, password
|
56
|
+
|
57
|
+
save_token token
|
65
58
|
end
|
66
59
|
|
67
60
|
def format_from(global_options)
|
@@ -178,7 +171,7 @@ end
|
|
178
171
|
on_error do |e|
|
179
172
|
if CloudApp::DropService::UNAUTHORIZED === e
|
180
173
|
$stderr.puts color('Email and password given are incorrect.', :bold)
|
181
|
-
|
174
|
+
clear_token
|
182
175
|
false
|
183
176
|
else
|
184
177
|
true
|
data/cloudapp.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'cloudapp'
|
16
|
-
s.version = '0.0.
|
17
|
-
s.date = '2012-02-
|
16
|
+
s.version = '0.0.15'
|
17
|
+
s.date = '2012-02-14'
|
18
18
|
s.rubyforge_project = 'cloudapp'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -71,7 +71,6 @@ Gem::Specification.new do |s|
|
|
71
71
|
bin/cloudapp
|
72
72
|
cloudapp.gemspec
|
73
73
|
lib/cloudapp.rb
|
74
|
-
lib/cloudapp/digestable_typhoeus.rb
|
75
74
|
lib/cloudapp/drop.rb
|
76
75
|
lib/cloudapp/drop_presenter.rb
|
77
76
|
lib/cloudapp/drop_service.rb
|
@@ -89,6 +88,8 @@ Gem::Specification.new do |s|
|
|
89
88
|
spec/cassettes/DropService/list_drops_with_limit.yml
|
90
89
|
spec/cassettes/DropService/list_trash.yml
|
91
90
|
spec/cassettes/DropService/list_trash_with_bad_credentials.yml
|
91
|
+
spec/cassettes/DropService/retrieve_token.yml
|
92
|
+
spec/cassettes/DropService/retrieve_token_with_bad_credentials.yml
|
92
93
|
spec/cassettes/DropService/upload_file.yml
|
93
94
|
spec/cassettes/DropService/upload_public_file.yml
|
94
95
|
spec/cloudapp/drop_presenter_spec.rb
|
@@ -1,15 +1,16 @@
|
|
1
1
|
require 'leadlight'
|
2
2
|
require 'addressable/uri'
|
3
|
-
require 'cloudapp/digestable_typhoeus'
|
4
3
|
require 'cloudapp/drop'
|
5
4
|
|
6
5
|
# Leadlight service for mucking about with drops in the CloudApp API.
|
7
6
|
#
|
8
7
|
# Usage:
|
9
8
|
#
|
10
|
-
# #
|
11
|
-
#
|
12
|
-
#
|
9
|
+
# # Retrieve an account's token
|
10
|
+
# token = DropSerivce.retrieve_token 'arthur@dent.com', 'towel'
|
11
|
+
#
|
12
|
+
# # Create a new service passing CloudApp account token:
|
13
|
+
# service = DropSerivce.using_token token
|
13
14
|
#
|
14
15
|
# # List all drops:
|
15
16
|
# service.drops
|
@@ -46,7 +47,7 @@ module CloudApp
|
|
46
47
|
Leadlight.build_connection_common do |c|
|
47
48
|
c.request :multipart
|
48
49
|
c.request :url_encoded
|
49
|
-
c.adapter :
|
50
|
+
c.adapter :typhoeus
|
50
51
|
end
|
51
52
|
|
52
53
|
Leadlight.build_service(self) do
|
@@ -106,17 +107,35 @@ module CloudApp
|
|
106
107
|
end
|
107
108
|
end
|
108
109
|
|
109
|
-
def
|
110
|
-
|
111
|
-
|
110
|
+
def initialize(*args)
|
111
|
+
super
|
112
|
+
logger.level = Logger::WARN
|
112
113
|
end
|
113
114
|
|
114
|
-
def self.
|
115
|
-
new
|
116
|
-
service.
|
115
|
+
def self.using_token(token)
|
116
|
+
new.tap do |service|
|
117
|
+
service.token = token
|
117
118
|
end
|
118
119
|
end
|
119
120
|
|
121
|
+
def self.retrieve_token(email, password)
|
122
|
+
new.token email, password
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
def token=(token)
|
127
|
+
connection.token_auth token
|
128
|
+
end
|
129
|
+
|
130
|
+
def token(email, password)
|
131
|
+
post('/account/token', {}, { email: email, password: password }).
|
132
|
+
raise_on_error.submit_and_wait do |response|
|
133
|
+
return response['token']
|
134
|
+
end
|
135
|
+
rescue MultiJson::DecodeError => e
|
136
|
+
raise UNAUTHORIZED
|
137
|
+
end
|
138
|
+
|
120
139
|
def drops(count = 20)
|
121
140
|
root.paginated_drops(per_page: count)['items'].map do |drop_data|
|
122
141
|
Drop.new drop_data
|
data/lib/cloudapp.rb
CHANGED
@@ -2,69 +2,56 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://my.cl.ly/
|
6
6
|
body: ''
|
7
7
|
headers:
|
8
|
+
Authorization:
|
9
|
+
- Token token="8762f6679f8d001016b2"
|
8
10
|
Accept:
|
9
11
|
- application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
|
10
12
|
text/plain
|
11
13
|
response:
|
12
14
|
status:
|
13
15
|
code: 200
|
14
|
-
message:
|
16
|
+
message: OK
|
15
17
|
headers:
|
16
18
|
Cache-Control:
|
17
19
|
- max-age=0, private, must-revalidate
|
18
|
-
- no-cache
|
19
20
|
Content-Type:
|
20
21
|
- application/json; charset=utf-8
|
21
|
-
|
22
|
+
Etag:
|
23
|
+
- ! '"857fd84f26ef95ce47d9d41d1b235cf8"'
|
24
|
+
Last-Modified:
|
25
|
+
- Tue, 14 Feb 2012 14:24:16 GMT
|
22
26
|
Server:
|
23
|
-
- thin 1.
|
24
|
-
- thin 1.2.11 codename Bat-Shit Crazy
|
25
|
-
Www-Authenticate:
|
26
|
-
- Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTMyODU0ODcyNTowMjVlMDlhMWM1ZTAzNDAzNmZhNzBhMTZiMjNmOGRjOA==",
|
27
|
-
opaque="9eb56ccb2e8b017ae42bdb4739690863"
|
27
|
+
- thin 1.3.1 codename Triple Espresso
|
28
28
|
X-Runtime:
|
29
|
-
- '0.
|
30
|
-
- '0.177340'
|
29
|
+
- '0.087165'
|
31
30
|
X-Ua-Compatible:
|
32
31
|
- IE=Edge,chrome=1
|
33
|
-
- IE=Edge,chrome=1
|
34
32
|
Transfer-Encoding:
|
35
33
|
- chunked
|
36
|
-
- chunked
|
37
34
|
Connection:
|
38
35
|
- keep-alive
|
39
|
-
|
40
|
-
Etag:
|
41
|
-
- ! '"7627909c5075c221977952673420bd4b"'
|
42
|
-
Last-Modified:
|
43
|
-
- Mon, 06 Feb 2012 17:15:02 GMT
|
44
|
-
Set-Cookie:
|
45
|
-
- _engine_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlYzExNDk0N2JkYTE5MmJmMWFlMDA0NTRmZjgzM2JmMGNJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYAxYTM5Mjg4MzhlZDcwY2UyOGVkYWRkOGE1MDU2NWU1MzFlNzlhOTg4ODQxZmY5NTkxMjAzNWNhYTU1ZmIxZTZhODliMmMzN2VlYzkzMzFmOWE2ZDRjN2Y1ZDM4ZDIwNGE5NjM1ZTI0YTAxNzM1NDNiYThkNDlhNDkxY2M5NDM3MAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkDp4EB--9680bc44604bbba4d002934ccf9e14a751130def;
|
46
|
-
path=/; HttpOnly
|
47
|
-
- user_credentials=1a3928838ed70ce28edadd8a50565e531e79a988841ff95912035caa55fb1e6a89b2c37eec9331f9a6d4c7f5d38d204a9635e24a0173543ba8d49a491cc94370%3A%3A98727;
|
48
|
-
path=/; expires=Sun, 06-May-2012 17:18:45 GMT
|
49
|
-
body: ! '[{"created_at":"2012-02-06T17:14:45Z","deleted_at":null,"id":14878865,"item_type":"bookmark","name":null,"private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-06T17:14:45Z","view_counter":0,"href":"http://my.cl.ly/items/14878865","url":"http://cl.ly/1U2a1B460N0V2o1j391i","content_url":"http://cl.ly/1U2a1B460N0V2o1j391i","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-02-06T17:04:10Z","deleted_at":null,"id":14878378,"item_type":"bookmark","name":null,"private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-06T17:04:10Z","view_counter":0,"href":"http://my.cl.ly/items/14878378","url":"http://cl.ly/1B2q2C1l1m2j0y0b320x","content_url":"http://cl.ly/1B2q2C1l1m2j0y0b320x","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:49:23Z","deleted_at":null,"id":13950097,"item_type":"image","name":"favicon.ico","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/favicon.ico","source":"Mozilla/5.0
|
36
|
+
body: ! '[{"created_at":"2012-01-12T20:49:23Z","deleted_at":null,"id":13950097,"item_type":"image","name":"favicon.ico","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/favicon.ico","source":"Mozilla/5.0
|
50
37
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
51
|
-
Safari/535.7","updated_at":"2012-
|
38
|
+
Safari/535.7","updated_at":"2012-02-07T15:34:17Z","view_counter":3,"href":"http://my.cl.ly/items/13950097","url":"http://cl.ly/0P281s1u1J1p47241B3o","content_url":"http://cl.ly/0P281s1u1J1p47241B3o/favicon.ico","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/0P281s1u1J1p47241B3o","subscribed":false,"download_url":"http://api.cld.me/0P281s1u1J1p47241B3o/download/favicon.ico"},{"created_at":"2012-01-12T20:49:13Z","deleted_at":null,"id":13950087,"item_type":"image","name":"\u00f8\u00e6\u00d8\u00fc\u00f6\u00e4\u00df!?&+-.jpeg","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg","source":"Mozilla/5.0
|
52
39
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
53
40
|
Safari/535.7","updated_at":"2012-01-18T23:25:10Z","view_counter":6,"href":"http://my.cl.ly/items/13950087","url":"http://cl.ly/2n3a3S3f0J2w3X453r3L","content_url":"http://cl.ly/2n3a3S3f0J2w3X453r3L/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/2n3a3S3f0J2w3X453r3L","subscribed":false,"download_url":"http://api.cld.me/2n3a3S3f0J2w3X453r3L/download/%C3%B8%C3%A6%C3%98%C3%BC%C3%B6%C3%A4%C3%9F!%3F&%2B-.jpeg"},{"created_at":"2012-01-12T20:48:03Z","deleted_at":null,"id":13950015,"item_type":"bookmark","name":"The
|
54
41
|
Hitchhiker''s Guide to the Galaxy","private":true,"redirect_url":"http://en.wikipedia.org/wiki/The_Hitchhiker''s_Guide_to_the_Galaxy","remote_url":null,"source":"Mozilla/5.0
|
55
42
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
56
|
-
Safari/535.7","updated_at":"2012-
|
43
|
+
Safari/535.7","updated_at":"2012-02-07T15:34:23Z","view_counter":4,"href":"http://my.cl.ly/items/13950015","url":"http://cl.ly/3I28311d3n3S0x3R3k2Y","content_url":"http://cl.ly/3I28311d3n3S0x3R3k2Y","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:45:24Z","deleted_at":null,"id":13949886,"item_type":"audio","name":"Epic
|
57
44
|
Sax Guy NES Remix.mp3","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Epic%20Sax%20Guy%20NES%20Remix.mp3","source":"Mozilla/5.0
|
58
45
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
59
46
|
Safari/535.7","updated_at":"2012-01-12T20:45:24Z","view_counter":0,"href":"http://my.cl.ly/items/13949886","url":"http://cl.ly/322M3q1t261o30012s32","content_url":"http://cl.ly/322M3q1t261o30012s32/Epic%20Sax%20Guy%20NES%20Remix.mp3","icon":"http://assets.my.cld.me/images/item-types/audio.png","subscribed":false,"download_url":"http://api.cld.me/322M3q1t261o30012s32/download/Epic%20Sax%20Guy%20NES%20Remix.mp3"},{"created_at":"2012-01-12T20:45:05Z","deleted_at":null,"id":13949869,"item_type":"text","name":"2011-05-03-cloudapp-1.5-released.md","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/2011-05-03-cloudapp-1.5-released.md","source":"Mozilla/5.0
|
60
47
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
61
|
-
Safari/535.7","updated_at":"2012-02-
|
48
|
+
Safari/535.7","updated_at":"2012-02-07T15:35:28Z","view_counter":4,"href":"http://my.cl.ly/items/13949869","url":"http://cl.ly/0s1o3A46290S1s331G28","content_url":"http://cl.ly/0s1o3A46290S1s331G28/2011-05-03-cloudapp-1.5-released.md","icon":"http://assets.my.cld.me/images/item-types/text.png","subscribed":false,"download_url":"http://api.cld.me/0s1o3A46290S1s331G28/download/2011-05-03-cloudapp-1.5-released.md"},{"created_at":"2012-01-12T20:44:58Z","deleted_at":null,"id":13949858,"item_type":"image","name":"Cover.jpeg","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Cover.jpeg","source":"Mozilla/5.0
|
62
49
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
63
|
-
Safari/535.7","updated_at":"2012-
|
50
|
+
Safari/535.7","updated_at":"2012-02-07T15:34:41Z","view_counter":1,"href":"http://my.cl.ly/items/13949858","url":"http://cl.ly/1x200A0m3v101d1n2O1u","content_url":"http://cl.ly/1x200A0m3v101d1n2O1u/Cover.jpeg","icon":"http://assets.my.cld.me/images/item-types/image.png","thumbnail_url":"http://thumbs.cl.ly/1x200A0m3v101d1n2O1u","subscribed":false,"download_url":"http://api.cld.me/1x200A0m3v101d1n2O1u/download/Cover.jpeg"},{"created_at":"2012-01-12T20:44:54Z","deleted_at":null,"id":13949855,"item_type":"text","name":"Chapter
|
64
51
|
1.md","private":true,"redirect_url":null,"remote_url":"http://f.cl.ly/items/0p2t030e0a1N091o2t3o/Chapter%201.md","source":"Mozilla/5.0
|
65
52
|
(Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75
|
66
|
-
Safari/535.7","updated_at":"2012-02-
|
67
|
-
40","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-
|
53
|
+
Safari/535.7","updated_at":"2012-02-10T02:09:36Z","view_counter":8,"href":"http://my.cl.ly/items/13949855","url":"http://cl.ly/3U3d3w3r0G0T1T1M0d2T","content_url":"http://cl.ly/3U3d3w3r0G0T1T1M0d2T/Chapter%201.md","icon":"http://assets.my.cld.me/images/item-types/text.png","subscribed":false,"download_url":"http://api.cld.me/3U3d3w3r0G0T1T1M0d2T/download/Chapter%201.md"},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949577,"item_type":"bookmark","name":"Link
|
54
|
+
40","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-07T15:35:45Z","view_counter":3,"href":"http://my.cl.ly/items/13949577","url":"http://cl.ly/2O2J1h3t0H0v1I1u0t0P","content_url":"http://cl.ly/2O2J1h3t0H0v1I1u0t0P","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949576,"item_type":"bookmark","name":"Link
|
68
55
|
39","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949576","url":"http://cl.ly/2t062C1h393d2L452U2Z","content_url":"http://cl.ly/2t062C1h393d2L452U2Z","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949575,"item_type":"bookmark","name":"Link
|
69
56
|
38","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949575","url":"http://cl.ly/1S131o2v2J3z2r0A0Q0W","content_url":"http://cl.ly/1S131o2v2J3z2r0A0Q0W","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949574,"item_type":"bookmark","name":"Link
|
70
57
|
37","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949574","url":"http://cl.ly/423a3W361X1l1i2w0q30","content_url":"http://cl.ly/423a3W361X1l1i2w0q30","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949573,"item_type":"bookmark","name":"Link
|
@@ -74,16 +61,20 @@ http_interactions:
|
|
74
61
|
33","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949570","url":"http://cl.ly/1W2f000i091B2128303J","content_url":"http://cl.ly/1W2f000i091B2128303J","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:04Z","deleted_at":null,"id":13949568,"item_type":"bookmark","name":"Link
|
75
62
|
32","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:04Z","view_counter":0,"href":"http://my.cl.ly/items/13949568","url":"http://cl.ly/333d0V1B403M0d2f2o09","content_url":"http://cl.ly/333d0V1B403M0d2f2o09","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949567,"item_type":"bookmark","name":"Link
|
76
63
|
31","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949567","url":"http://cl.ly/260m2h3T0O2P272k2F3h","content_url":"http://cl.ly/260m2h3T0O2P272k2F3h","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949566,"item_type":"bookmark","name":"Link
|
77
|
-
30","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949566","url":"http://cl.ly/411H1g1a3y2T2B3U322x","content_url":"http://cl.ly/411H1g1a3y2T2B3U322x","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false}
|
64
|
+
30","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949566","url":"http://cl.ly/411H1g1a3y2T2B3U322x","content_url":"http://cl.ly/411H1g1a3y2T2B3U322x","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949565,"item_type":"bookmark","name":"Link
|
65
|
+
29","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949565","url":"http://cl.ly/3B1V3H0c0c3s3O2u1Q0c","content_url":"http://cl.ly/3B1V3H0c0c3s3O2u1Q0c","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false},{"created_at":"2012-01-12T20:39:03Z","deleted_at":null,"id":13949564,"item_type":"bookmark","name":"Link
|
66
|
+
28","private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-01-12T20:39:03Z","view_counter":0,"href":"http://my.cl.ly/items/13949564","url":"http://cl.ly/1w2e1K3j0T14193P2y1j","content_url":"http://cl.ly/1w2e1K3j0T14193P2y1j","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false}]'
|
78
67
|
http_version:
|
79
|
-
recorded_at:
|
68
|
+
recorded_at: Tue, 14 Feb 2012 14:35:01 GMT
|
80
69
|
- request:
|
81
70
|
method: post
|
82
|
-
uri: http://
|
71
|
+
uri: http://my.cl.ly/items?api_version=1.2
|
83
72
|
body: ! '{"item":{"redirect_url":"http://getcloudapp.com"}}'
|
84
73
|
headers:
|
85
74
|
Content-Type:
|
86
75
|
- application/json
|
76
|
+
Authorization:
|
77
|
+
- Token token="8762f6679f8d001016b2"
|
87
78
|
Accept:
|
88
79
|
- application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
|
89
80
|
text/plain
|
@@ -97,67 +88,18 @@ http_interactions:
|
|
97
88
|
Content-Type:
|
98
89
|
- application/json; charset=utf-8
|
99
90
|
Etag:
|
100
|
-
- ! '"
|
91
|
+
- ! '"ac70569a55f8f0d602f4322ce4b40da4"'
|
101
92
|
Server:
|
102
|
-
- thin 1.
|
103
|
-
Set-Cookie:
|
104
|
-
- _engine_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRiIlYTAzNDE0ZWM0MWY4YjQ3YzViODJkYjhmZTE3YzViOTdJIhV1c2VyX2NyZWRlbnRpYWxzBjsARkkiAYAxYTM5Mjg4MzhlZDcwY2UyOGVkYWRkOGE1MDU2NWU1MzFlNzlhOTg4ODQxZmY5NTkxMjAzNWNhYTU1ZmIxZTZhODliMmMzN2VlYzkzMzFmOWE2ZDRjN2Y1ZDM4ZDIwNGE5NjM1ZTI0YTAxNzM1NDNiYThkNDlhNDkxY2M5NDM3MAY7AFRJIhh1c2VyX2NyZWRlbnRpYWxzX2lkBjsARmkDp4EB--ac346691b95bf1fbb9ae4398c3f57e1fb603e89f;
|
105
|
-
path=/; HttpOnly
|
106
|
-
- user_credentials=1a3928838ed70ce28edadd8a50565e531e79a988841ff95912035caa55fb1e6a89b2c37eec9331f9a6d4c7f5d38d204a9635e24a0173543ba8d49a491cc94370%3A%3A98727;
|
107
|
-
path=/; expires=Sun, 06-May-2012 17:18:46 GMT
|
93
|
+
- thin 1.3.1 codename Triple Espresso
|
108
94
|
X-Runtime:
|
109
|
-
- '0.
|
95
|
+
- '0.057528'
|
110
96
|
X-Ua-Compatible:
|
111
97
|
- IE=Edge,chrome=1
|
112
98
|
Transfer-Encoding:
|
113
99
|
- chunked
|
114
100
|
Connection:
|
115
101
|
- keep-alive
|
116
|
-
body: ! '{"created_at":"2012-02-
|
117
|
-
http_version:
|
118
|
-
recorded_at: Mon, 06 Feb 2012 17:18:46 GMT
|
119
|
-
- request:
|
120
|
-
method: get
|
121
|
-
uri: http://arthur%40dent.com:towel@my.cl.ly/
|
122
|
-
body: ''
|
123
|
-
headers:
|
124
|
-
Accept:
|
125
|
-
- application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
|
126
|
-
text/plain
|
127
|
-
response:
|
128
|
-
status:
|
129
|
-
code: 401
|
130
|
-
message: Unauthorized
|
131
|
-
headers:
|
132
|
-
Cache-Control:
|
133
|
-
- no-cache
|
134
|
-
- no-cache
|
135
|
-
Content-Type:
|
136
|
-
- application/json; charset=utf-8
|
137
|
-
- application/json; charset=utf-8
|
138
|
-
Server:
|
139
|
-
- thin 1.2.11 codename Bat-Shit Crazy
|
140
|
-
- thin 1.2.11 codename Bat-Shit Crazy
|
141
|
-
Www-Authenticate:
|
142
|
-
- Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTMyODU0ODczNjo2MmU4ZTM1NDRhNGQxNDQ5NDY1NTE4Y2M2NGI2NTMwNQ==",
|
143
|
-
opaque="9eb56ccb2e8b017ae42bdb4739690863"
|
144
|
-
- Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTMyODU0ODczNjo2MmU4ZTM1NDRhNGQxNDQ5NDY1NTE4Y2M2NGI2NTMwNQ==",
|
145
|
-
opaque="9eb56ccb2e8b017ae42bdb4739690863"
|
146
|
-
X-Runtime:
|
147
|
-
- '0.002251'
|
148
|
-
- '0.004127'
|
149
|
-
X-Ua-Compatible:
|
150
|
-
- IE=Edge,chrome=1
|
151
|
-
- IE=Edge,chrome=1
|
152
|
-
Transfer-Encoding:
|
153
|
-
- chunked
|
154
|
-
- chunked
|
155
|
-
Connection:
|
156
|
-
- keep-alive
|
157
|
-
- keep-alive
|
158
|
-
body: ! 'HTTP Digest: Access denied.
|
159
|
-
|
160
|
-
'
|
102
|
+
body: ! '{"created_at":"2012-02-14T14:35:01Z","deleted_at":null,"id":15182703,"item_type":"bookmark","name":null,"private":true,"redirect_url":"http://getcloudapp.com","remote_url":null,"source":null,"updated_at":"2012-02-14T14:35:01Z","view_counter":0,"href":"http://my.cl.ly/items/15182703","url":"http://cl.ly/0F2c181b3Q30371t2F3g","content_url":"http://cl.ly/0F2c181b3Q30371t2F3g","icon":"http://assets.my.cld.me/images/item-types/bookmark.png","subscribed":false}'
|
161
103
|
http_version:
|
162
|
-
recorded_at:
|
104
|
+
recorded_at: Tue, 14 Feb 2012 14:35:01 GMT
|
163
105
|
recorded_with: VCR 2.0.0.rc1
|
@@ -2,9 +2,11 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://
|
5
|
+
uri: http://my.cl.ly/
|
6
6
|
body: ''
|
7
7
|
headers:
|
8
|
+
Authorization:
|
9
|
+
- Token token="bad-token"
|
8
10
|
Accept:
|
9
11
|
- application/json, text/x-yaml, application/xml, application/xhtml+xml, text/html,
|
10
12
|
text/plain
|
@@ -15,33 +17,23 @@ http_interactions:
|
|
15
17
|
headers:
|
16
18
|
Cache-Control:
|
17
19
|
- no-cache
|
18
|
-
- no-cache
|
19
20
|
Content-Type:
|
20
21
|
- application/json; charset=utf-8
|
21
|
-
- application/json; charset=utf-8
|
22
22
|
Server:
|
23
|
-
- thin 1.
|
24
|
-
- thin 1.2.11 codename Bat-Shit Crazy
|
23
|
+
- thin 1.3.1 codename Triple Espresso
|
25
24
|
Www-Authenticate:
|
26
|
-
-
|
27
|
-
opaque="9eb56ccb2e8b017ae42bdb4739690863"
|
28
|
-
- Digest realm="Application", qop="auth", algorithm=MD5, nonce="MTMyODkwOTU2MDplMzk2NTJkOWFkMTllYzljODkyNGQ5Yjc2MmRiN2I5Mg==",
|
29
|
-
opaque="9eb56ccb2e8b017ae42bdb4739690863"
|
25
|
+
- Token realm="Application"
|
30
26
|
X-Runtime:
|
31
|
-
- '0.
|
32
|
-
- '0.009808'
|
27
|
+
- '0.084830'
|
33
28
|
X-Ua-Compatible:
|
34
29
|
- IE=Edge,chrome=1
|
35
|
-
- IE=Edge,chrome=1
|
36
30
|
Transfer-Encoding:
|
37
31
|
- chunked
|
38
|
-
- chunked
|
39
32
|
Connection:
|
40
33
|
- keep-alive
|
41
|
-
|
42
|
-
body: ! 'HTTP Digest: Access denied.
|
34
|
+
body: ! 'HTTP Token: Access denied.
|
43
35
|
|
44
36
|
'
|
45
37
|
http_version:
|
46
|
-
recorded_at:
|
38
|
+
recorded_at: Tue, 14 Feb 2012 14:44:20 GMT
|
47
39
|
recorded_with: VCR 2.0.0.rc1
|