parse-ruby-client 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/.travis.yml +3 -2
  2. data/Gemfile +12 -12
  3. data/Gemfile.lock +26 -12
  4. data/OLD_README.md +255 -0
  5. data/README.md +1038 -144
  6. data/Rakefile +2 -10
  7. data/VERSION +1 -1
  8. data/features.md +11 -11
  9. data/fixtures/vcr_cassettes/test_acls_arent_objects.yml +180 -0
  10. data/fixtures/vcr_cassettes/test_array_add.yml +20 -20
  11. data/fixtures/vcr_cassettes/test_array_add_pointerizing.yml +239 -0
  12. data/fixtures/vcr_cassettes/test_array_add_unique.yml +180 -0
  13. data/fixtures/vcr_cassettes/test_batch_create_object.yml +53 -80
  14. data/fixtures/vcr_cassettes/test_batch_delete_object.yml +303 -428
  15. data/fixtures/vcr_cassettes/test_batch_run.yml +53 -74
  16. data/fixtures/vcr_cassettes/test_batch_update_object.yml +303 -432
  17. data/fixtures/vcr_cassettes/test_circular_save.yml +121 -0
  18. data/fixtures/vcr_cassettes/test_created_at.yml +53 -74
  19. data/fixtures/vcr_cassettes/test_decrement.yml +121 -0
  20. data/fixtures/vcr_cassettes/test_deep_parse.yml +154 -218
  21. data/fixtures/vcr_cassettes/test_destroy.yml +104 -144
  22. data/fixtures/vcr_cassettes/test_eq_pointerize.yml +239 -0
  23. data/fixtures/vcr_cassettes/test_equality.yml +180 -0
  24. data/fixtures/vcr_cassettes/test_get.yml +104 -146
  25. data/fixtures/vcr_cassettes/test_get_missing.yml +60 -0
  26. data/fixtures/vcr_cassettes/test_include.yml +27 -27
  27. data/fixtures/vcr_cassettes/test_new_model.yml +53 -146
  28. data/fixtures/vcr_cassettes/test_new_object.yml +53 -74
  29. data/fixtures/vcr_cassettes/test_nils_delete_keys.yml +155 -216
  30. data/fixtures/vcr_cassettes/test_parse_delete.yml +204 -284
  31. data/fixtures/vcr_cassettes/test_pointer.yml +53 -74
  32. data/fixtures/vcr_cassettes/test_save_with_sub_objects.yml +298 -0
  33. data/fixtures/vcr_cassettes/test_saving_boolean_values.yml +121 -0
  34. data/fixtures/vcr_cassettes/test_server_update.yml +257 -358
  35. data/fixtures/vcr_cassettes/test_simple_save.yml +53 -74
  36. data/fixtures/vcr_cassettes/test_text_file_save.yml +53 -161
  37. data/fixtures/vcr_cassettes/test_update.yml +104 -144
  38. data/fixtures/vcr_cassettes/test_updated_at.yml +104 -144
  39. data/fixtures/vcr_cassettes/test_user_save.yml +10 -10
  40. data/lib/parse/client.rb +43 -6
  41. data/lib/parse/datatypes.rb +14 -35
  42. data/lib/parse/error.rb +8 -0
  43. data/lib/parse/object.rb +25 -20
  44. data/lib/parse/protocol.rb +3 -4
  45. data/lib/parse/query.rb +10 -9
  46. data/lib/parse/util.rb +36 -2
  47. data/parse-ruby-client.gemspec +22 -18
  48. data/test/helper.rb +33 -5
  49. data/test/test_batch.rb +1 -4
  50. data/test/test_client.rb +59 -7
  51. data/test/test_cloud.rb +3 -7
  52. data/test/test_datatypes.rb +6 -7
  53. data/test/test_file.rb +9 -10
  54. data/test/test_model.rb +1 -4
  55. data/test/test_object.rb +148 -6
  56. data/test/test_push.rb +1 -5
  57. data/test/test_query.rb +13 -3
  58. data/test/test_throttle.rb +1 -3
  59. data/test/test_user.rb +1 -5
  60. metadata +23 -19
  61. data/fixtures/vcr_cassettes/test_array_add_relation.yml +0 -321
  62. data/fixtures/vcr_cassettes/test_cloud_function.yml +0 -81
  63. data/fixtures/vcr_cassettes/test_file_save.yml +0 -87
  64. data/fixtures/vcr_cassettes/test_image_file_associate_with_object.yml +0 -2034
  65. data/fixtures/vcr_cassettes/test_image_file_save.yml +0 -1957
  66. data/fixtures/vcr_cassettes/test_object_id.yml +0 -83
  67. data/fixtures/vcr_cassettes/test_request_batch.yml +0 -62
data/Rakefile CHANGED
@@ -32,18 +32,10 @@ Rake::TestTask.new(:test) do |test|
32
32
  test.verbose = true
33
33
  end
34
34
 
35
- require 'rcov/rcovtask'
36
- Rcov::RcovTask.new do |test|
37
- test.libs << 'test'
38
- test.pattern = 'test/**/test_*.rb'
39
- test.verbose = true
40
- test.rcov_opts << '--exclude "gems/*"'
41
- end
42
-
43
35
  task :default => :test
44
36
 
45
- require 'rake/rdoctask'
46
- Rake::RDocTask.new do |rdoc|
37
+ require 'rdoc/task'
38
+ RDoc::Task.new do |rdoc|
47
39
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
40
 
49
41
  rdoc.rdoc_dir = 'rdoc'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.14
1
+ 0.1.15
@@ -179,7 +179,7 @@ game_score["score"] = Parse::Increment.new(1)
179
179
  game_score.save
180
180
  ```
181
181
 
182
- You can also use `Parse::Decrement.new(amount)`.
182
+ Use a negative amount to decrement.
183
183
 
184
184
  #### Arrays
185
185
 
@@ -243,7 +243,7 @@ You can delete a single field from an object by using the `Parse::Object#delete_
243
243
 
244
244
  To reduce the amount of time spent on network round trips, you can create, update, or delete several objects in one call, using the batch endpoint.
245
245
 
246
- parse-ruby-client provides a "manual" way to construct Batch Operations, as well as some convenience methods. The commands are run in the order they are given. For example, to create a couple of GameScore objects using the "manual" style, use `Parse::Batch#add_request`. `#add_request` takes a `Hash` with `"method"`, `"path"`, and `"body"` keys that specify the HTTP command that would normally be used for that command.
246
+ parse-ruby-client provides a "manual" way to construct Batch Operations, as well as some convenience methods. The commands are run in the order they are given. For example, to create a couple of GameScore objects using the "manual" style, use `Parse::Batch#add_request`. `#add_request` takes a `Hash` with `"method"`, `"path"`, and `"body"` keys that specify the HTTP command that would normally be used for that command.
247
247
 
248
248
  ```ruby
249
249
  batch = Parse::Batch.new
@@ -454,7 +454,7 @@ Other constraint methods include:
454
454
  <tr>
455
455
  <td>`Parse::Query#select`</td>
456
456
  <td>TODO: `$select` not yet implemented. This matches a value for a key in the result of a different query</td>
457
- </tr>
457
+ </tr>
458
458
  </table>
459
459
 
460
460
  For example, to retrieve scores between 1000 and 3000, including the endpoints, we could issue:
@@ -700,7 +700,7 @@ To sign up a new user, create a new `Parse::User` object and then call `#save` o
700
700
 
701
701
  ```ruby
702
702
  user = Parse::User.new({
703
- :username => "cooldude6",
703
+ :username => "cooldude6",
704
704
  :password => "p_n7!-e8",
705
705
  :phone => "415-392-0202"
706
706
  })
@@ -824,7 +824,7 @@ All of the options for queries that work for regular objects also work for user
824
824
 
825
825
  ### Deleting Users
826
826
 
827
- TODO: Implement this!
827
+ TODO: Implement this!
828
828
 
829
829
  Proposed api:
830
830
 
@@ -1010,8 +1010,8 @@ To upload a file to Parse, use `Parse::File`. You must include the `"Content-Typ
1010
1010
 
1011
1011
  ```ruby
1012
1012
  file = Parse::File.new({
1013
- :body => "Hello World!",
1014
- :local_filename => "hello.txt",
1013
+ :body => "Hello World!",
1014
+ :local_filename => "hello.txt",
1015
1015
  :content_type => "text/plain"
1016
1016
  })
1017
1017
  file.save
@@ -1029,8 +1029,8 @@ To upload an image, the syntax is a little bit different. Here's an example that
1029
1029
 
1030
1030
  ```ruby
1031
1031
  photo = Parse::File.new({
1032
- :body => IO.read("test/parsers.jpg"),
1033
- :local_filename => "parsers.jpg",
1032
+ :body => IO.read("test/parsers.jpg"),
1033
+ :local_filename => "parsers.jpg",
1034
1034
  :content_type => "image/jpeg"
1035
1035
  })
1036
1036
  photo.save
@@ -1042,8 +1042,8 @@ After files are uploaded, you can associate them with Parse objects:
1042
1042
 
1043
1043
  ```ruby
1044
1044
  photo = Parse::File.new({
1045
- :body => IO.read("test/parsers.jpg"),
1046
- :local_filename => "parsers.jpg",
1045
+ :body => IO.read("test/parsers.jpg"),
1046
+ :local_filename => "parsers.jpg",
1047
1047
  :content_type => "image/jpeg"
1048
1048
  })
1049
1049
  photo.save
@@ -0,0 +1,180 @@
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: '{"ACL":{"*":{"read":true}}}'
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
+ - Tue, 21 May 2013 14:21:15 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/Post/OHGnBvPDXq
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - '0.078743'
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-05-21T14:21:15.405Z","objectId":"OHGnBvPDXq"}'
60
+ http_version:
61
+ recorded_at: Tue, 21 May 2013 14:21:15 GMT
62
+ - request:
63
+ method: get
64
+ uri: https://api.parse.com/1/classes/Post/OHGnBvPDXq
65
+ body:
66
+ encoding: US-ASCII
67
+ string: ''
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
+ - Tue, 21 May 2013 14:21:38 GMT
100
+ Etag:
101
+ - '"3e2ff5392c54b720e94d94f7a4a418fa"'
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 200 OK
108
+ X-Runtime:
109
+ - '0.028265'
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - '129'
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: '{"createdAt":"2013-05-21T14:21:15.405Z","updatedAt":"2013-05-21T14:21:15.405Z","objectId":"OHGnBvPDXq","ACL":{"*":{"read":true}}}'
119
+ http_version:
120
+ recorded_at: Tue, 21 May 2013 14:21:38 GMT
121
+ - request:
122
+ method: get
123
+ uri: https://api.parse.com/1/classes/Post/OHGnBvPDXq
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ''
127
+ headers:
128
+ Content-Type:
129
+ - application/json
130
+ Accept:
131
+ - application/json
132
+ User-Agent:
133
+ - Parse for Ruby, 0.0
134
+ X-Parse-Master-Key:
135
+ - ''
136
+ X-Parse-Rest-Api-Key:
137
+ - <X-Parse-REST-API-Key>
138
+ X-Parse-Application-Id:
139
+ - <X-Parse-Application-Id>
140
+ X-Parse-Session-Token:
141
+ - ''
142
+ Expect:
143
+ - ''
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - '*'
151
+ Access-Control-Request-Method:
152
+ - '*'
153
+ Cache-Control:
154
+ - max-age=0, private, must-revalidate
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Tue, 21 May 2013 14:21:38 GMT
159
+ Etag:
160
+ - '"3e2ff5392c54b720e94d94f7a4a418fa"'
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 200 OK
167
+ X-Runtime:
168
+ - '0.023049'
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - '129'
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: '{"createdAt":"2013-05-21T14:21:15.405Z","updatedAt":"2013-05-21T14:21:15.405Z","objectId":"OHGnBvPDXq","ACL":{"*":{"read":true}}}'
178
+ http_version:
179
+ recorded_at: Tue, 21 May 2013 14:21:38 GMT
180
+ recorded_with: VCR 2.4.0
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api.parse.com/1/classes/Post
6
6
  body:
7
7
  encoding: UTF-8
8
- string: "{\"chapters\":{\"__op\":\"Add\",\"objects\":[\"hello\"]}}"
8
+ string: "{\"chapters\":[\"hello\"]}"
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -16,9 +16,9 @@ http_interactions:
16
16
  X-Parse-Master-Key:
17
17
  - ""
18
18
  X-Parse-Rest-Api-Key:
19
- - jYdptjS76YHikuIFfJEgHD8UMIjH6cp2rWz4fo2C
19
+ - <X-Parse-REST-API-Key>
20
20
  X-Parse-Application-Id:
21
- - hnJRtntbYPvWfjqcqLZsdFaOKT0F3SfNU7Kc7woN
21
+ - <X-Parse-Application-Id>
22
22
  X-Parse-Session-Token:
23
23
  - ""
24
24
  Expect:
@@ -37,17 +37,17 @@ http_interactions:
37
37
  Content-Type:
38
38
  - application/json; charset=utf-8
39
39
  Date:
40
- - Mon, 15 Oct 2012 12:59:15 GMT
40
+ - Mon, 22 Apr 2013 16:03:17 GMT
41
41
  Location:
42
- - https://api.parse.com/1/classes/Post/ug80aldIcg
42
+ - https://api.parse.com/1/classes/Post/NXqztkxx68
43
43
  Server:
44
44
  - nginx/1.2.2
45
45
  Set-Cookie:
46
- - _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMWQwOTljYjU4YzdhNzU3ODc1MzI1MGI1MzQ0YjMwMTE%3D--999bcf56a783c9a250636b41fc4b09c5b3aecce2; domain=.parse.com; path=/; expires=Sat, 15-Oct-2022 12:59:15 GMT; secure; HttpOnly
46
+ - <COOKIE-KEY>
47
47
  Status:
48
48
  - 201 Created
49
49
  X-Runtime:
50
- - "0.018886"
50
+ - "0.038992"
51
51
  X-Ua-Compatible:
52
52
  - IE=Edge,chrome=1
53
53
  Content-Length:
@@ -55,13 +55,13 @@ http_interactions:
55
55
  Connection:
56
56
  - keep-alive
57
57
  body:
58
- encoding: UTF-8
59
- string: "{\"createdAt\":\"2012-10-15T12:59:15.263Z\",\"objectId\":\"ug80aldIcg\"}"
58
+ encoding: ASCII-8BIT
59
+ string: "{\"createdAt\":\"2013-04-22T16:03:17.004Z\",\"objectId\":\"NXqztkxx68\"}"
60
60
  http_version:
61
- recorded_at: Mon, 15 Oct 2012 12:59:16 GMT
61
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
62
62
  - request:
63
63
  method: put
64
- uri: https://api.parse.com/1/classes/Post/ug80aldIcg
64
+ uri: https://api.parse.com/1/classes/Post/NXqztkxx68
65
65
  body:
66
66
  encoding: UTF-8
67
67
  string: "{\"chapters\":{\"__op\":\"Add\",\"objects\":[\"goodbye\"]}}"
@@ -75,9 +75,9 @@ http_interactions:
75
75
  X-Parse-Master-Key:
76
76
  - ""
77
77
  X-Parse-Rest-Api-Key:
78
- - jYdptjS76YHikuIFfJEgHD8UMIjH6cp2rWz4fo2C
78
+ - <X-Parse-REST-API-Key>
79
79
  X-Parse-Application-Id:
80
- - hnJRtntbYPvWfjqcqLZsdFaOKT0F3SfNU7Kc7woN
80
+ - <X-Parse-Application-Id>
81
81
  X-Parse-Session-Token:
82
82
  - ""
83
83
  Expect:
@@ -96,17 +96,17 @@ http_interactions:
96
96
  Content-Type:
97
97
  - application/json; charset=utf-8
98
98
  Date:
99
- - Mon, 15 Oct 2012 17:47:28 GMT
99
+ - Mon, 22 Apr 2013 16:03:17 GMT
100
100
  Etag:
101
- - "\"f99c943f91a9d6fc5e32e11d86b40755\""
101
+ - "\"828730200fb880f8d7602dae59972493\""
102
102
  Server:
103
103
  - nginx/1.2.2
104
104
  Set-Cookie:
105
- - _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMjlkOGYxMGU3YjE4YzgxM2U1NzZjNGNkNmI2MDljZDY%3D--b4c3fa092802887988fae07911e78dce8d1fd453; domain=.parse.com; path=/; expires=Sat, 15-Oct-2022 17:47:28 GMT; secure; HttpOnly
105
+ - <COOKIE-KEY>
106
106
  Status:
107
107
  - 200 OK
108
108
  X-Runtime:
109
- - "0.016753"
109
+ - "0.026445"
110
110
  X-Ua-Compatible:
111
111
  - IE=Edge,chrome=1
112
112
  Content-Length:
@@ -115,7 +115,7 @@ http_interactions:
115
115
  - keep-alive
116
116
  body:
117
117
  encoding: ASCII-8BIT
118
- string: "{\"chapters\":[\"hello\",\"goodbye\"],\"updatedAt\":\"2012-10-15T17:47:28.940Z\"}"
118
+ string: "{\"chapters\":[\"hello\",\"goodbye\"],\"updatedAt\":\"2013-04-22T16:03:17.059Z\"}"
119
119
  http_version:
120
- recorded_at: Mon, 15 Oct 2012 17:47:30 GMT
121
- recorded_with: VCR 2.0.1
120
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
121
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,239 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.parse.com/1/classes/Comment
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{\"text\":\"great post!\"}"
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:17 GMT
41
+ Location:
42
+ - https://api.parse.com/1/classes/Comment/Kzx6SOYJZH
43
+ Server:
44
+ - nginx/1.2.2
45
+ Set-Cookie:
46
+ - <COOKIE-KEY>
47
+ Status:
48
+ - 201 Created
49
+ X-Runtime:
50
+ - "0.039439"
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:17.184Z\",\"objectId\":\"Kzx6SOYJZH\"}"
60
+ http_version:
61
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
62
+ - request:
63
+ method: post
64
+ uri: https://api.parse.com/1/classes/Post
65
+ body:
66
+ encoding: UTF-8
67
+ string: "{\"comments\":[{\"__type\":\"Pointer\",\"className\":\"Comment\",\"objectId\":\"Kzx6SOYJZH\"}]}"
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: 201
88
+ message: Created
89
+ headers:
90
+ Access-Control-Allow-Origin:
91
+ - "*"
92
+ Access-Control-Request-Method:
93
+ - "*"
94
+ Cache-Control:
95
+ - no-cache
96
+ Content-Type:
97
+ - application/json; charset=utf-8
98
+ Date:
99
+ - Mon, 22 Apr 2013 16:03:17 GMT
100
+ Location:
101
+ - https://api.parse.com/1/classes/Post/hu1mYfPFtI
102
+ Server:
103
+ - nginx/1.2.2
104
+ Set-Cookie:
105
+ - <COOKIE-KEY>
106
+ Status:
107
+ - 201 Created
108
+ X-Runtime:
109
+ - "0.034678"
110
+ X-Ua-Compatible:
111
+ - IE=Edge,chrome=1
112
+ Content-Length:
113
+ - "64"
114
+ Connection:
115
+ - keep-alive
116
+ body:
117
+ encoding: ASCII-8BIT
118
+ string: "{\"createdAt\":\"2013-04-22T16:03:17.240Z\",\"objectId\":\"hu1mYfPFtI\"}"
119
+ http_version:
120
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
121
+ - request:
122
+ method: get
123
+ uri: https://api.parse.com/1/classes/Post?include=comments&where=%7B%22objectId%22:%22hu1mYfPFtI%22%7D
124
+ body:
125
+ encoding: US-ASCII
126
+ string: ""
127
+ headers:
128
+ Content-Type:
129
+ - application/json
130
+ Accept:
131
+ - application/json
132
+ User-Agent:
133
+ - Parse for Ruby, 0.0
134
+ X-Parse-Master-Key:
135
+ - ""
136
+ X-Parse-Rest-Api-Key:
137
+ - <X-Parse-REST-API-Key>
138
+ X-Parse-Application-Id:
139
+ - <X-Parse-Application-Id>
140
+ X-Parse-Session-Token:
141
+ - ""
142
+ Expect:
143
+ - ""
144
+ response:
145
+ status:
146
+ code: 200
147
+ message: OK
148
+ headers:
149
+ Access-Control-Allow-Origin:
150
+ - "*"
151
+ Access-Control-Request-Method:
152
+ - "*"
153
+ Cache-Control:
154
+ - max-age=0, private, must-revalidate
155
+ Content-Type:
156
+ - application/json; charset=utf-8
157
+ Date:
158
+ - Mon, 22 Apr 2013 16:03:17 GMT
159
+ Etag:
160
+ - "\"e9cf67df60e1a72f055b45e1f0bcabd8\""
161
+ Server:
162
+ - nginx/1.2.2
163
+ Set-Cookie:
164
+ - <COOKIE-KEY>
165
+ Status:
166
+ - 200 OK
167
+ X-Runtime:
168
+ - "0.031737"
169
+ X-Ua-Compatible:
170
+ - IE=Edge,chrome=1
171
+ Content-Length:
172
+ - "295"
173
+ Connection:
174
+ - keep-alive
175
+ body:
176
+ encoding: ASCII-8BIT
177
+ string: "{\"results\":[{\"comments\":[{\"text\":\"great post!\",\"createdAt\":\"2013-04-22T16:03:17.184Z\",\"updatedAt\":\"2013-04-22T16:03:17.184Z\",\"objectId\":\"Kzx6SOYJZH\",\"__type\":\"Object\",\"className\":\"Comment\"}],\"createdAt\":\"2013-04-22T16:03:17.240Z\",\"updatedAt\":\"2013-04-22T16:03:17.240Z\",\"objectId\":\"hu1mYfPFtI\"}]}"
178
+ http_version:
179
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
180
+ - request:
181
+ method: put
182
+ uri: https://api.parse.com/1/classes/Post/hu1mYfPFtI
183
+ body:
184
+ encoding: UTF-8
185
+ string: "{\"comments\":[{\"__type\":\"Pointer\",\"className\":\"Comment\",\"objectId\":\"Kzx6SOYJZH\"}]}"
186
+ headers:
187
+ Content-Type:
188
+ - application/json
189
+ Accept:
190
+ - application/json
191
+ User-Agent:
192
+ - Parse for Ruby, 0.0
193
+ X-Parse-Master-Key:
194
+ - ""
195
+ X-Parse-Rest-Api-Key:
196
+ - <X-Parse-REST-API-Key>
197
+ X-Parse-Application-Id:
198
+ - <X-Parse-Application-Id>
199
+ X-Parse-Session-Token:
200
+ - ""
201
+ Expect:
202
+ - ""
203
+ response:
204
+ status:
205
+ code: 200
206
+ message: OK
207
+ headers:
208
+ Access-Control-Allow-Origin:
209
+ - "*"
210
+ Access-Control-Request-Method:
211
+ - "*"
212
+ Cache-Control:
213
+ - max-age=0, private, must-revalidate
214
+ Content-Type:
215
+ - application/json; charset=utf-8
216
+ Date:
217
+ - Mon, 22 Apr 2013 16:03:17 GMT
218
+ Etag:
219
+ - "\"91d0aeebe11ed3ec9328d3359e44a389\""
220
+ Server:
221
+ - nginx/1.2.2
222
+ Set-Cookie:
223
+ - <COOKIE-KEY>
224
+ Status:
225
+ - 200 OK
226
+ X-Runtime:
227
+ - "0.075283"
228
+ X-Ua-Compatible:
229
+ - IE=Edge,chrome=1
230
+ Content-Length:
231
+ - "40"
232
+ Connection:
233
+ - keep-alive
234
+ body:
235
+ encoding: ASCII-8BIT
236
+ string: "{\"updatedAt\":\"2013-04-22T16:03:17.428Z\"}"
237
+ http_version:
238
+ recorded_at: Mon, 22 Apr 2013 16:03:17 GMT
239
+ recorded_with: VCR 2.4.0