leancloud-ruby-client 0.1.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 (99) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +9 -0
  3. data/Gemfile +16 -0
  4. data/Gemfile.lock +86 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.md +1177 -0
  7. data/Rakefile +45 -0
  8. data/VERSION +1 -0
  9. data/example.rb +35 -0
  10. data/features.md +1111 -0
  11. data/fixtures/vcr_cassettes/test_acls_arent_objects.yml +274 -0
  12. data/fixtures/vcr_cassettes/test_array_add.yml +213 -0
  13. data/fixtures/vcr_cassettes/test_array_add_pointerizing.yml +380 -0
  14. data/fixtures/vcr_cassettes/test_array_add_unique.yml +319 -0
  15. data/fixtures/vcr_cassettes/test_batch_create_object.yml +107 -0
  16. data/fixtures/vcr_cassettes/test_batch_delete_object.yml +637 -0
  17. data/fixtures/vcr_cassettes/test_batch_run.yml +109 -0
  18. data/fixtures/vcr_cassettes/test_batch_update_nils_delete_keys.yml +435 -0
  19. data/fixtures/vcr_cassettes/test_batch_update_object.yml +637 -0
  20. data/fixtures/vcr_cassettes/test_contains_all.yml +1143 -0
  21. data/fixtures/vcr_cassettes/test_cql.yml +99 -0
  22. data/fixtures/vcr_cassettes/test_created_at.yml +109 -0
  23. data/fixtures/vcr_cassettes/test_decrement.yml +213 -0
  24. data/fixtures/vcr_cassettes/test_deep_parse.yml +321 -0
  25. data/fixtures/vcr_cassettes/test_destroy.yml +213 -0
  26. data/fixtures/vcr_cassettes/test_empty_response.yml +1026 -0
  27. data/fixtures/vcr_cassettes/test_eq_pointerize.yml +427 -0
  28. data/fixtures/vcr_cassettes/test_equality.yml +321 -0
  29. data/fixtures/vcr_cassettes/test_get.yml +215 -0
  30. data/fixtures/vcr_cassettes/test_get_installation.yml +58 -0
  31. data/fixtures/vcr_cassettes/test_get_missing.yml +160 -0
  32. data/fixtures/vcr_cassettes/test_image_file_associate_with_object.yml +2089 -0
  33. data/fixtures/vcr_cassettes/test_image_file_save.yml +1928 -0
  34. data/fixtures/vcr_cassettes/test_include.yml +321 -0
  35. data/fixtures/vcr_cassettes/test_new_model.yml +109 -0
  36. data/fixtures/vcr_cassettes/test_new_object.yml +109 -0
  37. data/fixtures/vcr_cassettes/test_nils_delete_keys.yml +319 -0
  38. data/fixtures/vcr_cassettes/test_object_id.yml +56 -0
  39. data/fixtures/vcr_cassettes/test_parse_delete.yml +421 -0
  40. data/fixtures/vcr_cassettes/test_pointer.yml +109 -0
  41. data/fixtures/vcr_cassettes/test_request_sms.yml +48 -0
  42. data/fixtures/vcr_cassettes/test_reset_password.yml +109 -0
  43. data/fixtures/vcr_cassettes/test_retries.yml +4173 -0
  44. data/fixtures/vcr_cassettes/test_retries_404.yml +1026 -0
  45. data/fixtures/vcr_cassettes/test_retries_404_correct.yml +1026 -0
  46. data/fixtures/vcr_cassettes/test_retries_json_error.yml +2265 -0
  47. data/fixtures/vcr_cassettes/test_retries_server_error.yml +2265 -0
  48. data/fixtures/vcr_cassettes/test_save_installation.yml +58 -0
  49. data/fixtures/vcr_cassettes/test_save_with_sub_objects.yml +484 -0
  50. data/fixtures/vcr_cassettes/test_saving_boolean_values.yml +215 -0
  51. data/fixtures/vcr_cassettes/test_saving_nested_objects.yml +62 -0
  52. data/fixtures/vcr_cassettes/test_server_update.yml +586 -0
  53. data/fixtures/vcr_cassettes/test_simple_save.yml +109 -0
  54. data/fixtures/vcr_cassettes/test_text_file_save.yml +109 -0
  55. data/fixtures/vcr_cassettes/test_update.yml +213 -0
  56. data/fixtures/vcr_cassettes/test_updated_at.yml +213 -0
  57. data/fixtures/vcr_cassettes/test_user_login.yml +276 -0
  58. data/fixtures/vcr_cassettes/test_user_save.yml +109 -0
  59. data/fixtures/vcr_cassettes/test_xget.yml +603 -0
  60. data/leancloud-ruby-client.gemspec +166 -0
  61. data/lib/faraday/better_retry.rb +94 -0
  62. data/lib/faraday/extended_parse_json.rb +39 -0
  63. data/lib/faraday/get_method_override.rb +32 -0
  64. data/lib/leancloud-ruby-client.rb +34 -0
  65. data/lib/leancloud/application.rb +7 -0
  66. data/lib/leancloud/batch.rb +53 -0
  67. data/lib/leancloud/client.rb +149 -0
  68. data/lib/leancloud/cloud.rb +28 -0
  69. data/lib/leancloud/datatypes.rb +355 -0
  70. data/lib/leancloud/error.rb +42 -0
  71. data/lib/leancloud/installation.rb +57 -0
  72. data/lib/leancloud/model.rb +14 -0
  73. data/lib/leancloud/object.rb +252 -0
  74. data/lib/leancloud/protocol.rb +193 -0
  75. data/lib/leancloud/push.rb +48 -0
  76. data/lib/leancloud/query.rb +194 -0
  77. data/lib/leancloud/user.rb +38 -0
  78. data/lib/leancloud/util.rb +93 -0
  79. data/test/cloud_functions/MyCloudCode/cloud/main.js +4 -0
  80. data/test/config/global.json +14 -0
  81. data/test/helper.rb +108 -0
  82. data/test/middleware/better_retry_test.rb +57 -0
  83. data/test/middleware/extend_parse_json_test.rb +55 -0
  84. data/test/parsers.jpg +0 -0
  85. data/test/test_batch.rb +132 -0
  86. data/test/test_client.rb +183 -0
  87. data/test/test_cloud.rb +31 -0
  88. data/test/test_datatypes.rb +105 -0
  89. data/test/test_file.rb +67 -0
  90. data/test/test_init.rb +23 -0
  91. data/test/test_init_from_cloud_code.rb +8 -0
  92. data/test/test_installation.rb +49 -0
  93. data/test/test_model.rb +22 -0
  94. data/test/test_object.rb +295 -0
  95. data/test/test_push.rb +45 -0
  96. data/test/test_query.rb +198 -0
  97. data/test/test_throttle.rb +5 -0
  98. data/test/test_user.rb +60 -0
  99. metadata +298 -0
@@ -0,0 +1,1143 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%7D
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Parse for Ruby, 0.0
16
+ X-Parse-Rest-Api-Key:
17
+ - <X-Parse-REST-API-Key>
18
+ X-Parse-Application-Id:
19
+ - <X-Parse-Application-Id>
20
+ Expect:
21
+ - ''
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Access-Control-Allow-Origin:
28
+ - '*'
29
+ Access-Control-Request-Method:
30
+ - '*'
31
+ Cache-Control:
32
+ - max-age=0, private, must-revalidate
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Date:
36
+ - Tue, 29 Jul 2014 23:17:01 GMT
37
+ Etag:
38
+ - '"a29bdd9e603493317bf0b36ce9e0db1f"'
39
+ Server:
40
+ - nginx/1.6.0
41
+ Set-Cookie:
42
+ - <COOKIE-KEY>
43
+ Status:
44
+ - 200 OK
45
+ X-Content-Type-Options:
46
+ - nosniff
47
+ X-Runtime:
48
+ - '0.083746'
49
+ X-Ua-Compatible:
50
+ - IE=Edge,chrome=1
51
+ Content-Length:
52
+ - '259'
53
+ Connection:
54
+ - keep-alive
55
+ body:
56
+ encoding: ASCII-8BIT
57
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2014-07-29T23:15:17.390Z","updatedAt":"2014-07-29T23:15:17.390Z","objectId":"TRD3lrtSSd"},{"array":[3,4,5,6],"createdAt":"2014-07-29T23:15:17.615Z","updatedAt":"2014-07-29T23:15:17.615Z","objectId":"3JTX8CY12F"}]}'
58
+ http_version:
59
+ recorded_at: Tue, 29 Jul 2014 23:17:03 GMT
60
+ - request:
61
+ method: delete
62
+ uri: https://api.parse.com/1/classes/Cactus/TRD3lrtSSd
63
+ body:
64
+ encoding: US-ASCII
65
+ string: ''
66
+ headers:
67
+ Content-Type:
68
+ - application/json
69
+ Accept:
70
+ - application/json
71
+ User-Agent:
72
+ - Parse for Ruby, 0.0
73
+ X-Parse-Rest-Api-Key:
74
+ - <X-Parse-REST-API-Key>
75
+ X-Parse-Application-Id:
76
+ - <X-Parse-Application-Id>
77
+ Expect:
78
+ - ''
79
+ response:
80
+ status:
81
+ code: 200
82
+ message: OK
83
+ headers:
84
+ Access-Control-Allow-Origin:
85
+ - '*'
86
+ Access-Control-Request-Method:
87
+ - '*'
88
+ Cache-Control:
89
+ - max-age=0, private, must-revalidate
90
+ Content-Type:
91
+ - application/json; charset=utf-8
92
+ Date:
93
+ - Tue, 29 Jul 2014 23:17:01 GMT
94
+ Etag:
95
+ - '"99914b932bd37a50b983c5e7c90ae93b"'
96
+ Server:
97
+ - nginx/1.6.0
98
+ Set-Cookie:
99
+ - <COOKIE-KEY>
100
+ Status:
101
+ - 200 OK
102
+ X-Content-Type-Options:
103
+ - nosniff
104
+ X-Runtime:
105
+ - '0.074949'
106
+ X-Ua-Compatible:
107
+ - IE=Edge,chrome=1
108
+ Content-Length:
109
+ - '2'
110
+ Connection:
111
+ - keep-alive
112
+ body:
113
+ encoding: ASCII-8BIT
114
+ string: '{}'
115
+ http_version:
116
+ recorded_at: Tue, 29 Jul 2014 23:17:04 GMT
117
+ - request:
118
+ method: delete
119
+ uri: https://api.parse.com/1/classes/Cactus/3JTX8CY12F
120
+ body:
121
+ encoding: US-ASCII
122
+ string: ''
123
+ headers:
124
+ Content-Type:
125
+ - application/json
126
+ Accept:
127
+ - application/json
128
+ User-Agent:
129
+ - Parse for Ruby, 0.0
130
+ X-Parse-Rest-Api-Key:
131
+ - <X-Parse-REST-API-Key>
132
+ X-Parse-Application-Id:
133
+ - <X-Parse-Application-Id>
134
+ Expect:
135
+ - ''
136
+ response:
137
+ status:
138
+ code: 200
139
+ message: OK
140
+ headers:
141
+ Access-Control-Allow-Origin:
142
+ - '*'
143
+ Access-Control-Request-Method:
144
+ - '*'
145
+ Cache-Control:
146
+ - max-age=0, private, must-revalidate
147
+ Content-Type:
148
+ - application/json; charset=utf-8
149
+ Date:
150
+ - Tue, 29 Jul 2014 23:17:01 GMT
151
+ Etag:
152
+ - '"99914b932bd37a50b983c5e7c90ae93b"'
153
+ Server:
154
+ - nginx/1.6.0
155
+ Set-Cookie:
156
+ - <COOKIE-KEY>
157
+ Status:
158
+ - 200 OK
159
+ X-Content-Type-Options:
160
+ - nosniff
161
+ X-Runtime:
162
+ - '0.078185'
163
+ X-Ua-Compatible:
164
+ - IE=Edge,chrome=1
165
+ Content-Length:
166
+ - '2'
167
+ Connection:
168
+ - keep-alive
169
+ body:
170
+ encoding: ASCII-8BIT
171
+ string: '{}'
172
+ http_version:
173
+ recorded_at: Tue, 29 Jul 2014 23:17:04 GMT
174
+ - request:
175
+ method: post
176
+ uri: https://api.parse.com/1/classes/Cactus
177
+ body:
178
+ encoding: UTF-8
179
+ string: '{"array":[1,2,5,6,7]}'
180
+ headers:
181
+ Content-Type:
182
+ - application/json
183
+ Accept:
184
+ - application/json
185
+ User-Agent:
186
+ - Parse for Ruby, 0.0
187
+ X-Parse-Rest-Api-Key:
188
+ - <X-Parse-REST-API-Key>
189
+ X-Parse-Application-Id:
190
+ - <X-Parse-Application-Id>
191
+ Expect:
192
+ - ''
193
+ response:
194
+ status:
195
+ code: 201
196
+ message: Created
197
+ headers:
198
+ Access-Control-Allow-Origin:
199
+ - '*'
200
+ Access-Control-Request-Method:
201
+ - '*'
202
+ Cache-Control:
203
+ - no-cache
204
+ Content-Type:
205
+ - application/json; charset=utf-8
206
+ Date:
207
+ - Tue, 29 Jul 2014 23:17:01 GMT
208
+ Location:
209
+ - https://api.parse.com/1/classes/Cactus/aRfKHerSiY
210
+ Server:
211
+ - nginx/1.6.0
212
+ Set-Cookie:
213
+ - <COOKIE-KEY>
214
+ Status:
215
+ - 201 Created
216
+ X-Content-Type-Options:
217
+ - nosniff
218
+ X-Runtime:
219
+ - '0.097259'
220
+ X-Ua-Compatible:
221
+ - IE=Edge,chrome=1
222
+ Content-Length:
223
+ - '64'
224
+ Connection:
225
+ - keep-alive
226
+ body:
227
+ encoding: ASCII-8BIT
228
+ string: '{"createdAt":"2014-07-29T23:17:01.774Z","objectId":"aRfKHerSiY"}'
229
+ http_version:
230
+ recorded_at: Tue, 29 Jul 2014 23:17:04 GMT
231
+ - request:
232
+ method: post
233
+ uri: https://api.parse.com/1/classes/Cactus
234
+ body:
235
+ encoding: UTF-8
236
+ string: '{"array":[3,4,5,6]}'
237
+ headers:
238
+ Content-Type:
239
+ - application/json
240
+ Accept:
241
+ - application/json
242
+ User-Agent:
243
+ - Parse for Ruby, 0.0
244
+ X-Parse-Rest-Api-Key:
245
+ - <X-Parse-REST-API-Key>
246
+ X-Parse-Application-Id:
247
+ - <X-Parse-Application-Id>
248
+ Expect:
249
+ - ''
250
+ response:
251
+ status:
252
+ code: 201
253
+ message: Created
254
+ headers:
255
+ Access-Control-Allow-Origin:
256
+ - '*'
257
+ Access-Control-Request-Method:
258
+ - '*'
259
+ Cache-Control:
260
+ - no-cache
261
+ Content-Type:
262
+ - application/json; charset=utf-8
263
+ Date:
264
+ - Tue, 29 Jul 2014 23:17:02 GMT
265
+ Location:
266
+ - https://api.parse.com/1/classes/Cactus/49IRCZEBBr
267
+ Server:
268
+ - nginx/1.6.0
269
+ Set-Cookie:
270
+ - <COOKIE-KEY>
271
+ Status:
272
+ - 201 Created
273
+ X-Content-Type-Options:
274
+ - nosniff
275
+ X-Runtime:
276
+ - '0.126357'
277
+ X-Ua-Compatible:
278
+ - IE=Edge,chrome=1
279
+ Content-Length:
280
+ - '64'
281
+ Connection:
282
+ - keep-alive
283
+ body:
284
+ encoding: ASCII-8BIT
285
+ string: '{"createdAt":"2014-07-29T23:17:02.032Z","objectId":"49IRCZEBBr"}'
286
+ http_version:
287
+ recorded_at: Tue, 29 Jul 2014 23:17:04 GMT
288
+ - request:
289
+ method: get
290
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B5,6%5D%7D%7D
291
+ body:
292
+ encoding: US-ASCII
293
+ string: ''
294
+ headers:
295
+ Content-Type:
296
+ - application/json
297
+ Accept:
298
+ - application/json
299
+ User-Agent:
300
+ - Parse for Ruby, 0.0
301
+ X-Parse-Rest-Api-Key:
302
+ - <X-Parse-REST-API-Key>
303
+ X-Parse-Application-Id:
304
+ - <X-Parse-Application-Id>
305
+ Expect:
306
+ - ''
307
+ response:
308
+ status:
309
+ code: 200
310
+ message: OK
311
+ headers:
312
+ Access-Control-Allow-Origin:
313
+ - '*'
314
+ Access-Control-Request-Method:
315
+ - '*'
316
+ Cache-Control:
317
+ - max-age=0, private, must-revalidate
318
+ Content-Type:
319
+ - application/json; charset=utf-8
320
+ Date:
321
+ - Tue, 29 Jul 2014 23:17:02 GMT
322
+ Etag:
323
+ - '"3dc3866a1837dd9ce06d243cfcd43af8"'
324
+ Server:
325
+ - nginx/1.6.0
326
+ Set-Cookie:
327
+ - <COOKIE-KEY>
328
+ Status:
329
+ - 200 OK
330
+ X-Content-Type-Options:
331
+ - nosniff
332
+ X-Runtime:
333
+ - '0.142504'
334
+ X-Ua-Compatible:
335
+ - IE=Edge,chrome=1
336
+ Content-Length:
337
+ - '259'
338
+ Connection:
339
+ - keep-alive
340
+ body:
341
+ encoding: ASCII-8BIT
342
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2014-07-29T23:17:01.774Z","updatedAt":"2014-07-29T23:17:01.774Z","objectId":"aRfKHerSiY"},{"array":[3,4,5,6],"createdAt":"2014-07-29T23:17:02.032Z","updatedAt":"2014-07-29T23:17:02.032Z","objectId":"49IRCZEBBr"}]}'
343
+ http_version:
344
+ recorded_at: Tue, 29 Jul 2014 23:17:05 GMT
345
+ - request:
346
+ method: get
347
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B1,5,6%5D%7D%7D
348
+ body:
349
+ encoding: US-ASCII
350
+ string: ''
351
+ headers:
352
+ Content-Type:
353
+ - application/json
354
+ Accept:
355
+ - application/json
356
+ User-Agent:
357
+ - Parse for Ruby, 0.0
358
+ X-Parse-Rest-Api-Key:
359
+ - <X-Parse-REST-API-Key>
360
+ X-Parse-Application-Id:
361
+ - <X-Parse-Application-Id>
362
+ Expect:
363
+ - ''
364
+ response:
365
+ status:
366
+ code: 200
367
+ message: OK
368
+ headers:
369
+ Access-Control-Allow-Origin:
370
+ - '*'
371
+ Access-Control-Request-Method:
372
+ - '*'
373
+ Cache-Control:
374
+ - max-age=0, private, must-revalidate
375
+ Content-Type:
376
+ - application/json; charset=utf-8
377
+ Date:
378
+ - Tue, 29 Jul 2014 23:17:02 GMT
379
+ Etag:
380
+ - '"019c5bcea7a81f41cbba668aaef5d707"'
381
+ Server:
382
+ - nginx/1.6.0
383
+ Set-Cookie:
384
+ - <COOKIE-KEY>
385
+ Status:
386
+ - 200 OK
387
+ X-Content-Type-Options:
388
+ - nosniff
389
+ X-Runtime:
390
+ - '0.040797'
391
+ X-Ua-Compatible:
392
+ - IE=Edge,chrome=1
393
+ Content-Length:
394
+ - '137'
395
+ Connection:
396
+ - keep-alive
397
+ body:
398
+ encoding: ASCII-8BIT
399
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2014-07-29T23:17:01.774Z","updatedAt":"2014-07-29T23:17:01.774Z","objectId":"aRfKHerSiY"}]}'
400
+ http_version:
401
+ recorded_at: Tue, 29 Jul 2014 23:17:05 GMT
402
+ - request:
403
+ method: get
404
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B1,5,6%5D%7D%7D
405
+ body:
406
+ encoding: US-ASCII
407
+ string: ''
408
+ headers:
409
+ Content-Type:
410
+ - application/json
411
+ Accept:
412
+ - application/json
413
+ User-Agent:
414
+ - Parse for Ruby, 0.0
415
+ X-Parse-Rest-Api-Key:
416
+ - <X-Parse-REST-API-Key>
417
+ X-Parse-Application-Id:
418
+ - <X-Parse-Application-Id>
419
+ Expect:
420
+ - ''
421
+ response:
422
+ status:
423
+ code: 200
424
+ message: OK
425
+ headers:
426
+ Access-Control-Allow-Origin:
427
+ - '*'
428
+ Access-Control-Request-Method:
429
+ - '*'
430
+ Cache-Control:
431
+ - max-age=0, private, must-revalidate
432
+ Content-Type:
433
+ - application/json; charset=utf-8
434
+ Date:
435
+ - Tue, 29 Jul 2014 23:17:02 GMT
436
+ Etag:
437
+ - '"019c5bcea7a81f41cbba668aaef5d707"'
438
+ Server:
439
+ - nginx/1.6.0
440
+ Set-Cookie:
441
+ - <COOKIE-KEY>
442
+ Status:
443
+ - 200 OK
444
+ X-Content-Type-Options:
445
+ - nosniff
446
+ X-Runtime:
447
+ - '0.157343'
448
+ X-Ua-Compatible:
449
+ - IE=Edge,chrome=1
450
+ Content-Length:
451
+ - '137'
452
+ Connection:
453
+ - keep-alive
454
+ body:
455
+ encoding: ASCII-8BIT
456
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2014-07-29T23:17:01.774Z","updatedAt":"2014-07-29T23:17:01.774Z","objectId":"aRfKHerSiY"}]}'
457
+ http_version:
458
+ recorded_at: Tue, 29 Jul 2014 23:17:05 GMT
459
+ - request:
460
+ method: get
461
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B4,5,6%5D%7D%7D
462
+ body:
463
+ encoding: US-ASCII
464
+ string: ''
465
+ headers:
466
+ Content-Type:
467
+ - application/json
468
+ Accept:
469
+ - application/json
470
+ User-Agent:
471
+ - Parse for Ruby, 0.0
472
+ X-Parse-Rest-Api-Key:
473
+ - <X-Parse-REST-API-Key>
474
+ X-Parse-Application-Id:
475
+ - <X-Parse-Application-Id>
476
+ Expect:
477
+ - ''
478
+ response:
479
+ status:
480
+ code: 200
481
+ message: OK
482
+ headers:
483
+ Access-Control-Allow-Origin:
484
+ - '*'
485
+ Access-Control-Request-Method:
486
+ - '*'
487
+ Cache-Control:
488
+ - max-age=0, private, must-revalidate
489
+ Content-Type:
490
+ - application/json; charset=utf-8
491
+ Date:
492
+ - Tue, 29 Jul 2014 23:17:03 GMT
493
+ Etag:
494
+ - '"1198e9518a70fc07882f407664b4c4b5"'
495
+ Server:
496
+ - nginx/1.6.0
497
+ Set-Cookie:
498
+ - <COOKIE-KEY>
499
+ Status:
500
+ - 200 OK
501
+ X-Content-Type-Options:
502
+ - nosniff
503
+ X-Runtime:
504
+ - '0.150038'
505
+ X-Ua-Compatible:
506
+ - IE=Edge,chrome=1
507
+ Content-Length:
508
+ - '135'
509
+ Connection:
510
+ - keep-alive
511
+ body:
512
+ encoding: ASCII-8BIT
513
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2014-07-29T23:17:02.032Z","updatedAt":"2014-07-29T23:17:02.032Z","objectId":"49IRCZEBBr"}]}'
514
+ http_version:
515
+ recorded_at: Tue, 29 Jul 2014 23:17:05 GMT
516
+ - request:
517
+ method: get
518
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B4,5,6%5D%7D%7D
519
+ body:
520
+ encoding: US-ASCII
521
+ string: ''
522
+ headers:
523
+ Content-Type:
524
+ - application/json
525
+ Accept:
526
+ - application/json
527
+ User-Agent:
528
+ - Parse for Ruby, 0.0
529
+ X-Parse-Rest-Api-Key:
530
+ - <X-Parse-REST-API-Key>
531
+ X-Parse-Application-Id:
532
+ - <X-Parse-Application-Id>
533
+ Expect:
534
+ - ''
535
+ response:
536
+ status:
537
+ code: 200
538
+ message: OK
539
+ headers:
540
+ Access-Control-Allow-Origin:
541
+ - '*'
542
+ Access-Control-Request-Method:
543
+ - '*'
544
+ Cache-Control:
545
+ - max-age=0, private, must-revalidate
546
+ Content-Type:
547
+ - application/json; charset=utf-8
548
+ Date:
549
+ - Tue, 29 Jul 2014 23:17:03 GMT
550
+ Etag:
551
+ - '"1198e9518a70fc07882f407664b4c4b5"'
552
+ Server:
553
+ - nginx/1.6.0
554
+ Set-Cookie:
555
+ - <COOKIE-KEY>
556
+ Status:
557
+ - 200 OK
558
+ X-Content-Type-Options:
559
+ - nosniff
560
+ X-Runtime:
561
+ - '0.178351'
562
+ X-Ua-Compatible:
563
+ - IE=Edge,chrome=1
564
+ Content-Length:
565
+ - '135'
566
+ Connection:
567
+ - keep-alive
568
+ body:
569
+ encoding: ASCII-8BIT
570
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2014-07-29T23:17:02.032Z","updatedAt":"2014-07-29T23:17:02.032Z","objectId":"49IRCZEBBr"}]}'
571
+ http_version:
572
+ recorded_at: Tue, 29 Jul 2014 23:17:06 GMT
573
+ - request:
574
+ method: get
575
+ uri: https://api.parse.com/1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B9%5D%7D%7D
576
+ body:
577
+ encoding: US-ASCII
578
+ string: ''
579
+ headers:
580
+ Content-Type:
581
+ - application/json
582
+ Accept:
583
+ - application/json
584
+ User-Agent:
585
+ - Parse for Ruby, 0.0
586
+ X-Parse-Rest-Api-Key:
587
+ - <X-Parse-REST-API-Key>
588
+ X-Parse-Application-Id:
589
+ - <X-Parse-Application-Id>
590
+ Expect:
591
+ - ''
592
+ response:
593
+ status:
594
+ code: 200
595
+ message: OK
596
+ headers:
597
+ Access-Control-Allow-Origin:
598
+ - '*'
599
+ Access-Control-Request-Method:
600
+ - '*'
601
+ Cache-Control:
602
+ - max-age=0, private, must-revalidate
603
+ Content-Type:
604
+ - application/json; charset=utf-8
605
+ Date:
606
+ - Tue, 29 Jul 2014 23:17:03 GMT
607
+ Etag:
608
+ - '"e2412c1ffbfb6b53a82a9daf665b2c1a"'
609
+ Server:
610
+ - nginx/1.6.0
611
+ Set-Cookie:
612
+ - <COOKIE-KEY>
613
+ Status:
614
+ - 200 OK
615
+ X-Content-Type-Options:
616
+ - nosniff
617
+ X-Runtime:
618
+ - '0.057104'
619
+ X-Ua-Compatible:
620
+ - IE=Edge,chrome=1
621
+ Content-Length:
622
+ - '14'
623
+ Connection:
624
+ - keep-alive
625
+ body:
626
+ encoding: ASCII-8BIT
627
+ string: '{"results":[]}'
628
+ http_version:
629
+ recorded_at: Tue, 29 Jul 2014 23:17:06 GMT
630
+ - request:
631
+ method: get
632
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%7D
633
+ body:
634
+ encoding: US-ASCII
635
+ string: ''
636
+ headers:
637
+ User-Agent:
638
+ - Parse for Ruby, 0.0
639
+ Content-Type:
640
+ - application/json
641
+ X-Avoscloud-Application-Id:
642
+ - <X-AVOSCloud-Application-Id>
643
+ X-Avoscloud-Application-Key:
644
+ - <X-AVOSCloud-Application-Key>
645
+ Accept-Encoding:
646
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
647
+ Accept:
648
+ - '*/*'
649
+ response:
650
+ status:
651
+ code: 200
652
+ message: OK
653
+ headers:
654
+ Server:
655
+ - Tengine
656
+ Date:
657
+ - Fri, 10 Apr 2015 09:10:56 GMT
658
+ Content-Type:
659
+ - application/json;charset=utf-8
660
+ Content-Length:
661
+ - '287'
662
+ Connection:
663
+ - keep-alive
664
+ Last-Modified:
665
+ - Fri, 10 Apr 2015 09:08:47.307 GMT
666
+ Cache-Control:
667
+ - no-cache,no-store
668
+ Pragma:
669
+ - no-cache
670
+ Strict-Transport-Security:
671
+ - max-age=31536000
672
+ body:
673
+ encoding: UTF-8
674
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2015-04-10T09:08:47.304Z","updatedAt":"2015-04-10T09:08:47.304Z","objectId":"5527931fe4b0da2c5def9ce8"},{"array":[1,2,5,6,7],"createdAt":"2015-04-10T09:08:47.011Z","updatedAt":"2015-04-10T09:08:47.011Z","objectId":"5527931fe4b0da2c5def9ce6"}]}'
675
+ http_version:
676
+ recorded_at: Fri, 10 Apr 2015 09:10:56 GMT
677
+ - request:
678
+ method: delete
679
+ uri: https://api.leancloud.cn/1.1/classes/Cactus/5527931fe4b0da2c5def9ce8
680
+ body:
681
+ encoding: US-ASCII
682
+ string: ''
683
+ headers:
684
+ User-Agent:
685
+ - Parse for Ruby, 0.0
686
+ Content-Type:
687
+ - application/json
688
+ X-Avoscloud-Application-Id:
689
+ - <X-AVOSCloud-Application-Id>
690
+ X-Avoscloud-Application-Key:
691
+ - <X-AVOSCloud-Application-Key>
692
+ Accept-Encoding:
693
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
694
+ Accept:
695
+ - '*/*'
696
+ response:
697
+ status:
698
+ code: 200
699
+ message: OK
700
+ headers:
701
+ Server:
702
+ - Tengine
703
+ Date:
704
+ - Fri, 10 Apr 2015 09:10:56 GMT
705
+ Content-Type:
706
+ - application/json;charset=utf-8
707
+ Content-Length:
708
+ - '2'
709
+ Connection:
710
+ - keep-alive
711
+ Cache-Control:
712
+ - no-cache,no-store
713
+ Pragma:
714
+ - no-cache
715
+ Strict-Transport-Security:
716
+ - max-age=31536000
717
+ body:
718
+ encoding: UTF-8
719
+ string: '{}'
720
+ http_version:
721
+ recorded_at: Fri, 10 Apr 2015 09:10:56 GMT
722
+ - request:
723
+ method: delete
724
+ uri: https://api.leancloud.cn/1.1/classes/Cactus/5527931fe4b0da2c5def9ce6
725
+ body:
726
+ encoding: US-ASCII
727
+ string: ''
728
+ headers:
729
+ User-Agent:
730
+ - Parse for Ruby, 0.0
731
+ Content-Type:
732
+ - application/json
733
+ X-Avoscloud-Application-Id:
734
+ - <X-AVOSCloud-Application-Id>
735
+ X-Avoscloud-Application-Key:
736
+ - <X-AVOSCloud-Application-Key>
737
+ Accept-Encoding:
738
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
739
+ Accept:
740
+ - '*/*'
741
+ response:
742
+ status:
743
+ code: 200
744
+ message: OK
745
+ headers:
746
+ Server:
747
+ - Tengine
748
+ Date:
749
+ - Fri, 10 Apr 2015 09:10:56 GMT
750
+ Content-Type:
751
+ - application/json;charset=utf-8
752
+ Content-Length:
753
+ - '2'
754
+ Connection:
755
+ - keep-alive
756
+ Cache-Control:
757
+ - no-cache,no-store
758
+ Pragma:
759
+ - no-cache
760
+ Strict-Transport-Security:
761
+ - max-age=31536000
762
+ body:
763
+ encoding: UTF-8
764
+ string: '{}'
765
+ http_version:
766
+ recorded_at: Fri, 10 Apr 2015 09:10:56 GMT
767
+ - request:
768
+ method: post
769
+ uri: https://api.leancloud.cn/1.1/classes/Cactus
770
+ body:
771
+ encoding: UTF-8
772
+ string: '{"array":[1,2,5,6,7]}'
773
+ headers:
774
+ User-Agent:
775
+ - Parse for Ruby, 0.0
776
+ Content-Type:
777
+ - application/json
778
+ X-Avoscloud-Application-Id:
779
+ - <X-AVOSCloud-Application-Id>
780
+ X-Avoscloud-Application-Key:
781
+ - <X-AVOSCloud-Application-Key>
782
+ Accept-Encoding:
783
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
784
+ Accept:
785
+ - '*/*'
786
+ response:
787
+ status:
788
+ code: 201
789
+ message: Created
790
+ headers:
791
+ Server:
792
+ - Tengine
793
+ Date:
794
+ - Fri, 10 Apr 2015 09:10:56 GMT
795
+ Content-Type:
796
+ - application/json;charset=utf-8
797
+ Content-Length:
798
+ - '78'
799
+ Connection:
800
+ - keep-alive
801
+ Location:
802
+ - /1.1/classes/Cactus/552793a0e4b0da2c5defa240
803
+ Cache-Control:
804
+ - no-cache,no-store
805
+ Pragma:
806
+ - no-cache
807
+ Strict-Transport-Security:
808
+ - max-age=31536000
809
+ body:
810
+ encoding: UTF-8
811
+ string: '{"createdAt":"2015-04-10T09:10:56.945Z","objectId":"552793a0e4b0da2c5defa240"}'
812
+ http_version:
813
+ recorded_at: Fri, 10 Apr 2015 09:10:56 GMT
814
+ - request:
815
+ method: post
816
+ uri: https://api.leancloud.cn/1.1/classes/Cactus
817
+ body:
818
+ encoding: UTF-8
819
+ string: '{"array":[3,4,5,6]}'
820
+ headers:
821
+ User-Agent:
822
+ - Parse for Ruby, 0.0
823
+ Content-Type:
824
+ - application/json
825
+ X-Avoscloud-Application-Id:
826
+ - <X-AVOSCloud-Application-Id>
827
+ X-Avoscloud-Application-Key:
828
+ - <X-AVOSCloud-Application-Key>
829
+ Accept-Encoding:
830
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
831
+ Accept:
832
+ - '*/*'
833
+ response:
834
+ status:
835
+ code: 201
836
+ message: Created
837
+ headers:
838
+ Server:
839
+ - Tengine
840
+ Date:
841
+ - Fri, 10 Apr 2015 09:10:57 GMT
842
+ Content-Type:
843
+ - application/json;charset=utf-8
844
+ Content-Length:
845
+ - '78'
846
+ Connection:
847
+ - keep-alive
848
+ Location:
849
+ - /1.1/classes/Cactus/552793a1e4b0da2c5defa242
850
+ Cache-Control:
851
+ - no-cache,no-store
852
+ Pragma:
853
+ - no-cache
854
+ Strict-Transport-Security:
855
+ - max-age=31536000
856
+ body:
857
+ encoding: UTF-8
858
+ string: '{"createdAt":"2015-04-10T09:10:57.262Z","objectId":"552793a1e4b0da2c5defa242"}'
859
+ http_version:
860
+ recorded_at: Fri, 10 Apr 2015 09:10:57 GMT
861
+ - request:
862
+ method: get
863
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B5,6%5D%7D%7D
864
+ body:
865
+ encoding: US-ASCII
866
+ string: ''
867
+ headers:
868
+ User-Agent:
869
+ - Parse for Ruby, 0.0
870
+ Content-Type:
871
+ - application/json
872
+ X-Avoscloud-Application-Id:
873
+ - <X-AVOSCloud-Application-Id>
874
+ X-Avoscloud-Application-Key:
875
+ - <X-AVOSCloud-Application-Key>
876
+ Accept-Encoding:
877
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
878
+ Accept:
879
+ - '*/*'
880
+ response:
881
+ status:
882
+ code: 200
883
+ message: OK
884
+ headers:
885
+ Server:
886
+ - Tengine
887
+ Date:
888
+ - Fri, 10 Apr 2015 09:10:57 GMT
889
+ Content-Type:
890
+ - application/json;charset=utf-8
891
+ Content-Length:
892
+ - '287'
893
+ Connection:
894
+ - keep-alive
895
+ Last-Modified:
896
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
897
+ Cache-Control:
898
+ - no-cache,no-store
899
+ Pragma:
900
+ - no-cache
901
+ Strict-Transport-Security:
902
+ - max-age=31536000
903
+ body:
904
+ encoding: UTF-8
905
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2015-04-10T09:10:57.262Z","updatedAt":"2015-04-10T09:10:57.262Z","objectId":"552793a1e4b0da2c5defa242"},{"array":[1,2,5,6,7],"createdAt":"2015-04-10T09:10:56.945Z","updatedAt":"2015-04-10T09:10:56.945Z","objectId":"552793a0e4b0da2c5defa240"}]}'
906
+ http_version:
907
+ recorded_at: Fri, 10 Apr 2015 09:10:57 GMT
908
+ - request:
909
+ method: get
910
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B1,5,6%5D%7D%7D
911
+ body:
912
+ encoding: US-ASCII
913
+ string: ''
914
+ headers:
915
+ User-Agent:
916
+ - Parse for Ruby, 0.0
917
+ Content-Type:
918
+ - application/json
919
+ X-Avoscloud-Application-Id:
920
+ - <X-AVOSCloud-Application-Id>
921
+ X-Avoscloud-Application-Key:
922
+ - <X-AVOSCloud-Application-Key>
923
+ Accept-Encoding:
924
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
925
+ Accept:
926
+ - '*/*'
927
+ response:
928
+ status:
929
+ code: 200
930
+ message: OK
931
+ headers:
932
+ Server:
933
+ - Tengine
934
+ Date:
935
+ - Fri, 10 Apr 2015 09:10:57 GMT
936
+ Content-Type:
937
+ - application/json;charset=utf-8
938
+ Content-Length:
939
+ - '151'
940
+ Connection:
941
+ - keep-alive
942
+ Last-Modified:
943
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
944
+ Cache-Control:
945
+ - no-cache,no-store
946
+ Pragma:
947
+ - no-cache
948
+ Strict-Transport-Security:
949
+ - max-age=31536000
950
+ body:
951
+ encoding: UTF-8
952
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2015-04-10T09:10:56.945Z","updatedAt":"2015-04-10T09:10:56.945Z","objectId":"552793a0e4b0da2c5defa240"}]}'
953
+ http_version:
954
+ recorded_at: Fri, 10 Apr 2015 09:10:57 GMT
955
+ - request:
956
+ method: get
957
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B1,5,6%5D%7D%7D
958
+ body:
959
+ encoding: US-ASCII
960
+ string: ''
961
+ headers:
962
+ User-Agent:
963
+ - Parse for Ruby, 0.0
964
+ Content-Type:
965
+ - application/json
966
+ X-Avoscloud-Application-Id:
967
+ - <X-AVOSCloud-Application-Id>
968
+ X-Avoscloud-Application-Key:
969
+ - <X-AVOSCloud-Application-Key>
970
+ Accept-Encoding:
971
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
972
+ Accept:
973
+ - '*/*'
974
+ response:
975
+ status:
976
+ code: 200
977
+ message: OK
978
+ headers:
979
+ Server:
980
+ - Tengine
981
+ Date:
982
+ - Fri, 10 Apr 2015 09:10:57 GMT
983
+ Content-Type:
984
+ - application/json;charset=utf-8
985
+ Content-Length:
986
+ - '151'
987
+ Connection:
988
+ - keep-alive
989
+ Last-Modified:
990
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
991
+ Cache-Control:
992
+ - no-cache,no-store
993
+ Pragma:
994
+ - no-cache
995
+ Strict-Transport-Security:
996
+ - max-age=31536000
997
+ body:
998
+ encoding: UTF-8
999
+ string: '{"results":[{"array":[1,2,5,6,7],"createdAt":"2015-04-10T09:10:56.945Z","updatedAt":"2015-04-10T09:10:56.945Z","objectId":"552793a0e4b0da2c5defa240"}]}'
1000
+ http_version:
1001
+ recorded_at: Fri, 10 Apr 2015 09:10:57 GMT
1002
+ - request:
1003
+ method: get
1004
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B4,5,6%5D%7D%7D
1005
+ body:
1006
+ encoding: US-ASCII
1007
+ string: ''
1008
+ headers:
1009
+ User-Agent:
1010
+ - Parse for Ruby, 0.0
1011
+ Content-Type:
1012
+ - application/json
1013
+ X-Avoscloud-Application-Id:
1014
+ - <X-AVOSCloud-Application-Id>
1015
+ X-Avoscloud-Application-Key:
1016
+ - <X-AVOSCloud-Application-Key>
1017
+ Accept-Encoding:
1018
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1019
+ Accept:
1020
+ - '*/*'
1021
+ response:
1022
+ status:
1023
+ code: 200
1024
+ message: OK
1025
+ headers:
1026
+ Server:
1027
+ - Tengine
1028
+ Date:
1029
+ - Fri, 10 Apr 2015 09:10:58 GMT
1030
+ Content-Type:
1031
+ - application/json;charset=utf-8
1032
+ Content-Length:
1033
+ - '149'
1034
+ Connection:
1035
+ - keep-alive
1036
+ Last-Modified:
1037
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
1038
+ Cache-Control:
1039
+ - no-cache,no-store
1040
+ Pragma:
1041
+ - no-cache
1042
+ Strict-Transport-Security:
1043
+ - max-age=31536000
1044
+ body:
1045
+ encoding: UTF-8
1046
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2015-04-10T09:10:57.262Z","updatedAt":"2015-04-10T09:10:57.262Z","objectId":"552793a1e4b0da2c5defa242"}]}'
1047
+ http_version:
1048
+ recorded_at: Fri, 10 Apr 2015 09:10:58 GMT
1049
+ - request:
1050
+ method: get
1051
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B4,5,6%5D%7D%7D
1052
+ body:
1053
+ encoding: US-ASCII
1054
+ string: ''
1055
+ headers:
1056
+ User-Agent:
1057
+ - Parse for Ruby, 0.0
1058
+ Content-Type:
1059
+ - application/json
1060
+ X-Avoscloud-Application-Id:
1061
+ - <X-AVOSCloud-Application-Id>
1062
+ X-Avoscloud-Application-Key:
1063
+ - <X-AVOSCloud-Application-Key>
1064
+ Accept-Encoding:
1065
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1066
+ Accept:
1067
+ - '*/*'
1068
+ response:
1069
+ status:
1070
+ code: 200
1071
+ message: OK
1072
+ headers:
1073
+ Server:
1074
+ - Tengine
1075
+ Date:
1076
+ - Fri, 10 Apr 2015 09:10:58 GMT
1077
+ Content-Type:
1078
+ - application/json;charset=utf-8
1079
+ Content-Length:
1080
+ - '149'
1081
+ Connection:
1082
+ - keep-alive
1083
+ Last-Modified:
1084
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
1085
+ Cache-Control:
1086
+ - no-cache,no-store
1087
+ Pragma:
1088
+ - no-cache
1089
+ Strict-Transport-Security:
1090
+ - max-age=31536000
1091
+ body:
1092
+ encoding: UTF-8
1093
+ string: '{"results":[{"array":[3,4,5,6],"createdAt":"2015-04-10T09:10:57.262Z","updatedAt":"2015-04-10T09:10:57.262Z","objectId":"552793a1e4b0da2c5defa242"}]}'
1094
+ http_version:
1095
+ recorded_at: Fri, 10 Apr 2015 09:10:58 GMT
1096
+ - request:
1097
+ method: get
1098
+ uri: https://api.leancloud.cn/1.1/classes/Cactus?where=%7B%22array%22:%7B%22$all%22:%5B9%5D%7D%7D
1099
+ body:
1100
+ encoding: US-ASCII
1101
+ string: ''
1102
+ headers:
1103
+ User-Agent:
1104
+ - Parse for Ruby, 0.0
1105
+ Content-Type:
1106
+ - application/json
1107
+ X-Avoscloud-Application-Id:
1108
+ - <X-AVOSCloud-Application-Id>
1109
+ X-Avoscloud-Application-Key:
1110
+ - <X-AVOSCloud-Application-Key>
1111
+ Accept-Encoding:
1112
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1113
+ Accept:
1114
+ - '*/*'
1115
+ response:
1116
+ status:
1117
+ code: 200
1118
+ message: OK
1119
+ headers:
1120
+ Server:
1121
+ - Tengine
1122
+ Date:
1123
+ - Fri, 10 Apr 2015 09:10:58 GMT
1124
+ Content-Type:
1125
+ - application/json;charset=utf-8
1126
+ Content-Length:
1127
+ - '14'
1128
+ Connection:
1129
+ - keep-alive
1130
+ Last-Modified:
1131
+ - Fri, 10 Apr 2015 09:10:57.265 GMT
1132
+ Cache-Control:
1133
+ - no-cache,no-store
1134
+ Pragma:
1135
+ - no-cache
1136
+ Strict-Transport-Security:
1137
+ - max-age=31536000
1138
+ body:
1139
+ encoding: UTF-8
1140
+ string: '{"results":[]}'
1141
+ http_version:
1142
+ recorded_at: Fri, 10 Apr 2015 09:10:58 GMT
1143
+ recorded_with: VCR 2.4.0