parse-ruby-client 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +15 -0
  2. data/.travis.yml +2 -1
  3. data/Gemfile +4 -6
  4. data/Gemfile.lock +18 -18
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/VERSION +1 -1
  8. data/example.rb +2 -1
  9. data/fixtures/vcr_cassettes/test_batch_update_nils_delete_keys.yml +57 -0
  10. data/fixtures/vcr_cassettes/test_empty_response.yml +72 -0
  11. data/fixtures/vcr_cassettes/test_get_missing.yml +95 -38
  12. data/fixtures/vcr_cassettes/test_image_file_associate_with_object.yml +2089 -0
  13. data/fixtures/vcr_cassettes/test_image_file_save.yml +1928 -0
  14. data/fixtures/vcr_cassettes/test_object_id.yml +56 -0
  15. data/fixtures/vcr_cassettes/test_reset_password.yml +109 -0
  16. data/fixtures/vcr_cassettes/test_retries.yml +357 -0
  17. data/fixtures/vcr_cassettes/test_retries_404.yml +72 -0
  18. data/fixtures/vcr_cassettes/test_retries_404_correct.yml +72 -0
  19. data/fixtures/vcr_cassettes/test_retries_json_error.yml +357 -0
  20. data/fixtures/vcr_cassettes/test_retries_server_error.yml +357 -0
  21. data/fixtures/vcr_cassettes/test_server_update.yml +248 -191
  22. data/fixtures/vcr_cassettes/test_user_login.yml +276 -0
  23. data/fixtures/vcr_cassettes/test_xget.yml +280 -0
  24. data/lib/faraday/better_retry.rb +94 -0
  25. data/lib/faraday/extended_parse_json.rb +39 -0
  26. data/lib/faraday/get_method_override.rb +32 -0
  27. data/lib/parse-ruby-client.rb +9 -9
  28. data/lib/parse/batch.rb +2 -3
  29. data/lib/parse/client.rb +72 -161
  30. data/lib/parse/cloud.rb +2 -1
  31. data/lib/parse/datatypes.rb +6 -1
  32. data/lib/parse/error.rb +7 -3
  33. data/lib/parse/installation.rb +18 -0
  34. data/lib/parse/model.rb +2 -1
  35. data/lib/parse/object.rb +7 -1
  36. data/lib/parse/protocol.rb +10 -0
  37. data/lib/parse/push.rb +3 -0
  38. data/lib/parse/query.rb +5 -2
  39. data/lib/parse/user.rb +1 -0
  40. data/lib/parse/util.rb +2 -0
  41. data/parse-ruby-client.gemspec +35 -15
  42. data/test/helper.rb +55 -1
  43. data/test/middleware/better_retry_test.rb +57 -0
  44. data/test/middleware/extend_parse_json_test.rb +55 -0
  45. data/test/test_client.rb +78 -28
  46. data/test/test_datatypes.rb +14 -0
  47. data/test/test_object.rb +16 -0
  48. metadata +39 -34
  49. data/lib/parse/http_client.rb +0 -84
@@ -0,0 +1,357 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.parse.com/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Parse for Ruby, 0.0
12
+ Content-Type:
13
+ - application/json
14
+ X-Parse-Application-Id:
15
+ - <X-Parse-Application-Id>
16
+ X-Parse-Rest-Api-Key:
17
+ - <X-Parse-REST-API-Key>
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - '*/*'
22
+ response:
23
+ status:
24
+ code: 404
25
+ message: Not Found
26
+ headers:
27
+ Content-Type:
28
+ - text/html; charset=utf-8
29
+ Date:
30
+ - Wed, 26 Mar 2014 16:48:19 GMT
31
+ Server:
32
+ - nginx/1.4.2
33
+ Status:
34
+ - 404 Not Found
35
+ X-Runtime:
36
+ - '0.004110'
37
+ Content-Length:
38
+ - '433'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: |
44
+ <!DOCTYPE html>
45
+ <html>
46
+ <head>
47
+ <title>The page you were looking for doesn't exist (404)</title>
48
+ <style type="text/css">
49
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
50
+ div.dialog {
51
+ width: 25em;
52
+ padding: 0 4em;
53
+ margin: 4em auto 0 auto;
54
+ border: 1px solid #ccc;
55
+ border-right-color: #999;
56
+ border-bottom-color: #999;
57
+ }
58
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
59
+ </style>
60
+ </head>
61
+
62
+ <body>
63
+ <!-- This file lives in public/404.html -->
64
+ <div class="dialog">
65
+ <h1>The page you were looking for doesn't exist.</h1>
66
+ <p>You may have mistyped the address or the page may have moved.</p>
67
+ </div>
68
+ </body>
69
+ </html>
70
+ http_version:
71
+ recorded_at: Wed, 26 Mar 2014 16:48:19 GMT
72
+ - request:
73
+ method: get
74
+ uri: https://api.parse.com/
75
+ body:
76
+ encoding: UTF-8
77
+ string: |
78
+ <!DOCTYPE html>
79
+ <html>
80
+ <head>
81
+ <title>The page you were looking for doesn't exist (404)</title>
82
+ <style type="text/css">
83
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
84
+ div.dialog {
85
+ width: 25em;
86
+ padding: 0 4em;
87
+ margin: 4em auto 0 auto;
88
+ border: 1px solid #ccc;
89
+ border-right-color: #999;
90
+ border-bottom-color: #999;
91
+ }
92
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
93
+ </style>
94
+ </head>
95
+
96
+ <body>
97
+ <!-- This file lives in public/404.html -->
98
+ <div class="dialog">
99
+ <h1>The page you were looking for doesn't exist.</h1>
100
+ <p>You may have mistyped the address or the page may have moved.</p>
101
+ </div>
102
+ </body>
103
+ </html>
104
+ headers:
105
+ User-Agent:
106
+ - Parse for Ruby, 0.0
107
+ Content-Type:
108
+ - application/json
109
+ X-Parse-Application-Id:
110
+ - <X-Parse-Application-Id>
111
+ X-Parse-Rest-Api-Key:
112
+ - <X-Parse-REST-API-Key>
113
+ Accept-Encoding:
114
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
115
+ Accept:
116
+ - '*/*'
117
+ response:
118
+ status:
119
+ code: 404
120
+ message: Not Found
121
+ headers:
122
+ Content-Type:
123
+ - text/html; charset=utf-8
124
+ Date:
125
+ - Wed, 26 Mar 2014 16:48:20 GMT
126
+ Server:
127
+ - nginx/1.4.2
128
+ Status:
129
+ - 404 Not Found
130
+ X-Runtime:
131
+ - '0.008402'
132
+ Content-Length:
133
+ - '433'
134
+ Connection:
135
+ - keep-alive
136
+ body:
137
+ encoding: UTF-8
138
+ string: |
139
+ <!DOCTYPE html>
140
+ <html>
141
+ <head>
142
+ <title>The page you were looking for doesn't exist (404)</title>
143
+ <style type="text/css">
144
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
145
+ div.dialog {
146
+ width: 25em;
147
+ padding: 0 4em;
148
+ margin: 4em auto 0 auto;
149
+ border: 1px solid #ccc;
150
+ border-right-color: #999;
151
+ border-bottom-color: #999;
152
+ }
153
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
154
+ </style>
155
+ </head>
156
+
157
+ <body>
158
+ <!-- This file lives in public/404.html -->
159
+ <div class="dialog">
160
+ <h1>The page you were looking for doesn't exist.</h1>
161
+ <p>You may have mistyped the address or the page may have moved.</p>
162
+ </div>
163
+ </body>
164
+ </html>
165
+ http_version:
166
+ recorded_at: Wed, 26 Mar 2014 16:48:20 GMT
167
+ - request:
168
+ method: get
169
+ uri: https://api.parse.com/
170
+ body:
171
+ encoding: UTF-8
172
+ string: |
173
+ <!DOCTYPE html>
174
+ <html>
175
+ <head>
176
+ <title>The page you were looking for doesn't exist (404)</title>
177
+ <style type="text/css">
178
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
179
+ div.dialog {
180
+ width: 25em;
181
+ padding: 0 4em;
182
+ margin: 4em auto 0 auto;
183
+ border: 1px solid #ccc;
184
+ border-right-color: #999;
185
+ border-bottom-color: #999;
186
+ }
187
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
188
+ </style>
189
+ </head>
190
+
191
+ <body>
192
+ <!-- This file lives in public/404.html -->
193
+ <div class="dialog">
194
+ <h1>The page you were looking for doesn't exist.</h1>
195
+ <p>You may have mistyped the address or the page may have moved.</p>
196
+ </div>
197
+ </body>
198
+ </html>
199
+ headers:
200
+ User-Agent:
201
+ - Parse for Ruby, 0.0
202
+ Content-Type:
203
+ - application/json
204
+ X-Parse-Application-Id:
205
+ - <X-Parse-Application-Id>
206
+ X-Parse-Rest-Api-Key:
207
+ - <X-Parse-REST-API-Key>
208
+ Accept-Encoding:
209
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
210
+ Accept:
211
+ - '*/*'
212
+ response:
213
+ status:
214
+ code: 404
215
+ message: Not Found
216
+ headers:
217
+ Content-Type:
218
+ - text/html; charset=utf-8
219
+ Date:
220
+ - Wed, 26 Mar 2014 16:48:21 GMT
221
+ Server:
222
+ - nginx/1.4.4
223
+ Status:
224
+ - 404 Not Found
225
+ X-Runtime:
226
+ - '0.004716'
227
+ Content-Length:
228
+ - '433'
229
+ Connection:
230
+ - keep-alive
231
+ body:
232
+ encoding: UTF-8
233
+ string: |
234
+ <!DOCTYPE html>
235
+ <html>
236
+ <head>
237
+ <title>The page you were looking for doesn't exist (404)</title>
238
+ <style type="text/css">
239
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
240
+ div.dialog {
241
+ width: 25em;
242
+ padding: 0 4em;
243
+ margin: 4em auto 0 auto;
244
+ border: 1px solid #ccc;
245
+ border-right-color: #999;
246
+ border-bottom-color: #999;
247
+ }
248
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
249
+ </style>
250
+ </head>
251
+
252
+ <body>
253
+ <!-- This file lives in public/404.html -->
254
+ <div class="dialog">
255
+ <h1>The page you were looking for doesn't exist.</h1>
256
+ <p>You may have mistyped the address or the page may have moved.</p>
257
+ </div>
258
+ </body>
259
+ </html>
260
+ http_version:
261
+ recorded_at: Wed, 26 Mar 2014 16:48:21 GMT
262
+ - request:
263
+ method: get
264
+ uri: https://api.parse.com/
265
+ body:
266
+ encoding: UTF-8
267
+ string: |
268
+ <!DOCTYPE html>
269
+ <html>
270
+ <head>
271
+ <title>The page you were looking for doesn't exist (404)</title>
272
+ <style type="text/css">
273
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
274
+ div.dialog {
275
+ width: 25em;
276
+ padding: 0 4em;
277
+ margin: 4em auto 0 auto;
278
+ border: 1px solid #ccc;
279
+ border-right-color: #999;
280
+ border-bottom-color: #999;
281
+ }
282
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
283
+ </style>
284
+ </head>
285
+
286
+ <body>
287
+ <!-- This file lives in public/404.html -->
288
+ <div class="dialog">
289
+ <h1>The page you were looking for doesn't exist.</h1>
290
+ <p>You may have mistyped the address or the page may have moved.</p>
291
+ </div>
292
+ </body>
293
+ </html>
294
+ headers:
295
+ User-Agent:
296
+ - Parse for Ruby, 0.0
297
+ Content-Type:
298
+ - application/json
299
+ X-Parse-Application-Id:
300
+ - <X-Parse-Application-Id>
301
+ X-Parse-Rest-Api-Key:
302
+ - <X-Parse-REST-API-Key>
303
+ Accept-Encoding:
304
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
305
+ Accept:
306
+ - '*/*'
307
+ response:
308
+ status:
309
+ code: 404
310
+ message: Not Found
311
+ headers:
312
+ Content-Type:
313
+ - text/html; charset=utf-8
314
+ Date:
315
+ - Wed, 26 Mar 2014 16:48:22 GMT
316
+ Server:
317
+ - nginx/1.4.4
318
+ Status:
319
+ - 404 Not Found
320
+ X-Runtime:
321
+ - '0.006804'
322
+ Content-Length:
323
+ - '433'
324
+ Connection:
325
+ - keep-alive
326
+ body:
327
+ encoding: UTF-8
328
+ string: |
329
+ <!DOCTYPE html>
330
+ <html>
331
+ <head>
332
+ <title>The page you were looking for doesn't exist (404)</title>
333
+ <style type="text/css">
334
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
335
+ div.dialog {
336
+ width: 25em;
337
+ padding: 0 4em;
338
+ margin: 4em auto 0 auto;
339
+ border: 1px solid #ccc;
340
+ border-right-color: #999;
341
+ border-bottom-color: #999;
342
+ }
343
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
344
+ </style>
345
+ </head>
346
+
347
+ <body>
348
+ <!-- This file lives in public/404.html -->
349
+ <div class="dialog">
350
+ <h1>The page you were looking for doesn't exist.</h1>
351
+ <p>You may have mistyped the address or the page may have moved.</p>
352
+ </div>
353
+ </body>
354
+ </html>
355
+ http_version:
356
+ recorded_at: Wed, 26 Mar 2014 16:48:23 GMT
357
+ recorded_with: VCR 2.4.0
@@ -1,298 +1,355 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ http_interactions:
3
+ - request:
4
4
  method: post
5
5
  uri: https://api.parse.com/1/classes/TestSave
6
- body:
6
+ body:
7
7
  encoding: UTF-8
8
- string: "{}"
9
- headers:
10
- Content-Type:
8
+ string: '{}'
9
+ headers:
10
+ Content-Type:
11
11
  - application/json
12
- Accept:
12
+ Accept:
13
13
  - application/json
14
- User-Agent:
14
+ User-Agent:
15
15
  - Parse for Ruby, 0.0
16
- X-Parse-Master-Key:
17
- - ""
18
- X-Parse-Rest-Api-Key:
16
+ X-Parse-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
19
  - <X-Parse-REST-API-Key>
20
- X-Parse-Application-Id:
20
+ X-Parse-Application-Id:
21
21
  - <X-Parse-Application-Id>
22
- X-Parse-Session-Token:
23
- - ""
24
- Expect:
25
- - ""
26
- response:
27
- status:
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
28
  code: 201
29
29
  message: Created
30
- headers:
31
- Access-Control-Allow-Origin:
32
- - "*"
33
- Access-Control-Request-Method:
34
- - "*"
35
- Cache-Control:
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
36
  - no-cache
37
- Content-Type:
37
+ Content-Type:
38
38
  - application/json; charset=utf-8
39
- Date:
39
+ Date:
40
40
  - Mon, 22 Apr 2013 16:03:14 GMT
41
- Location:
41
+ Location:
42
42
  - https://api.parse.com/1/classes/TestSave/WSaiWmntLn
43
- Server:
43
+ Server:
44
44
  - nginx/1.2.2
45
- Set-Cookie:
45
+ Set-Cookie:
46
46
  - <COOKIE-KEY>
47
- Status:
47
+ Status:
48
48
  - 201 Created
49
- X-Runtime:
50
- - "0.088257"
51
- X-Ua-Compatible:
49
+ X-Runtime:
50
+ - '0.088257'
51
+ X-Ua-Compatible:
52
52
  - IE=Edge,chrome=1
53
- Content-Length:
54
- - "64"
55
- Connection:
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
56
  - keep-alive
57
- body:
57
+ body:
58
58
  encoding: ASCII-8BIT
59
- string: "{\"createdAt\":\"2013-04-22T16:03:14.541Z\",\"objectId\":\"WSaiWmntLn\"}"
59
+ string: '{"createdAt":"2013-04-22T16:03:14.541Z","objectId":"WSaiWmntLn"}'
60
60
  http_version:
61
61
  recorded_at: Mon, 22 Apr 2013 16:03:14 GMT
62
- - request:
62
+ - request:
63
63
  method: put
64
64
  uri: https://api.parse.com/1/classes/TestSave/WSaiWmntLn
65
- body:
65
+ body:
66
66
  encoding: UTF-8
67
- string: "{\"name\":\"john\"}"
68
- headers:
69
- Content-Type:
67
+ string: '{"name":"john"}'
68
+ headers:
69
+ Content-Type:
70
70
  - application/json
71
- Accept:
71
+ Accept:
72
72
  - application/json
73
- User-Agent:
73
+ User-Agent:
74
74
  - Parse for Ruby, 0.0
75
- X-Parse-Master-Key:
76
- - ""
77
- X-Parse-Rest-Api-Key:
75
+ X-Parse-Master-Key:
76
+ - ''
77
+ X-Parse-Rest-Api-Key:
78
78
  - <X-Parse-REST-API-Key>
79
- X-Parse-Application-Id:
79
+ X-Parse-Application-Id:
80
80
  - <X-Parse-Application-Id>
81
- X-Parse-Session-Token:
82
- - ""
83
- Expect:
84
- - ""
85
- response:
86
- status:
81
+ X-Parse-Session-Token:
82
+ - ''
83
+ Expect:
84
+ - ''
85
+ response:
86
+ status:
87
87
  code: 200
88
88
  message: OK
89
- headers:
90
- Access-Control-Allow-Origin:
91
- - "*"
92
- Access-Control-Request-Method:
93
- - "*"
94
- Cache-Control:
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - '*'
92
+ Access-Control-Request-Method:
93
+ - '*'
94
+ Cache-Control:
95
95
  - max-age=0, private, must-revalidate
96
- Content-Type:
96
+ Content-Type:
97
97
  - application/json; charset=utf-8
98
- Date:
98
+ Date:
99
99
  - Mon, 22 Apr 2013 16:03:14 GMT
100
- Etag:
101
- - "\"bd992e9eebd29619aa5c9cc7d685dbc8\""
102
- Server:
100
+ Etag:
101
+ - '"bd992e9eebd29619aa5c9cc7d685dbc8"'
102
+ Server:
103
103
  - nginx/1.2.2
104
- Set-Cookie:
104
+ Set-Cookie:
105
105
  - <COOKIE-KEY>
106
- Status:
106
+ Status:
107
107
  - 200 OK
108
- X-Runtime:
109
- - "0.166123"
110
- X-Ua-Compatible:
108
+ X-Runtime:
109
+ - '0.166123'
110
+ X-Ua-Compatible:
111
111
  - IE=Edge,chrome=1
112
- Content-Length:
113
- - "40"
114
- Connection:
112
+ Content-Length:
113
+ - '40'
114
+ Connection:
115
115
  - keep-alive
116
- body:
116
+ body:
117
117
  encoding: ASCII-8BIT
118
- string: "{\"updatedAt\":\"2013-04-22T16:03:14.704Z\"}"
118
+ string: '{"updatedAt":"2013-04-22T16:03:14.704Z"}'
119
119
  http_version:
120
120
  recorded_at: Mon, 22 Apr 2013 16:03:14 GMT
121
- - request:
121
+ - request:
122
122
  method: get
123
123
  uri: https://api.parse.com/1/classes/TestSave/WSaiWmntLn
124
- body:
124
+ body:
125
125
  encoding: US-ASCII
126
- string: ""
127
- headers:
128
- Content-Type:
126
+ string: ''
127
+ headers:
128
+ Content-Type:
129
129
  - application/json
130
- Accept:
130
+ Accept:
131
131
  - application/json
132
- User-Agent:
132
+ User-Agent:
133
133
  - Parse for Ruby, 0.0
134
- X-Parse-Master-Key:
135
- - ""
136
- X-Parse-Rest-Api-Key:
134
+ X-Parse-Master-Key:
135
+ - ''
136
+ X-Parse-Rest-Api-Key:
137
137
  - <X-Parse-REST-API-Key>
138
- X-Parse-Application-Id:
138
+ X-Parse-Application-Id:
139
139
  - <X-Parse-Application-Id>
140
- X-Parse-Session-Token:
141
- - ""
142
- Expect:
143
- - ""
144
- response:
145
- status:
140
+ X-Parse-Session-Token:
141
+ - ''
142
+ Expect:
143
+ - ''
144
+ response:
145
+ status:
146
146
  code: 200
147
147
  message: OK
148
- headers:
149
- Access-Control-Allow-Origin:
150
- - "*"
151
- Access-Control-Request-Method:
152
- - "*"
153
- Cache-Control:
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - '*'
151
+ Access-Control-Request-Method:
152
+ - '*'
153
+ Cache-Control:
154
154
  - max-age=0, private, must-revalidate
155
- Content-Type:
155
+ Content-Type:
156
156
  - application/json; charset=utf-8
157
- Date:
157
+ Date:
158
158
  - Mon, 22 Apr 2013 16:03:14 GMT
159
- Etag:
160
- - "\"a4170124f997bfd1cd4973881182b7f1\""
161
- Server:
159
+ Etag:
160
+ - '"a4170124f997bfd1cd4973881182b7f1"'
161
+ Server:
162
162
  - nginx/1.2.2
163
- Set-Cookie:
163
+ Set-Cookie:
164
164
  - <COOKIE-KEY>
165
- Status:
165
+ Status:
166
166
  - 200 OK
167
- X-Runtime:
168
- - "0.044724"
169
- X-Ua-Compatible:
167
+ X-Runtime:
168
+ - '0.044724'
169
+ X-Ua-Compatible:
170
170
  - IE=Edge,chrome=1
171
- Content-Length:
172
- - "117"
173
- Connection:
171
+ Content-Length:
172
+ - '117'
173
+ Connection:
174
174
  - keep-alive
175
- body:
175
+ body:
176
176
  encoding: ASCII-8BIT
177
- string: "{\"name\":\"john\",\"createdAt\":\"2013-04-22T16:03:14.541Z\",\"updatedAt\":\"2013-04-22T16:03:14.704Z\",\"objectId\":\"WSaiWmntLn\"}"
177
+ string: '{"name":"john","createdAt":"2013-04-22T16:03:14.541Z","updatedAt":"2013-04-22T16:03:14.704Z","objectId":"WSaiWmntLn"}'
178
178
  http_version:
179
179
  recorded_at: Mon, 22 Apr 2013 16:03:14 GMT
180
- - request:
180
+ - request:
181
181
  method: put
182
182
  uri: https://api.parse.com/1/classes/TestSave/WSaiWmntLn
183
- body:
183
+ body:
184
184
  encoding: UTF-8
185
- string: "{\"name\":\"dave\"}"
186
- headers:
187
- Content-Type:
185
+ string: '{"name":"dave"}'
186
+ headers:
187
+ Content-Type:
188
188
  - application/json
189
- Accept:
189
+ Accept:
190
190
  - application/json
191
- User-Agent:
191
+ User-Agent:
192
192
  - Parse for Ruby, 0.0
193
- X-Parse-Master-Key:
194
- - ""
195
- X-Parse-Rest-Api-Key:
193
+ X-Parse-Master-Key:
194
+ - ''
195
+ X-Parse-Rest-Api-Key:
196
196
  - <X-Parse-REST-API-Key>
197
- X-Parse-Application-Id:
197
+ X-Parse-Application-Id:
198
198
  - <X-Parse-Application-Id>
199
- X-Parse-Session-Token:
200
- - ""
201
- Expect:
202
- - ""
203
- response:
204
- status:
199
+ X-Parse-Session-Token:
200
+ - ''
201
+ Expect:
202
+ - ''
203
+ response:
204
+ status:
205
205
  code: 200
206
206
  message: OK
207
- headers:
208
- Access-Control-Allow-Origin:
209
- - "*"
210
- Access-Control-Request-Method:
211
- - "*"
212
- Cache-Control:
207
+ headers:
208
+ Access-Control-Allow-Origin:
209
+ - '*'
210
+ Access-Control-Request-Method:
211
+ - '*'
212
+ Cache-Control:
213
213
  - max-age=0, private, must-revalidate
214
- Content-Type:
214
+ Content-Type:
215
215
  - application/json; charset=utf-8
216
- Date:
216
+ Date:
217
217
  - Mon, 22 Apr 2013 16:03:14 GMT
218
- Etag:
219
- - "\"35dfb8aca4c1ceb9d0814ca6b20bfd0f\""
220
- Server:
218
+ Etag:
219
+ - '"35dfb8aca4c1ceb9d0814ca6b20bfd0f"'
220
+ Server:
221
221
  - nginx/1.2.2
222
- Set-Cookie:
222
+ Set-Cookie:
223
223
  - <COOKIE-KEY>
224
- Status:
224
+ Status:
225
225
  - 200 OK
226
- X-Runtime:
227
- - "0.025740"
228
- X-Ua-Compatible:
226
+ X-Runtime:
227
+ - '0.025740'
228
+ X-Ua-Compatible:
229
229
  - IE=Edge,chrome=1
230
- Content-Length:
231
- - "40"
232
- Connection:
230
+ Content-Length:
231
+ - '40'
232
+ Connection:
233
233
  - keep-alive
234
- body:
234
+ body:
235
235
  encoding: ASCII-8BIT
236
- string: "{\"updatedAt\":\"2013-04-22T16:03:14.909Z\"}"
236
+ string: '{"updatedAt":"2013-04-22T16:03:14.909Z"}'
237
237
  http_version:
238
238
  recorded_at: Mon, 22 Apr 2013 16:03:14 GMT
239
- - request:
239
+ - request:
240
240
  method: get
241
241
  uri: https://api.parse.com/1/classes/TestSave/WSaiWmntLn
242
- body:
242
+ body:
243
243
  encoding: US-ASCII
244
- string: ""
245
- headers:
246
- Content-Type:
244
+ string: ''
245
+ headers:
246
+ Content-Type:
247
247
  - application/json
248
- Accept:
248
+ Accept:
249
249
  - application/json
250
- User-Agent:
250
+ User-Agent:
251
251
  - Parse for Ruby, 0.0
252
- X-Parse-Master-Key:
253
- - ""
254
- X-Parse-Rest-Api-Key:
252
+ X-Parse-Master-Key:
253
+ - ''
254
+ X-Parse-Rest-Api-Key:
255
255
  - <X-Parse-REST-API-Key>
256
- X-Parse-Application-Id:
256
+ X-Parse-Application-Id:
257
257
  - <X-Parse-Application-Id>
258
- X-Parse-Session-Token:
259
- - ""
260
- Expect:
261
- - ""
262
- response:
263
- status:
258
+ X-Parse-Session-Token:
259
+ - ''
260
+ Expect:
261
+ - ''
262
+ response:
263
+ status:
264
264
  code: 200
265
265
  message: OK
266
- headers:
267
- Access-Control-Allow-Origin:
268
- - "*"
269
- Access-Control-Request-Method:
270
- - "*"
271
- Cache-Control:
266
+ headers:
267
+ Access-Control-Allow-Origin:
268
+ - '*'
269
+ Access-Control-Request-Method:
270
+ - '*'
271
+ Cache-Control:
272
272
  - max-age=0, private, must-revalidate
273
- Content-Type:
273
+ Content-Type:
274
274
  - application/json; charset=utf-8
275
- Date:
275
+ Date:
276
276
  - Mon, 22 Apr 2013 16:03:14 GMT
277
- Etag:
278
- - "\"7a8fe3882cc8126112db74f6344750b9\""
279
- Server:
277
+ Etag:
278
+ - '"7a8fe3882cc8126112db74f6344750b9"'
279
+ Server:
280
280
  - nginx/1.2.2
281
- Set-Cookie:
281
+ Set-Cookie:
282
282
  - <COOKIE-KEY>
283
- Status:
283
+ Status:
284
284
  - 200 OK
285
- X-Runtime:
286
- - "0.030711"
287
- X-Ua-Compatible:
285
+ X-Runtime:
286
+ - '0.030711'
287
+ X-Ua-Compatible:
288
288
  - IE=Edge,chrome=1
289
- Content-Length:
290
- - "117"
291
- Connection:
289
+ Content-Length:
290
+ - '117'
291
+ Connection:
292
292
  - keep-alive
293
- body:
293
+ body:
294
294
  encoding: ASCII-8BIT
295
- string: "{\"name\":\"dave\",\"createdAt\":\"2013-04-22T16:03:14.541Z\",\"updatedAt\":\"2013-04-22T16:03:14.909Z\",\"objectId\":\"WSaiWmntLn\"}"
295
+ string: '{"name":"dave","createdAt":"2013-04-22T16:03:14.541Z","updatedAt":"2013-04-22T16:03:14.909Z","objectId":"WSaiWmntLn"}'
296
296
  http_version:
297
297
  recorded_at: Mon, 22 Apr 2013 16:03:14 GMT
298
+ - request:
299
+ method: post
300
+ uri: https://api.parse.com/1/classes/TestSave/WSaiWmntLn
301
+ body:
302
+ encoding: UTF-8
303
+ string: ''
304
+ headers:
305
+ User-Agent:
306
+ - Parse for Ruby, 0.0
307
+ Content-Type:
308
+ - application/json
309
+ X-Parse-Application-Id:
310
+ - <X-Parse-Application-Id>
311
+ X-Parse-Rest-Api-Key:
312
+ - <X-Parse-REST-API-Key>
313
+ X-Http-Method-Override:
314
+ - GET
315
+ Content-Length:
316
+ - '0'
317
+ Accept-Encoding:
318
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
319
+ Accept:
320
+ - '*/*'
321
+ response:
322
+ status:
323
+ code: 404
324
+ message: Not Found
325
+ headers:
326
+ Access-Control-Allow-Origin:
327
+ - '*'
328
+ Access-Control-Request-Method:
329
+ - '*'
330
+ Cache-Control:
331
+ - no-cache
332
+ Content-Type:
333
+ - application/json; charset=utf-8
334
+ Date:
335
+ - Wed, 26 Mar 2014 15:21:15 GMT
336
+ Server:
337
+ - nginx/1.4.4
338
+ Set-Cookie:
339
+ - <COOKIE-KEY>
340
+ Status:
341
+ - 404 Not Found
342
+ X-Runtime:
343
+ - '0.072862'
344
+ X-Ua-Compatible:
345
+ - IE=Edge,chrome=1
346
+ Content-Length:
347
+ - '65'
348
+ Connection:
349
+ - keep-alive
350
+ body:
351
+ encoding: UTF-8
352
+ string: '{"code":101,"error":"object not found for get"}'
353
+ http_version:
354
+ recorded_at: Wed, 26 Mar 2014 15:21:15 GMT
298
355
  recorded_with: VCR 2.4.0