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,109 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/TestSave
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"foo":"bar"}'
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-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:15 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/TestSave/WTy89mqKGD
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.216729'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"createdAt":"2013-04-22T16:03:15.082Z","objectId":"WTy89mqKGD"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:15 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.leancloud.cn/1.1/classes/TestSave
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"foo":"bar"}'
68
+ headers:
69
+ User-Agent:
70
+ - Parse for Ruby, 0.0
71
+ Content-Type:
72
+ - application/json
73
+ X-Avoscloud-Application-Id:
74
+ - <X-AVOSCloud-Application-Id>
75
+ X-Avoscloud-Application-Key:
76
+ - <X-AVOSCloud-Application-Key>
77
+ Accept-Encoding:
78
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
79
+ Accept:
80
+ - '*/*'
81
+ response:
82
+ status:
83
+ code: 201
84
+ message: Created
85
+ headers:
86
+ Server:
87
+ - Tengine
88
+ Date:
89
+ - Fri, 10 Apr 2015 09:10:39 GMT
90
+ Content-Type:
91
+ - application/json;charset=utf-8
92
+ Content-Length:
93
+ - '78'
94
+ Connection:
95
+ - keep-alive
96
+ Location:
97
+ - /1.1/classes/TestSave/5527938fe4b0da2c5defa169
98
+ Cache-Control:
99
+ - no-cache,no-store
100
+ Pragma:
101
+ - no-cache
102
+ Strict-Transport-Security:
103
+ - max-age=31536000
104
+ body:
105
+ encoding: UTF-8
106
+ string: '{"createdAt":"2015-04-10T09:10:39.683Z","objectId":"5527938fe4b0da2c5defa169"}'
107
+ http_version:
108
+ recorded_at: Fri, 10 Apr 2015 09:10:39 GMT
109
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,109 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/files/hello.txt
6
+ body:
7
+ encoding: US-ASCII
8
+ string: Hello World!
9
+ headers:
10
+ Content-Type:
11
+ - text/plain
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Parse for Ruby, 0.0
16
+ X-Parse-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:16 GMT
41
+ Location:
42
+ - http://files.parse.com/5c5d4752-8b5b-4a2b-9e5e-781c530f797b/807c829a-110e-4b33-86bb-43c9d7f57333-hello.txt
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.074838'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '172'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"url":"http://files.parse.com/5c5d4752-8b5b-4a2b-9e5e-781c530f797b/807c829a-110e-4b33-86bb-43c9d7f57333-hello.txt","name":"807c829a-110e-4b33-86bb-43c9d7f57333-hello.txt"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:16 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.leancloud.cn/1.1/files/hello.txt
65
+ body:
66
+ encoding: UTF-8
67
+ string: Hello World!
68
+ headers:
69
+ User-Agent:
70
+ - Parse for Ruby, 0.0
71
+ Content-Type:
72
+ - text/plain
73
+ X-Avoscloud-Application-Id:
74
+ - <X-AVOSCloud-Application-Id>
75
+ X-Avoscloud-Application-Key:
76
+ - <X-AVOSCloud-Application-Key>
77
+ Accept-Encoding:
78
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
79
+ Accept:
80
+ - '*/*'
81
+ response:
82
+ status:
83
+ code: 201
84
+ message: Created
85
+ headers:
86
+ Server:
87
+ - Tengine
88
+ Date:
89
+ - Fri, 10 Apr 2015 09:10:43 GMT
90
+ Content-Type:
91
+ - application/json;charset=utf-8
92
+ Content-Length:
93
+ - '214'
94
+ Connection:
95
+ - keep-alive
96
+ Location:
97
+ - /1.1/classes/_File/55279393e4b0da2c5defa196
98
+ Cache-Control:
99
+ - no-cache,no-store
100
+ Pragma:
101
+ - no-cache
102
+ Strict-Transport-Security:
103
+ - max-age=31536000
104
+ body:
105
+ encoding: UTF-8
106
+ string: '{"size":12,"bucket":"7104en0u","url":"http:\/\/ac-7104en0u.clouddn.com\/tMpGhULp3t5XqCjsaOJFNM3yGX6IdiWxOMwn7g0z.txt","name":"hello.txt","createdAt":"2015-04-10T09:10:43.324Z","objectId":"55279393e4b0da2c5defa196"}'
107
+ http_version:
108
+ recorded_at: Fri, 10 Apr 2015 09:10:43 GMT
109
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,213 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/TestSave
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"age":20}'
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-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:15 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/TestSave/ZktEu4WIv0
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.037566'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"createdAt":"2013-04-22T16:03:15.393Z","objectId":"ZktEu4WIv0"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:15 GMT
62
+ - request:
63
+ method: put
64
+ uri: https://api.parse.com/1/classes/TestSave/ZktEu4WIv0
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"age":40}'
68
+ headers:
69
+ Content-Type:
70
+ - application/json
71
+ Accept:
72
+ - application/json
73
+ User-Agent:
74
+ - Parse for Ruby, 0.0
75
+ X-Parse-Master-Key:
76
+ - ''
77
+ X-Parse-Rest-Api-Key:
78
+ - <X-Parse-REST-API-Key>
79
+ X-Parse-Application-Id:
80
+ - <X-Parse-Application-Id>
81
+ X-Parse-Session-Token:
82
+ - ''
83
+ Expect:
84
+ - ''
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - '*'
92
+ Access-Control-Request-Method:
93
+ - '*'
94
+ Cache-Control:
95
+ - max-age=0, private, must-revalidate
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Date:
99
+ - Mon, 22 Apr 2013 16:03:15 GMT
100
+ Etag:
101
+ - '"4c37cdfe0177a31ced681163a966bf82"'
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 200 OK
108
+ X-Runtime:
109
+ - '0.050943'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - '40'
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: '{"updatedAt":"2013-04-22T16:03:15.462Z"}'
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:15 GMT
121
+ - request:
122
+ method: post
123
+ uri: https://api.leancloud.cn/1.1/classes/TestSave
124
+ body:
125
+ encoding: UTF-8
126
+ string: '{"age":20}'
127
+ headers:
128
+ User-Agent:
129
+ - Parse for Ruby, 0.0
130
+ Content-Type:
131
+ - application/json
132
+ X-Avoscloud-Application-Id:
133
+ - <X-AVOSCloud-Application-Id>
134
+ X-Avoscloud-Application-Key:
135
+ - <X-AVOSCloud-Application-Key>
136
+ Accept-Encoding:
137
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
138
+ Accept:
139
+ - '*/*'
140
+ response:
141
+ status:
142
+ code: 201
143
+ message: Created
144
+ headers:
145
+ Server:
146
+ - Tengine
147
+ Date:
148
+ - Fri, 10 Apr 2015 09:10:39 GMT
149
+ Content-Type:
150
+ - application/json;charset=utf-8
151
+ Content-Length:
152
+ - '78'
153
+ Connection:
154
+ - keep-alive
155
+ Location:
156
+ - /1.1/classes/TestSave/55279390e4b0da2c5defa16e
157
+ Cache-Control:
158
+ - no-cache,no-store
159
+ Pragma:
160
+ - no-cache
161
+ Strict-Transport-Security:
162
+ - max-age=31536000
163
+ body:
164
+ encoding: UTF-8
165
+ string: '{"createdAt":"2015-04-10T09:10:40.008Z","objectId":"55279390e4b0da2c5defa16e"}'
166
+ http_version:
167
+ recorded_at: Fri, 10 Apr 2015 09:10:40 GMT
168
+ - request:
169
+ method: put
170
+ uri: https://api.leancloud.cn/1.1/classes/TestSave/55279390e4b0da2c5defa16e?new=true
171
+ body:
172
+ encoding: UTF-8
173
+ string: '{"age":40}'
174
+ headers:
175
+ User-Agent:
176
+ - Parse for Ruby, 0.0
177
+ Content-Type:
178
+ - application/json
179
+ X-Avoscloud-Application-Id:
180
+ - <X-AVOSCloud-Application-Id>
181
+ X-Avoscloud-Application-Key:
182
+ - <X-AVOSCloud-Application-Key>
183
+ Accept-Encoding:
184
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
185
+ Accept:
186
+ - '*/*'
187
+ response:
188
+ status:
189
+ code: 200
190
+ message: OK
191
+ headers:
192
+ Server:
193
+ - Tengine
194
+ Date:
195
+ - Fri, 10 Apr 2015 09:10:40 GMT
196
+ Content-Type:
197
+ - application/json;charset=utf-8
198
+ Content-Length:
199
+ - '87'
200
+ Connection:
201
+ - keep-alive
202
+ Cache-Control:
203
+ - no-cache,no-store
204
+ Pragma:
205
+ - no-cache
206
+ Strict-Transport-Security:
207
+ - max-age=31536000
208
+ body:
209
+ encoding: UTF-8
210
+ string: '{"objectId":"55279390e4b0da2c5defa16e","age":40,"updatedAt":"2015-04-10T09:10:40.324Z"}'
211
+ http_version:
212
+ recorded_at: Fri, 10 Apr 2015 09:10:40 GMT
213
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,213 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/Post
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"title":"hello"}'
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-Master-Key:
17
+ - ''
18
+ X-Parse-Rest-Api-Key:
19
+ - <X-Parse-REST-API-Key>
20
+ X-Parse-Application-Id:
21
+ - <X-Parse-Application-Id>
22
+ X-Parse-Session-Token:
23
+ - ''
24
+ Expect:
25
+ - ''
26
+ response:
27
+ status:
28
+ code: 201
29
+ message: Created
30
+ headers:
31
+ Access-Control-Allow-Origin:
32
+ - '*'
33
+ Access-Control-Request-Method:
34
+ - '*'
35
+ Cache-Control:
36
+ - no-cache
37
+ Content-Type:
38
+ - application/json; charset=utf-8
39
+ Date:
40
+ - Mon, 22 Apr 2013 16:03:23 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/Post/UzS4Cr4U3J
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.025069'
51
+ X-Ua-Compatible:
52
+ - IE=Edge,chrome=1
53
+ Content-Length:
54
+ - '64'
55
+ Connection:
56
+ - keep-alive
57
+ body:
58
+ encoding: ASCII-8BIT
59
+ string: '{"createdAt":"2013-04-22T16:03:23.371Z","objectId":"UzS4Cr4U3J"}'
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
62
+ - request:
63
+ method: put
64
+ uri: https://api.parse.com/1/classes/Post/UzS4Cr4U3J
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"title":"hello 2"}'
68
+ headers:
69
+ Content-Type:
70
+ - application/json
71
+ Accept:
72
+ - application/json
73
+ User-Agent:
74
+ - Parse for Ruby, 0.0
75
+ X-Parse-Master-Key:
76
+ - ''
77
+ X-Parse-Rest-Api-Key:
78
+ - <X-Parse-REST-API-Key>
79
+ X-Parse-Application-Id:
80
+ - <X-Parse-Application-Id>
81
+ X-Parse-Session-Token:
82
+ - ''
83
+ Expect:
84
+ - ''
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - '*'
92
+ Access-Control-Request-Method:
93
+ - '*'
94
+ Cache-Control:
95
+ - max-age=0, private, must-revalidate
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Date:
99
+ - Mon, 22 Apr 2013 16:03:23 GMT
100
+ Etag:
101
+ - '"713d90a679b7296644271208d96d7d8f"'
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 200 OK
108
+ X-Runtime:
109
+ - '0.060774'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - '40'
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: '{"updatedAt":"2013-04-22T16:03:23.498Z"}'
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:23 GMT
121
+ - request:
122
+ method: post
123
+ uri: https://api.leancloud.cn/1.1/classes/Post
124
+ body:
125
+ encoding: UTF-8
126
+ string: '{"title":"hello"}'
127
+ headers:
128
+ User-Agent:
129
+ - Parse for Ruby, 0.0
130
+ Content-Type:
131
+ - application/json
132
+ X-Avoscloud-Application-Id:
133
+ - <X-AVOSCloud-Application-Id>
134
+ X-Avoscloud-Application-Key:
135
+ - <X-AVOSCloud-Application-Key>
136
+ Accept-Encoding:
137
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
138
+ Accept:
139
+ - '*/*'
140
+ response:
141
+ status:
142
+ code: 201
143
+ message: Created
144
+ headers:
145
+ Server:
146
+ - Tengine
147
+ Date:
148
+ - Fri, 10 Apr 2015 09:10:55 GMT
149
+ Content-Type:
150
+ - application/json;charset=utf-8
151
+ Content-Length:
152
+ - '78'
153
+ Connection:
154
+ - keep-alive
155
+ Location:
156
+ - /1.1/classes/Post/5527939fe4b0da2c5defa234
157
+ Cache-Control:
158
+ - no-cache,no-store
159
+ Pragma:
160
+ - no-cache
161
+ Strict-Transport-Security:
162
+ - max-age=31536000
163
+ body:
164
+ encoding: UTF-8
165
+ string: '{"createdAt":"2015-04-10T09:10:55.609Z","objectId":"5527939fe4b0da2c5defa234"}'
166
+ http_version:
167
+ recorded_at: Fri, 10 Apr 2015 09:10:55 GMT
168
+ - request:
169
+ method: put
170
+ uri: https://api.leancloud.cn/1.1/classes/Post/5527939fe4b0da2c5defa234?new=true
171
+ body:
172
+ encoding: UTF-8
173
+ string: '{"title":"hello 2"}'
174
+ headers:
175
+ User-Agent:
176
+ - Parse for Ruby, 0.0
177
+ Content-Type:
178
+ - application/json
179
+ X-Avoscloud-Application-Id:
180
+ - <X-AVOSCloud-Application-Id>
181
+ X-Avoscloud-Application-Key:
182
+ - <X-AVOSCloud-Application-Key>
183
+ Accept-Encoding:
184
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
185
+ Accept:
186
+ - '*/*'
187
+ response:
188
+ status:
189
+ code: 200
190
+ message: OK
191
+ headers:
192
+ Server:
193
+ - Tengine
194
+ Date:
195
+ - Fri, 10 Apr 2015 09:10:55 GMT
196
+ Content-Type:
197
+ - application/json;charset=utf-8
198
+ Content-Length:
199
+ - '96'
200
+ Connection:
201
+ - keep-alive
202
+ Cache-Control:
203
+ - no-cache,no-store
204
+ Pragma:
205
+ - no-cache
206
+ Strict-Transport-Security:
207
+ - max-age=31536000
208
+ body:
209
+ encoding: UTF-8
210
+ string: '{"objectId":"5527939fe4b0da2c5defa234","title":"hello 2","updatedAt":"2015-04-10T09:10:55.930Z"}'
211
+ http_version:
212
+ recorded_at: Fri, 10 Apr 2015 09:10:55 GMT
213
+ recorded_with: VCR 2.4.0