parse_resource 1.7.2 → 1.7.3
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.
- data/.travis.yml +6 -0
- data/Gemfile +5 -1
- data/Gemfile.lock +11 -1
- data/README.md +21 -8
- data/VERSION +1 -1
- data/fixtures/vcr_cassettes/test_all.yml +161 -0
- data/fixtures/vcr_cassettes/test_attribute_getters.yml +57 -0
- data/fixtures/vcr_cassettes/test_attribute_setters.yml +57 -0
- data/fixtures/vcr_cassettes/test_authenticate.yml +155 -0
- data/fixtures/vcr_cassettes/test_chained_wheres.yml +161 -0
- data/fixtures/vcr_cassettes/test_count.yml +411 -0
- data/fixtures/vcr_cassettes/test_create.yml +57 -0
- data/fixtures/vcr_cassettes/test_created_at.yml +57 -0
- data/fixtures/vcr_cassettes/test_destroy.yml +157 -0
- data/fixtures/vcr_cassettes/test_destroy_all.yml +207 -0
- data/fixtures/vcr_cassettes/test_each.yml +269 -0
- data/fixtures/vcr_cassettes/test_find.yml +107 -0
- data/fixtures/vcr_cassettes/test_find_all_by.yml +157 -0
- data/fixtures/vcr_cassettes/test_find_by.yml +157 -0
- data/fixtures/vcr_cassettes/test_first.yml +107 -0
- data/fixtures/vcr_cassettes/test_id.yml +57 -0
- data/fixtures/vcr_cassettes/test_limit.yml +864 -0
- data/fixtures/vcr_cassettes/test_map.yml +269 -0
- data/fixtures/vcr_cassettes/test_save.yml +111 -0
- data/fixtures/vcr_cassettes/test_skip.yml +843 -0
- data/fixtures/vcr_cassettes/test_update.yml +111 -0
- data/fixtures/vcr_cassettes/test_updated_at.yml +111 -0
- data/fixtures/vcr_cassettes/test_username_should_be_unique.yml +109 -0
- data/fixtures/vcr_cassettes/test_where.yml +107 -0
- data/lib/parse_resource/base.rb +66 -69
- data/lib/parse_resource/parse_user.rb +1 -1
- data/lib/parse_resource/query.rb +9 -9
- data/parse_resource.gemspec +41 -7
- data/parse_resource.yml +12 -0
- data/test/active_model_lint_test.rb +5 -6
- data/test/helper.rb +8 -0
- data/test/test_parse_resource.rb +183 -117
- data/test/test_parse_user.rb +39 -32
- data/test/test_query_options.rb +43 -17
- metadata +149 -26
- data/test/test_associations.rb +0 -105
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -6,15 +6,19 @@ source "http://rubygems.org"
|
|
6
6
|
# Add dependencies to develop your gem here.
|
7
7
|
# Include everything needed to run rake, tests, features, etc.
|
8
8
|
group :development do
|
9
|
-
gem "bundler", "~> 1.
|
9
|
+
gem "bundler", "~> 1.1.5"
|
10
10
|
gem "jeweler", "~> 1.6.4"
|
11
11
|
gem "rcov", ">= 0"
|
12
12
|
gem "reek", "~> 1.2.8"
|
13
13
|
gem "rest-client"
|
14
14
|
gem "activesupport"
|
15
15
|
gem "activemodel"
|
16
|
+
gem "vcr"
|
17
|
+
gem "webmock"
|
16
18
|
end
|
17
19
|
|
18
20
|
gem "rest-client"
|
19
21
|
gem "activesupport"
|
20
22
|
gem "activemodel"
|
23
|
+
gem "json"
|
24
|
+
|
data/Gemfile.lock
CHANGED
@@ -7,13 +7,16 @@ GEM
|
|
7
7
|
i18n (~> 0.6)
|
8
8
|
activesupport (3.1.3)
|
9
9
|
multi_json (~> 1.0)
|
10
|
+
addressable (2.3.2)
|
10
11
|
builder (3.0.0)
|
12
|
+
crack (0.3.1)
|
11
13
|
git (1.2.5)
|
12
14
|
i18n (0.6.0)
|
13
15
|
jeweler (1.6.4)
|
14
16
|
bundler (~> 1.0)
|
15
17
|
git (>= 1.2.5)
|
16
18
|
rake
|
19
|
+
json (1.7.5)
|
17
20
|
mime-types (1.17.2)
|
18
21
|
multi_json (1.0.4)
|
19
22
|
rake (0.9.2.2)
|
@@ -30,6 +33,10 @@ GEM
|
|
30
33
|
ruby_parser (2.3.1)
|
31
34
|
sexp_processor (~> 3.0)
|
32
35
|
sexp_processor (3.0.9)
|
36
|
+
vcr (2.2.4)
|
37
|
+
webmock (1.8.10)
|
38
|
+
addressable (>= 2.2.7)
|
39
|
+
crack (>= 0.1.7)
|
33
40
|
|
34
41
|
PLATFORMS
|
35
42
|
ruby
|
@@ -37,8 +44,11 @@ PLATFORMS
|
|
37
44
|
DEPENDENCIES
|
38
45
|
activemodel
|
39
46
|
activesupport
|
40
|
-
bundler (~> 1.
|
47
|
+
bundler (~> 1.1.5)
|
41
48
|
jeweler (~> 1.6.4)
|
49
|
+
json
|
42
50
|
rcov
|
43
51
|
reek (~> 1.2.8)
|
44
52
|
rest-client
|
53
|
+
vcr
|
54
|
+
webmock
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
ParseResource
|
2
2
|
=============
|
3
3
|
|
4
|
+
[](http://travis-ci.org/adelevie/parse_resource)
|
5
|
+
|
6
|
+
|
4
7
|
ParseResource makes it easy to interact with Parse.com's REST API. It adheres to the ActiveRecord pattern. ParseResource is fully ActiveModel compliant, meaning you can use validations and Rails forms.
|
5
8
|
|
6
9
|
Ruby/Rails developers should feel right at home.
|
@@ -26,7 +29,7 @@ Installation
|
|
26
29
|
Include in your `Gemfile`:
|
27
30
|
|
28
31
|
```ruby
|
29
|
-
gem "parse_resource", "~> 1.7.
|
32
|
+
gem "parse_resource", "~> 1.7.2"
|
30
33
|
```
|
31
34
|
|
32
35
|
Or just gem install:
|
@@ -90,7 +93,7 @@ p.valid? #=> true
|
|
90
93
|
# setting more attributes, then saving
|
91
94
|
p.author = "Alan deLevie"
|
92
95
|
p.body = "Ipso Lorem"
|
93
|
-
p.save #=>
|
96
|
+
p.save #=> true
|
94
97
|
|
95
98
|
# checking the id generated by Parse's servers
|
96
99
|
p.id #=> "QARfXUILgY"
|
@@ -99,11 +102,11 @@ p.created_at #=> "2011-09-19T01:32:04.973Z" # does anybody want this to be a Dat
|
|
99
102
|
|
100
103
|
# updating
|
101
104
|
p.title = "[Update] Introducing ParseResource"
|
102
|
-
p.save
|
105
|
+
p.save #=> true
|
103
106
|
p.updated_at #=> "2011-09-19T01:32:37.930Z" # more magic from Parse's servers
|
104
107
|
|
105
108
|
# destroying an object
|
106
|
-
p.destroy #=>
|
109
|
+
p.destroy #=> true
|
107
110
|
p.title #=> nil
|
108
111
|
```
|
109
112
|
|
@@ -162,7 +165,7 @@ end
|
|
162
165
|
# create a user
|
163
166
|
user = User.new(:username => "adelevie")
|
164
167
|
user.password = "asecretpassword"
|
165
|
-
user.save
|
168
|
+
user.save #=> true
|
166
169
|
# after saving, the password is automatically hashed by Parse's server
|
167
170
|
# user.password will return the unhashed password when the original object is in memory
|
168
171
|
# from a new session, User.where(:username => "adelevie").first.password will return nil
|
@@ -199,7 +202,7 @@ end
|
|
199
202
|
|
200
203
|
If you want to use parse_resource to back a simple authentication system for a Rails app, follow this [tutorial](http://asciicasts.com/episodes/250-authentication-from-scratch), and make some simple modifications.
|
201
204
|
|
202
|
-
|
205
|
+
DEPRECATED
|
203
206
|
Associations
|
204
207
|
|
205
208
|
```ruby
|
@@ -226,7 +229,7 @@ author.posts << post2
|
|
226
229
|
# or assign from child class
|
227
230
|
post3 = Post.create(:title => "Goosebumps 3")
|
228
231
|
post3.author = author
|
229
|
-
post3.save
|
232
|
+
post3.save #=> true
|
230
233
|
|
231
234
|
# relational queries
|
232
235
|
posts = Post.include_object(:author).all
|
@@ -237,6 +240,15 @@ posts.each do |post|
|
|
237
240
|
end
|
238
241
|
```
|
239
242
|
|
243
|
+
File Upload
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
@post = Post.first()
|
247
|
+
result = Post.upload(uploaded_file.tempfile, uploaded_file.original_filename, content_type: uploaded_file.content_type)
|
248
|
+
@post.thumbnail = {"name" => result["name"], "__type" => "File"}
|
249
|
+
```
|
250
|
+
|
251
|
+
|
240
252
|
Documentation
|
241
253
|
-------------
|
242
254
|
[Here](http://rubydoc.info/gems/parse_resource/)
|
@@ -268,9 +280,10 @@ Contributing to ParseResource
|
|
268
280
|
* Create `parse_resource.yml` in the root of the gem folder. Using the same format as `parse_resource.yml` in the instructions (except only creating a `test` environment, add your own API keys.
|
269
281
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
270
282
|
|
283
|
+
|
271
284
|
Copyright
|
272
285
|
---------
|
273
286
|
|
274
|
-
Copyright (c)
|
287
|
+
Copyright (c) 2012 Alan deLevie. See LICENSE.txt for
|
275
288
|
further details.
|
276
289
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.3
|
@@ -0,0 +1,161 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/classes/Post
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"title":"11222"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Content-Length:
|
17
|
+
- '17'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- https://parse.com, https://www.parse.com
|
27
|
+
Access-Control-Request-Method:
|
28
|
+
- ! '*'
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Date:
|
34
|
+
- Thu, 20 Sep 2012 04:31:37 GMT
|
35
|
+
Location:
|
36
|
+
- https://api.parse.com/1/classes/Post/54C6KpIVdM
|
37
|
+
Server:
|
38
|
+
- nginx/1.2.2
|
39
|
+
Set-Cookie:
|
40
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlYTk0NzlkNjE4NTM3ZTY4MTM0ZGU1MWMyNzQ5NmY0ODQ%3D--205d43d2cee87f0d45f723e29d26fbfdf41119ad;
|
41
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:37 GMT; HttpOnly
|
42
|
+
Status:
|
43
|
+
- 201 Created
|
44
|
+
X-Runtime:
|
45
|
+
- '0.034132'
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Content-Length:
|
49
|
+
- '64'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"createdAt":"2012-09-20T04:31:37.170Z","objectId":"54C6KpIVdM"}'
|
55
|
+
http_version:
|
56
|
+
recorded_at: Thu, 20 Sep 2012 04:31:37 GMT
|
57
|
+
- request:
|
58
|
+
method: post
|
59
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/classes/Post
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: ! '{"title":"112ssd22"}'
|
63
|
+
headers:
|
64
|
+
Accept:
|
65
|
+
- ! '*/*; q=0.5, application/xml'
|
66
|
+
Accept-Encoding:
|
67
|
+
- gzip, deflate
|
68
|
+
Content-Type:
|
69
|
+
- application/json
|
70
|
+
Content-Length:
|
71
|
+
- '20'
|
72
|
+
User-Agent:
|
73
|
+
- Ruby
|
74
|
+
response:
|
75
|
+
status:
|
76
|
+
code: 201
|
77
|
+
message: Created
|
78
|
+
headers:
|
79
|
+
Access-Control-Allow-Origin:
|
80
|
+
- https://parse.com, https://www.parse.com
|
81
|
+
Access-Control-Request-Method:
|
82
|
+
- ! '*'
|
83
|
+
Cache-Control:
|
84
|
+
- no-cache
|
85
|
+
Content-Type:
|
86
|
+
- application/json; charset=utf-8
|
87
|
+
Date:
|
88
|
+
- Thu, 20 Sep 2012 04:31:37 GMT
|
89
|
+
Location:
|
90
|
+
- https://api.parse.com/1/classes/Post/ZvIMP5SSSS
|
91
|
+
Server:
|
92
|
+
- nginx/1.2.2
|
93
|
+
Set-Cookie:
|
94
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlZDFjYzBlYjM1MmRkNzRlZmQ2YzE3Mjk1ZjQxZDdiNGU%3D--5bbc4d2ef162a05ac166470436c2d44d7fa5439d;
|
95
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:37 GMT; HttpOnly
|
96
|
+
Status:
|
97
|
+
- 201 Created
|
98
|
+
X-Runtime:
|
99
|
+
- '0.050751'
|
100
|
+
X-Ua-Compatible:
|
101
|
+
- IE=Edge,chrome=1
|
102
|
+
Content-Length:
|
103
|
+
- '64'
|
104
|
+
Connection:
|
105
|
+
- keep-alive
|
106
|
+
body:
|
107
|
+
encoding: US-ASCII
|
108
|
+
string: ! '{"createdAt":"2012-09-20T04:31:37.429Z","objectId":"ZvIMP5SSSS"}'
|
109
|
+
http_version:
|
110
|
+
recorded_at: Thu, 20 Sep 2012 04:31:37 GMT
|
111
|
+
- request:
|
112
|
+
method: get
|
113
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/classes/Post?where=%7B%7D
|
114
|
+
body:
|
115
|
+
encoding: US-ASCII
|
116
|
+
string: ''
|
117
|
+
headers:
|
118
|
+
Accept:
|
119
|
+
- ! '*/*; q=0.5, application/xml'
|
120
|
+
Accept-Encoding:
|
121
|
+
- gzip, deflate
|
122
|
+
User-Agent:
|
123
|
+
- Ruby
|
124
|
+
response:
|
125
|
+
status:
|
126
|
+
code: 200
|
127
|
+
message: OK
|
128
|
+
headers:
|
129
|
+
Access-Control-Allow-Origin:
|
130
|
+
- https://parse.com, https://www.parse.com
|
131
|
+
Access-Control-Request-Method:
|
132
|
+
- ! '*'
|
133
|
+
Cache-Control:
|
134
|
+
- max-age=0, private, must-revalidate
|
135
|
+
Content-Type:
|
136
|
+
- application/json; charset=utf-8
|
137
|
+
Date:
|
138
|
+
- Thu, 20 Sep 2012 04:31:37 GMT
|
139
|
+
Etag:
|
140
|
+
- ! '"bbfb53bdfe116c52c5ab517838b9ff42"'
|
141
|
+
Server:
|
142
|
+
- nginx/1.2.2
|
143
|
+
Set-Cookie:
|
144
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMzNlZDAyNGMyMDhlOWNhNjk0YzY3ODQ4YzhjYjJhMjY%3D--026e69dca673c05e7c79ca99e1add79f2767b15b;
|
145
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:37 GMT; HttpOnly
|
146
|
+
Status:
|
147
|
+
- 200 OK
|
148
|
+
X-Runtime:
|
149
|
+
- '0.036593'
|
150
|
+
X-Ua-Compatible:
|
151
|
+
- IE=Edge,chrome=1
|
152
|
+
Content-Length:
|
153
|
+
- '256'
|
154
|
+
Connection:
|
155
|
+
- keep-alive
|
156
|
+
body:
|
157
|
+
encoding: US-ASCII
|
158
|
+
string: ! '{"results":[{"title":"11222","createdAt":"2012-09-20T04:31:37.170Z","updatedAt":"2012-09-20T04:31:37.170Z","objectId":"54C6KpIVdM"},{"title":"112ssd22","createdAt":"2012-09-20T04:31:37.429Z","updatedAt":"2012-09-20T04:31:37.429Z","objectId":"ZvIMP5SSSS"}]}'
|
159
|
+
http_version:
|
160
|
+
recorded_at: Thu, 20 Sep 2012 04:31:37 GMT
|
161
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/classes/Post
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"title":"title1"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Content-Length:
|
17
|
+
- '18'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- https://parse.com, https://www.parse.com
|
27
|
+
Access-Control-Request-Method:
|
28
|
+
- ! '*'
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Date:
|
34
|
+
- Thu, 20 Sep 2012 04:31:37 GMT
|
35
|
+
Location:
|
36
|
+
- https://api.parse.com/1/classes/Post/0LUIcFSUQZ
|
37
|
+
Server:
|
38
|
+
- nginx/1.2.2
|
39
|
+
Set-Cookie:
|
40
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlNWIzYmVmN2Q3YmE0ZDMxZWVhZWYyOTI4NjhjODBiNzc%3D--82e42ed02caf03df7430dbfc4cf8db56633c2fdc;
|
41
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:37 GMT; HttpOnly
|
42
|
+
Status:
|
43
|
+
- 201 Created
|
44
|
+
X-Runtime:
|
45
|
+
- '0.024802'
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Content-Length:
|
49
|
+
- '64'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"createdAt":"2012-09-20T04:31:37.855Z","objectId":"0LUIcFSUQZ"}'
|
55
|
+
http_version:
|
56
|
+
recorded_at: Thu, 20 Sep 2012 04:31:37 GMT
|
57
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,57 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/classes/Post
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"title":"1"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Content-Length:
|
17
|
+
- '13'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- https://parse.com, https://www.parse.com
|
27
|
+
Access-Control-Request-Method:
|
28
|
+
- ! '*'
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Date:
|
34
|
+
- Thu, 20 Sep 2012 04:31:38 GMT
|
35
|
+
Location:
|
36
|
+
- https://api.parse.com/1/classes/Post/iS3FSrerRc
|
37
|
+
Server:
|
38
|
+
- nginx/1.2.2
|
39
|
+
Set-Cookie:
|
40
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlZWNhMjQ4MjA0NmNiYTAxYjhkZjJhYzgzNDU0OGNlMjc%3D--daea95c2a5193789487cc8f412bbba3656336143;
|
41
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:38 GMT; HttpOnly
|
42
|
+
Status:
|
43
|
+
- 201 Created
|
44
|
+
X-Runtime:
|
45
|
+
- '0.095108'
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Content-Length:
|
49
|
+
- '64'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"createdAt":"2012-09-20T04:31:38.173Z","objectId":"iS3FSrerRc"}'
|
55
|
+
http_version:
|
56
|
+
recorded_at: Thu, 20 Sep 2012 04:31:38 GMT
|
57
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,155 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/users
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"username":"fake_person","password":"fake_pass"}'
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Content-Length:
|
17
|
+
- '49'
|
18
|
+
User-Agent:
|
19
|
+
- Ruby
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- https://parse.com, https://www.parse.com
|
27
|
+
Access-Control-Request-Method:
|
28
|
+
- ! '*'
|
29
|
+
Cache-Control:
|
30
|
+
- no-cache
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
Date:
|
34
|
+
- Thu, 20 Sep 2012 04:31:53 GMT
|
35
|
+
Location:
|
36
|
+
- https://api.parse.com/1/users/oA6BqJskE6
|
37
|
+
Server:
|
38
|
+
- nginx/1.2.2
|
39
|
+
Set-Cookie:
|
40
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlNTMwY2I4YmFhMDAwM2NmYzM2MzkxMzc1YTY4YmM0Yzg%3D--c932bbdd67e73b52419fbaf7e00a3a4171f25775;
|
41
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:53 GMT; HttpOnly
|
42
|
+
Status:
|
43
|
+
- 201 Created
|
44
|
+
X-Runtime:
|
45
|
+
- '0.178267'
|
46
|
+
X-Ua-Compatible:
|
47
|
+
- IE=Edge,chrome=1
|
48
|
+
Content-Length:
|
49
|
+
- '107'
|
50
|
+
Connection:
|
51
|
+
- keep-alive
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"createdAt":"2012-09-20T04:31:53.888Z","objectId":"oA6BqJskE6","sessionToken":"69cr2yktcow753usha7xxxnqo"}'
|
55
|
+
http_version:
|
56
|
+
recorded_at: Thu, 20 Sep 2012 04:31:54 GMT
|
57
|
+
- request:
|
58
|
+
method: get
|
59
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/login?password=fake_pass&username=fake_person
|
60
|
+
body:
|
61
|
+
encoding: US-ASCII
|
62
|
+
string: ''
|
63
|
+
headers:
|
64
|
+
Accept:
|
65
|
+
- ! '*/*; q=0.5, application/xml'
|
66
|
+
Accept-Encoding:
|
67
|
+
- gzip, deflate
|
68
|
+
User-Agent:
|
69
|
+
- Ruby
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 200
|
73
|
+
message: OK
|
74
|
+
headers:
|
75
|
+
Access-Control-Allow-Origin:
|
76
|
+
- https://parse.com, https://www.parse.com
|
77
|
+
Access-Control-Request-Method:
|
78
|
+
- ! '*'
|
79
|
+
Cache-Control:
|
80
|
+
- max-age=0, private, must-revalidate
|
81
|
+
Content-Type:
|
82
|
+
- application/json; charset=utf-8
|
83
|
+
Date:
|
84
|
+
- Thu, 20 Sep 2012 04:31:54 GMT
|
85
|
+
Etag:
|
86
|
+
- ! '"de2816b2fcd20195b49353fd8194a9c6"'
|
87
|
+
Server:
|
88
|
+
- nginx/1.2.2
|
89
|
+
Set-Cookie:
|
90
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlMjZkNDc1Yzc0YWViNDk2M2M5ZTA5N2JkMmY5MjgwYTM%3D--c7ffcf2011fca388e5fcf8ed8b63f3e967a8503e;
|
91
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:54 GMT; HttpOnly
|
92
|
+
Status:
|
93
|
+
- 200 OK
|
94
|
+
X-Runtime:
|
95
|
+
- '0.168505'
|
96
|
+
X-Ua-Compatible:
|
97
|
+
- IE=Edge,chrome=1
|
98
|
+
Content-Length:
|
99
|
+
- '171'
|
100
|
+
Connection:
|
101
|
+
- keep-alive
|
102
|
+
body:
|
103
|
+
encoding: US-ASCII
|
104
|
+
string: ! '{"username":"fake_person","createdAt":"2012-09-20T04:31:53.888Z","updatedAt":"2012-09-20T04:31:53.888Z","objectId":"oA6BqJskE6","sessionToken":"69cr2yktcow753usha7xxxnqo"}'
|
105
|
+
http_version:
|
106
|
+
recorded_at: Thu, 20 Sep 2012 04:31:54 GMT
|
107
|
+
- request:
|
108
|
+
method: get
|
109
|
+
uri: https://FKEzdzDgEyghLDFgIVHYJehVlWpfVtUmEv4MUEkJ:bOYO7usWbrcIbL5L5bPzlYrSonQRvwJecC1XLsuN@api.parse.com/1/login?password=wrong_pass&username=wrong_username
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: ''
|
113
|
+
headers:
|
114
|
+
Accept:
|
115
|
+
- ! '*/*; q=0.5, application/xml'
|
116
|
+
Accept-Encoding:
|
117
|
+
- gzip, deflate
|
118
|
+
User-Agent:
|
119
|
+
- Ruby
|
120
|
+
response:
|
121
|
+
status:
|
122
|
+
code: 404
|
123
|
+
message: Not Found
|
124
|
+
headers:
|
125
|
+
Access-Control-Allow-Origin:
|
126
|
+
- https://parse.com, https://www.parse.com
|
127
|
+
Access-Control-Request-Method:
|
128
|
+
- ! '*'
|
129
|
+
Cache-Control:
|
130
|
+
- no-cache
|
131
|
+
Content-Type:
|
132
|
+
- application/json; charset=utf-8
|
133
|
+
Date:
|
134
|
+
- Thu, 20 Sep 2012 04:31:54 GMT
|
135
|
+
Server:
|
136
|
+
- nginx/1.2.2
|
137
|
+
Set-Cookie:
|
138
|
+
- _parse_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRiIlOGU5YTU1YzdmZjMxNmEyOGFjZmU5YzM5YmZjZDExNzg%3D--4ce3c84dd6398a1799e83fb88b6a27cc585ecb24;
|
139
|
+
domain=.parse.com; path=/; expires=Tue, 20-Sep-2022 04:31:54 GMT; HttpOnly
|
140
|
+
Status:
|
141
|
+
- 404 Not Found
|
142
|
+
X-Runtime:
|
143
|
+
- '0.026655'
|
144
|
+
X-Ua-Compatible:
|
145
|
+
- IE=Edge,chrome=1
|
146
|
+
Content-Length:
|
147
|
+
- '47'
|
148
|
+
Connection:
|
149
|
+
- keep-alive
|
150
|
+
body:
|
151
|
+
encoding: US-ASCII
|
152
|
+
string: ! '{"code":101,"error":"invalid login parameters"}'
|
153
|
+
http_version:
|
154
|
+
recorded_at: Thu, 20 Sep 2012 04:31:54 GMT
|
155
|
+
recorded_with: VCR 2.2.4
|