fileturn 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +6 -14
  2. data/.gitignore +1 -0
  3. data/README.md +49 -44
  4. data/fileturn.gemspec +1 -0
  5. data/lib/fileturn/errors.rb +14 -0
  6. data/lib/fileturn/http_client.rb +10 -8
  7. data/lib/fileturn/resources/account.rb +11 -35
  8. data/lib/fileturn/resources/conversion.rb +80 -0
  9. data/lib/fileturn/resources/resource.rb +0 -5
  10. data/lib/fileturn/version.rb +1 -1
  11. data/lib/fileturn.rb +6 -7
  12. data/spec/fileturn_spec.rb +5 -5
  13. data/spec/fixtures/vcr_cassettes/account_info.yml +24 -63
  14. data/spec/fixtures/vcr_cassettes/conversion_all_not_authorized.yml +48 -0
  15. data/spec/fixtures/vcr_cassettes/conversion_not_authorized.yml +48 -0
  16. data/spec/fixtures/vcr_cassettes/conversion_not_found.yml +48 -0
  17. data/spec/fixtures/vcr_cassettes/conversion_process_created.yml +52 -0
  18. data/spec/fixtures/vcr_cassettes/conversion_process_no_params.yml +97 -0
  19. data/spec/fixtures/vcr_cassettes/conversion_process_success.yml +50 -0
  20. data/spec/fixtures/vcr_cassettes/conversion_success.yml +50 -0
  21. data/spec/fixtures/vcr_cassettes/conversions_all.yml +50 -0
  22. data/spec/fixtures/vcr_cassettes/conversions_all_second.yml +97 -0
  23. data/spec/fixtures/vcr_cassettes/reload_.yml +52 -0
  24. data/spec/fixtures/vcr_cassettes/reload_done.yml +50 -0
  25. data/spec/resources/account_spec.rb +8 -23
  26. data/spec/resources/conversion_spec.rb +213 -0
  27. data/spec/resources/upload_spec.rb +35 -35
  28. data/spec/spec_helper.rb +1 -1
  29. data/spec/stub_http_client.rb +1 -1
  30. metadata +58 -61
  31. data/lib/fileturn/exceptions.rb +0 -30
  32. data/lib/fileturn/resources/file.rb +0 -112
  33. data/lib/fileturn/resources/notification.rb +0 -16
  34. data/spec/fixtures/vcr_cassettes/file_all.yml +0 -103
  35. data/spec/fixtures/vcr_cassettes/file_all_notifications.yml +0 -103
  36. data/spec/fixtures/vcr_cassettes/file_convert_no_params.yml +0 -87
  37. data/spec/fixtures/vcr_cassettes/file_convert_success.yml +0 -89
  38. data/spec/fixtures/vcr_cassettes/file_doesnt_upload_since_too_big.yml +0 -46
  39. data/spec/fixtures/vcr_cassettes/file_failed_.yml +0 -176
  40. data/spec/fixtures/vcr_cassettes/file_notifications.yml +0 -89
  41. data/spec/fixtures/vcr_cassettes/file_queued_.yml +0 -176
  42. data/spec/fixtures/vcr_cassettes/file_reload.yml +0 -132
  43. data/spec/fixtures/vcr_cassettes/file_success.yml +0 -89
  44. data/spec/fixtures/vcr_cassettes/file_success_.yml +0 -176
  45. data/spec/fixtures/vcr_cassettes/file_time_taken.yml +0 -176
  46. data/spec/fixtures/vcr_cassettes/file_unauthorized.yml +0 -87
  47. data/spec/fixtures/vcr_cassettes/file_upload_doc_queued.yml +0 -782
  48. data/spec/fixtures/vcr_cassettes/file_upload_not_enough_credits.yml +0 -130
  49. data/spec/fixtures/vcr_cassettes/file_upload_queued.yml +0 -203
  50. data/spec/fixtures/vcr_cassettes/upload_all.yml +0 -89
  51. data/spec/fixtures/vcr_cassettes/upload_one.yml +0 -89
  52. data/spec/fixtures/vcr_cassettes/upload_refetch.yml +0 -132
  53. data/spec/resources/file_spec.rb +0 -184
@@ -1,176 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.7
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - ! '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: ! 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - e734079bfd0a3441c4b398f72b2893db
31
- X-Runtime:
32
- - '0.010559'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
35
- Date:
36
- - Sun, 07 Jul 2013 22:46:58 GMT
37
- Content-Length:
38
- - '461'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
44
- http_version:
45
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
46
- - request:
47
- method: get
48
- uri: http://localhost:3000/api/files/154.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- User-Agent:
54
- - Faraday v0.8.7
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- Accept:
58
- - ! '*/*'
59
- response:
60
- status:
61
- code: 200
62
- message: ! 'OK '
63
- headers:
64
- Content-Type:
65
- - application/json; charset=utf-8
66
- X-Ua-Compatible:
67
- - IE=Edge
68
- Etag:
69
- - ! '"ccfff9a55b35efe35cc28aef5e5663b8"'
70
- Cache-Control:
71
- - max-age=0, private, must-revalidate
72
- X-Request-Id:
73
- - 788223c0a190f6cb51e0dad99555abf0
74
- X-Runtime:
75
- - '0.010913'
76
- Server:
77
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
78
- Date:
79
- - Sun, 07 Jul 2013 22:46:58 GMT
80
- Content-Length:
81
- - '290'
82
- Connection:
83
- - Keep-Alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"id":154,"url":"http://www.iiswc.org/iiswc2013/sample.docaa","convert_to":"pdf","created_at":"2013-07-06T01:18:31Z","status":"failed","download_url":"","notifications":[{"id":132,"details":"Invalid
87
- response code: 404","parsed_time":null,"status":"failed","time_taken":null,"file_id":154}]}'
88
- http_version:
89
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
90
- - request:
91
- method: get
92
- uri: http://localhost:3000/api/files/210.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
93
- body:
94
- encoding: US-ASCII
95
- string: ''
96
- headers:
97
- User-Agent:
98
- - Faraday v0.8.7
99
- Accept-Encoding:
100
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
101
- Accept:
102
- - ! '*/*'
103
- response:
104
- status:
105
- code: 200
106
- message: ! 'OK '
107
- headers:
108
- Content-Type:
109
- - application/json; charset=utf-8
110
- X-Ua-Compatible:
111
- - IE=Edge
112
- Etag:
113
- - ! '"23074bb4f5f1834341c4c7f1a6522ffd"'
114
- Cache-Control:
115
- - max-age=0, private, must-revalidate
116
- X-Request-Id:
117
- - 9250a099bde700a7e0319046326aef85
118
- X-Runtime:
119
- - '0.010272'
120
- Server:
121
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
122
- Date:
123
- - Sun, 07 Jul 2013 22:46:58 GMT
124
- Content-Length:
125
- - '196'
126
- Connection:
127
- - Keep-Alive
128
- body:
129
- encoding: US-ASCII
130
- string: ! '{"id":210,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T02:30:27Z","status":"queued","download_url":"","notifications":[]}'
131
- http_version:
132
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
133
- - request:
134
- method: get
135
- uri: http://fileturn.net/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
136
- body:
137
- encoding: US-ASCII
138
- string: ''
139
- headers:
140
- User-Agent:
141
- - Faraday v0.8.7
142
- Accept-Encoding:
143
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
144
- Accept:
145
- - ! '*/*'
146
- response:
147
- status:
148
- code: 401
149
- message: Unauthorized
150
- headers:
151
- Cache-Control:
152
- - no-cache
153
- Content-Type:
154
- - application/json; charset=utf-8
155
- Date:
156
- - Wed, 10 Jul 2013 02:23:46 GMT
157
- Status:
158
- - 401 Unauthorized
159
- X-Rack-Cache:
160
- - miss
161
- X-Request-Id:
162
- - d93fa7aeb5abba8f525a6c7ee8957560
163
- X-Runtime:
164
- - '0.009809'
165
- X-Ua-Compatible:
166
- - IE=Edge,chrome=1
167
- Content-Length:
168
- - '46'
169
- Connection:
170
- - keep-alive
171
- body:
172
- encoding: US-ASCII
173
- string: ! '{"error":"Your token is invalid","status":401}'
174
- http_version:
175
- recorded_at: Wed, 10 Jul 2013 02:26:15 GMT
176
- recorded_with: VCR 2.4.0
@@ -1,89 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.7
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - ! '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: ! 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - b1b82d8a14df743deea2d8aadddcafbb
31
- X-Runtime:
32
- - '0.011431'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
35
- Date:
36
- - Sun, 07 Jul 2013 22:46:58 GMT
37
- Content-Length:
38
- - '461'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
44
- http_version:
45
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
46
- - request:
47
- method: get
48
- uri: http://fileturn.net/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- User-Agent:
54
- - Faraday v0.8.7
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- Accept:
58
- - ! '*/*'
59
- response:
60
- status:
61
- code: 401
62
- message: Unauthorized
63
- headers:
64
- Cache-Control:
65
- - no-cache
66
- Content-Type:
67
- - application/json; charset=utf-8
68
- Date:
69
- - Wed, 10 Jul 2013 02:23:46 GMT
70
- Status:
71
- - 401 Unauthorized
72
- X-Rack-Cache:
73
- - miss
74
- X-Request-Id:
75
- - 50b5f386f61482578270da1f2964db5f
76
- X-Runtime:
77
- - '0.012142'
78
- X-Ua-Compatible:
79
- - IE=Edge,chrome=1
80
- Transfer-Encoding:
81
- - chunked
82
- Connection:
83
- - keep-alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"error":"Your token is invalid","status":401}'
87
- http_version:
88
- recorded_at: Wed, 10 Jul 2013 02:26:16 GMT
89
- recorded_with: VCR 2.4.0
@@ -1,176 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.7
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - ! '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: ! 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - f000769bcaea9da8cde2ed5722e64c95
31
- X-Runtime:
32
- - '0.010352'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
35
- Date:
36
- - Sun, 07 Jul 2013 22:46:58 GMT
37
- Content-Length:
38
- - '461'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
44
- http_version:
45
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
46
- - request:
47
- method: get
48
- uri: http://localhost:3000/api/files/154.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- User-Agent:
54
- - Faraday v0.8.7
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- Accept:
58
- - ! '*/*'
59
- response:
60
- status:
61
- code: 200
62
- message: ! 'OK '
63
- headers:
64
- Content-Type:
65
- - application/json; charset=utf-8
66
- X-Ua-Compatible:
67
- - IE=Edge
68
- Etag:
69
- - ! '"ccfff9a55b35efe35cc28aef5e5663b8"'
70
- Cache-Control:
71
- - max-age=0, private, must-revalidate
72
- X-Request-Id:
73
- - f9b76e655104439fa8abd0a18fef85d9
74
- X-Runtime:
75
- - '0.045212'
76
- Server:
77
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
78
- Date:
79
- - Sun, 07 Jul 2013 22:46:58 GMT
80
- Content-Length:
81
- - '290'
82
- Connection:
83
- - Keep-Alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"id":154,"url":"http://www.iiswc.org/iiswc2013/sample.docaa","convert_to":"pdf","created_at":"2013-07-06T01:18:31Z","status":"failed","download_url":"","notifications":[{"id":132,"details":"Invalid
87
- response code: 404","parsed_time":null,"status":"failed","time_taken":null,"file_id":154}]}'
88
- http_version:
89
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
90
- - request:
91
- method: get
92
- uri: http://localhost:3000/api/files/210.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
93
- body:
94
- encoding: US-ASCII
95
- string: ''
96
- headers:
97
- User-Agent:
98
- - Faraday v0.8.7
99
- Accept-Encoding:
100
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
101
- Accept:
102
- - ! '*/*'
103
- response:
104
- status:
105
- code: 200
106
- message: ! 'OK '
107
- headers:
108
- Content-Type:
109
- - application/json; charset=utf-8
110
- X-Ua-Compatible:
111
- - IE=Edge
112
- Etag:
113
- - ! '"23074bb4f5f1834341c4c7f1a6522ffd"'
114
- Cache-Control:
115
- - max-age=0, private, must-revalidate
116
- X-Request-Id:
117
- - 31ba6d690031e206c7e77c284a10a514
118
- X-Runtime:
119
- - '0.010914'
120
- Server:
121
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
122
- Date:
123
- - Sun, 07 Jul 2013 22:46:58 GMT
124
- Content-Length:
125
- - '196'
126
- Connection:
127
- - Keep-Alive
128
- body:
129
- encoding: US-ASCII
130
- string: ! '{"id":210,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T02:30:27Z","status":"queued","download_url":"","notifications":[]}'
131
- http_version:
132
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
133
- - request:
134
- method: get
135
- uri: http://fileturn.net/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
136
- body:
137
- encoding: US-ASCII
138
- string: ''
139
- headers:
140
- User-Agent:
141
- - Faraday v0.8.7
142
- Accept-Encoding:
143
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
144
- Accept:
145
- - ! '*/*'
146
- response:
147
- status:
148
- code: 401
149
- message: Unauthorized
150
- headers:
151
- Cache-Control:
152
- - no-cache
153
- Content-Type:
154
- - application/json; charset=utf-8
155
- Date:
156
- - Wed, 10 Jul 2013 02:23:46 GMT
157
- Status:
158
- - 401 Unauthorized
159
- X-Rack-Cache:
160
- - miss
161
- X-Request-Id:
162
- - b1166a18aed3943dd0743a82c56637ca
163
- X-Runtime:
164
- - '0.010285'
165
- X-Ua-Compatible:
166
- - IE=Edge,chrome=1
167
- Transfer-Encoding:
168
- - chunked
169
- Connection:
170
- - keep-alive
171
- body:
172
- encoding: US-ASCII
173
- string: ! '{"error":"Your token is invalid","status":401}'
174
- http_version:
175
- recorded_at: Wed, 10 Jul 2013 02:26:16 GMT
176
- recorded_with: VCR 2.4.0
@@ -1,132 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.7
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - ! '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: ! 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - dd4a73df646ca9eaba461d7b2e89bea1
31
- X-Runtime:
32
- - '0.011115'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
35
- Date:
36
- - Sun, 07 Jul 2013 22:46:58 GMT
37
- Content-Length:
38
- - '461'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
44
- http_version:
45
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
46
- - request:
47
- method: get
48
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- User-Agent:
54
- - Faraday v0.8.7
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- Accept:
58
- - ! '*/*'
59
- response:
60
- status:
61
- code: 200
62
- message: ! 'OK '
63
- headers:
64
- Content-Type:
65
- - application/json; charset=utf-8
66
- X-Ua-Compatible:
67
- - IE=Edge
68
- Etag:
69
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
70
- Cache-Control:
71
- - max-age=0, private, must-revalidate
72
- X-Request-Id:
73
- - ae5876efe665d3b631855e1248296e75
74
- X-Runtime:
75
- - '0.010671'
76
- Server:
77
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
78
- Date:
79
- - Sun, 07 Jul 2013 22:46:58 GMT
80
- Content-Length:
81
- - '461'
82
- Connection:
83
- - Keep-Alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
87
- http_version:
88
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
89
- - request:
90
- method: get
91
- uri: http://fileturn.net/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
92
- body:
93
- encoding: US-ASCII
94
- string: ''
95
- headers:
96
- User-Agent:
97
- - Faraday v0.8.7
98
- Accept-Encoding:
99
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
100
- Accept:
101
- - ! '*/*'
102
- response:
103
- status:
104
- code: 401
105
- message: Unauthorized
106
- headers:
107
- Cache-Control:
108
- - no-cache
109
- Content-Type:
110
- - application/json; charset=utf-8
111
- Date:
112
- - Wed, 10 Jul 2013 02:23:46 GMT
113
- Status:
114
- - 401 Unauthorized
115
- X-Rack-Cache:
116
- - miss
117
- X-Request-Id:
118
- - 8a1c78af3cefdd648592d855f9d3a5ce
119
- X-Runtime:
120
- - '0.007918'
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: ! '{"error":"Your token is invalid","status":401}'
130
- http_version:
131
- recorded_at: Wed, 10 Jul 2013 02:26:16 GMT
132
- recorded_with: VCR 2.4.0
@@ -1,89 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:3000/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.7
12
- Accept-Encoding:
13
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
- Accept:
15
- - ! '*/*'
16
- response:
17
- status:
18
- code: 200
19
- message: ! 'OK '
20
- headers:
21
- Content-Type:
22
- - application/json; charset=utf-8
23
- X-Ua-Compatible:
24
- - IE=Edge
25
- Etag:
26
- - ! '"e0117ff1172a6eeb48dec9a51c619ca6"'
27
- Cache-Control:
28
- - max-age=0, private, must-revalidate
29
- X-Request-Id:
30
- - eb2cf2d8606fee05cf8550454401a8ba
31
- X-Runtime:
32
- - '0.010797'
33
- Server:
34
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
35
- Date:
36
- - Sun, 07 Jul 2013 22:46:58 GMT
37
- Content-Length:
38
- - '461'
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"id":212,"url":"http://www.k12.wa.us/rti/implementation/pubdocs/SchoolBlueprint.doc","convert_to":"pdf","created_at":"2013-07-07T03:38:20Z","status":"processed","download_url":"https://fileturn.s3.amazonaws.com/8_212.pdf?AWSAccessKeyId=AKIAIKXW3ZZ5WNURNYMA&Expires=1373259946&Signature=K60jm8kkSkXYjoEi8eVVr%2Bh1bBY%3D","notifications":[{"id":184,"details":null,"parsed_time":"2013-07-07T03:40:06Z","status":"success","time_taken":"105.926075","file_id":212}]}'
44
- http_version:
45
- recorded_at: Sun, 07 Jul 2013 22:46:58 GMT
46
- - request:
47
- method: get
48
- uri: http://fileturn.net/api/files/212.json?token=67sFfjudMpXxJeioQcPSppYkoVdQD1oetqPWzMAh
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- User-Agent:
54
- - Faraday v0.8.7
55
- Accept-Encoding:
56
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
- Accept:
58
- - ! '*/*'
59
- response:
60
- status:
61
- code: 401
62
- message: Unauthorized
63
- headers:
64
- Cache-Control:
65
- - no-cache
66
- Content-Type:
67
- - application/json; charset=utf-8
68
- Date:
69
- - Wed, 10 Jul 2013 02:23:46 GMT
70
- Status:
71
- - 401 Unauthorized
72
- X-Rack-Cache:
73
- - miss
74
- X-Request-Id:
75
- - dcd85875b43c8880ac195456c03f60c2
76
- X-Runtime:
77
- - '0.015276'
78
- X-Ua-Compatible:
79
- - IE=Edge,chrome=1
80
- Transfer-Encoding:
81
- - chunked
82
- Connection:
83
- - keep-alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"error":"Your token is invalid","status":401}'
87
- http_version:
88
- recorded_at: Wed, 10 Jul 2013 02:26:16 GMT
89
- recorded_with: VCR 2.4.0