poptart 0.0.10 → 0.0.11
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/poptart/request.rb +6 -0
- data/lib/poptart/user.rb +9 -2
- data/lib/poptart.rb +18 -0
- data/lib/version.rb +1 -1
- data/spec/requests/answering_survey_questions_spec.rb +6 -0
- data/spec/requests/answers_spec.rb +2 -0
- data/spec/requests/surveys_spec.rb +11 -0
- data/spec/requests/user_management_spec.rb +1 -0
- data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +3407 -626
- data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +6035 -1352
- data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +75 -240
- data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +35 -27
- data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +73 -235
- data/spec/vcr/creating/quesitons_returns_boolean_question.yml +19 -15
- data/spec/vcr/creating/quesitons_returns_multiple_question.yml +76 -60
- data/spec/vcr/creating/quesitons_returns_range_question.yml +75 -59
- data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question.yml +6923 -442
- data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question_by_key.yml +2055 -329
- data/spec/vcr/surveys/fetchs_all_surveys_for_a_user.yml +476 -0
- data/spec/vcr/user/management_creates_a_user.yml +55 -48
- data/spec/vcr/user/management_returns_a_user.yml +468 -17
- metadata +6 -2
@@ -0,0 +1,476 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Api-Token:
|
15
|
+
- testing
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: 'OK '
|
24
|
+
headers:
|
25
|
+
X-Frame-Options:
|
26
|
+
- SAMEORIGIN
|
27
|
+
X-Xss-Protection:
|
28
|
+
- 1; mode=block
|
29
|
+
X-Content-Type-Options:
|
30
|
+
- nosniff
|
31
|
+
X-Ua-Compatible:
|
32
|
+
- chrome=1
|
33
|
+
Content-Type:
|
34
|
+
- application/json; charset=utf-8
|
35
|
+
Etag:
|
36
|
+
- '"2aa11a1ab77b139e58f765299f923a01"'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 142ff5ce-228c-4ccb-8230-1d1c3c5855ff
|
41
|
+
X-Runtime:
|
42
|
+
- '0.005285'
|
43
|
+
Server:
|
44
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
45
|
+
Date:
|
46
|
+
- Sat, 18 Oct 2014 17:26:38 GMT
|
47
|
+
Content-Length:
|
48
|
+
- '469'
|
49
|
+
Connection:
|
50
|
+
- Keep-Alive
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
string: |-
|
54
|
+
{
|
55
|
+
"_links": {
|
56
|
+
"self": {
|
57
|
+
"href": "http://localhost:3000/"
|
58
|
+
},
|
59
|
+
"surveys": {
|
60
|
+
"href": "http://localhost:3000/api/surveys{/id}{?query*}"
|
61
|
+
},
|
62
|
+
"users": {
|
63
|
+
"href": "http://localhost:3000/api/users{/id}{?query*}"
|
64
|
+
},
|
65
|
+
"questions": {
|
66
|
+
"href": "http://localhost:3000/api/questions{/id}{?query*}"
|
67
|
+
},
|
68
|
+
"survey_questions": {
|
69
|
+
"href": "http://localhost:3000/api/questions{/question_id}/survey_questions{?query*}"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
http_version:
|
74
|
+
recorded_at: Sat, 18 Oct 2014 17:26:38 GMT
|
75
|
+
- request:
|
76
|
+
method: get
|
77
|
+
uri: http://localhost:3000/
|
78
|
+
body:
|
79
|
+
encoding: US-ASCII
|
80
|
+
string: ''
|
81
|
+
headers:
|
82
|
+
User-Agent:
|
83
|
+
- Faraday v0.9.0
|
84
|
+
Content-Type:
|
85
|
+
- application/json
|
86
|
+
Api-Token:
|
87
|
+
- testing
|
88
|
+
User-Token:
|
89
|
+
- b6fde0d6ee416b1a5c0697393c9a6b2775c49c614a134cc5c32d0d1c12b52d99
|
90
|
+
Service-User-Id:
|
91
|
+
- b36149444788c485e559d1fe1cbc29a7874d8fce8a2955247b48575a64b90676
|
92
|
+
Accept-Encoding:
|
93
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
94
|
+
Accept:
|
95
|
+
- "*/*"
|
96
|
+
response:
|
97
|
+
status:
|
98
|
+
code: 200
|
99
|
+
message: 'OK '
|
100
|
+
headers:
|
101
|
+
X-Frame-Options:
|
102
|
+
- SAMEORIGIN
|
103
|
+
X-Xss-Protection:
|
104
|
+
- 1; mode=block
|
105
|
+
X-Content-Type-Options:
|
106
|
+
- nosniff
|
107
|
+
X-Ua-Compatible:
|
108
|
+
- chrome=1
|
109
|
+
Content-Type:
|
110
|
+
- application/json; charset=utf-8
|
111
|
+
Etag:
|
112
|
+
- '"2aa11a1ab77b139e58f765299f923a01"'
|
113
|
+
Cache-Control:
|
114
|
+
- max-age=0, private, must-revalidate
|
115
|
+
X-Request-Id:
|
116
|
+
- 496020e0-03a4-4c5d-a9f7-14fd3eff87f7
|
117
|
+
X-Runtime:
|
118
|
+
- '0.004888'
|
119
|
+
Server:
|
120
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
121
|
+
Date:
|
122
|
+
- Sat, 18 Oct 2014 17:26:38 GMT
|
123
|
+
Content-Length:
|
124
|
+
- '469'
|
125
|
+
Connection:
|
126
|
+
- Keep-Alive
|
127
|
+
body:
|
128
|
+
encoding: UTF-8
|
129
|
+
string: |-
|
130
|
+
{
|
131
|
+
"_links": {
|
132
|
+
"self": {
|
133
|
+
"href": "http://localhost:3000/"
|
134
|
+
},
|
135
|
+
"surveys": {
|
136
|
+
"href": "http://localhost:3000/api/surveys{/id}{?query*}"
|
137
|
+
},
|
138
|
+
"users": {
|
139
|
+
"href": "http://localhost:3000/api/users{/id}{?query*}"
|
140
|
+
},
|
141
|
+
"questions": {
|
142
|
+
"href": "http://localhost:3000/api/questions{/id}{?query*}"
|
143
|
+
},
|
144
|
+
"survey_questions": {
|
145
|
+
"href": "http://localhost:3000/api/questions{/question_id}/survey_questions{?query*}"
|
146
|
+
}
|
147
|
+
}
|
148
|
+
}
|
149
|
+
http_version:
|
150
|
+
recorded_at: Sat, 18 Oct 2014 17:26:38 GMT
|
151
|
+
- request:
|
152
|
+
method: post
|
153
|
+
uri: http://localhost:3000/api/users
|
154
|
+
body:
|
155
|
+
encoding: UTF-8
|
156
|
+
string: "{}"
|
157
|
+
headers:
|
158
|
+
User-Agent:
|
159
|
+
- Faraday v0.9.0
|
160
|
+
Content-Type:
|
161
|
+
- application/json
|
162
|
+
Api-Token:
|
163
|
+
- testing
|
164
|
+
User-Token:
|
165
|
+
- 79d638f50b633871f48db1bf89a367c13fa838cc79b665c0f82ffc28fcf2d1ab
|
166
|
+
Service-User-Id:
|
167
|
+
- 0cc711f2486004185fe85b93f829074b225b46a616d10cb2d5c9f15329c22e05
|
168
|
+
Accept-Encoding:
|
169
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
170
|
+
Accept:
|
171
|
+
- "*/*"
|
172
|
+
response:
|
173
|
+
status:
|
174
|
+
code: 201
|
175
|
+
message: 'Created '
|
176
|
+
headers:
|
177
|
+
X-Frame-Options:
|
178
|
+
- SAMEORIGIN
|
179
|
+
X-Xss-Protection:
|
180
|
+
- 1; mode=block
|
181
|
+
X-Content-Type-Options:
|
182
|
+
- nosniff
|
183
|
+
X-Ua-Compatible:
|
184
|
+
- chrome=1
|
185
|
+
Content-Type:
|
186
|
+
- application/json; charset=utf-8
|
187
|
+
Etag:
|
188
|
+
- '"2cec193468012756c3209fd1a55bffd2"'
|
189
|
+
Cache-Control:
|
190
|
+
- max-age=0, private, must-revalidate
|
191
|
+
X-Request-Id:
|
192
|
+
- eee46313-e2bd-4eb3-b104-e017b44f2f54
|
193
|
+
X-Runtime:
|
194
|
+
- '0.007104'
|
195
|
+
Server:
|
196
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
197
|
+
Date:
|
198
|
+
- Sat, 18 Oct 2014 17:30:45 GMT
|
199
|
+
Content-Length:
|
200
|
+
- '261'
|
201
|
+
Connection:
|
202
|
+
- Keep-Alive
|
203
|
+
body:
|
204
|
+
encoding: UTF-8
|
205
|
+
string: |-
|
206
|
+
{
|
207
|
+
"service_user_id": "9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00",
|
208
|
+
"_links": {
|
209
|
+
"self": {
|
210
|
+
"href": "http://localhost:3000/api/users/151"
|
211
|
+
}
|
212
|
+
},
|
213
|
+
"token": "440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c"
|
214
|
+
}
|
215
|
+
http_version:
|
216
|
+
recorded_at: Sat, 18 Oct 2014 17:30:45 GMT
|
217
|
+
- request:
|
218
|
+
method: post
|
219
|
+
uri: http://localhost:3000/api/surveys
|
220
|
+
body:
|
221
|
+
encoding: UTF-8
|
222
|
+
string: '{"survey":{"service_user_id":"9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00"}}'
|
223
|
+
headers:
|
224
|
+
User-Agent:
|
225
|
+
- Faraday v0.9.0
|
226
|
+
Content-Type:
|
227
|
+
- application/json
|
228
|
+
Api-Token:
|
229
|
+
- testing
|
230
|
+
User-Token:
|
231
|
+
- 440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c
|
232
|
+
Service-User-Id:
|
233
|
+
- 9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00
|
234
|
+
Accept-Encoding:
|
235
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
236
|
+
Accept:
|
237
|
+
- "*/*"
|
238
|
+
response:
|
239
|
+
status:
|
240
|
+
code: 201
|
241
|
+
message: 'Created '
|
242
|
+
headers:
|
243
|
+
X-Frame-Options:
|
244
|
+
- SAMEORIGIN
|
245
|
+
X-Xss-Protection:
|
246
|
+
- 1; mode=block
|
247
|
+
X-Content-Type-Options:
|
248
|
+
- nosniff
|
249
|
+
X-Ua-Compatible:
|
250
|
+
- chrome=1
|
251
|
+
Content-Type:
|
252
|
+
- application/json; charset=utf-8
|
253
|
+
Etag:
|
254
|
+
- '"46818a3fcc77bd71dc428c52dc74286d"'
|
255
|
+
Cache-Control:
|
256
|
+
- max-age=0, private, must-revalidate
|
257
|
+
X-Request-Id:
|
258
|
+
- 87439d4f-bf70-4480-88d5-b9cf384762f7
|
259
|
+
X-Runtime:
|
260
|
+
- '0.012930'
|
261
|
+
Server:
|
262
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
263
|
+
Date:
|
264
|
+
- Sat, 18 Oct 2014 17:30:45 GMT
|
265
|
+
Content-Length:
|
266
|
+
- '476'
|
267
|
+
Connection:
|
268
|
+
- Keep-Alive
|
269
|
+
body:
|
270
|
+
encoding: UTF-8
|
271
|
+
string: |-
|
272
|
+
{
|
273
|
+
"id": 188,
|
274
|
+
"service_user_id": "9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00",
|
275
|
+
"_links": {
|
276
|
+
"self": {
|
277
|
+
"href": "http://localhost:3000/api/surveys/188"
|
278
|
+
},
|
279
|
+
"survey_questions": {
|
280
|
+
"post": {
|
281
|
+
"href": "http://localhost:3000/api/surveys/188/survey_questions"
|
282
|
+
},
|
283
|
+
"put": {
|
284
|
+
"href": "http://localhost:3000/api/surveys/188/survey_questions"
|
285
|
+
}
|
286
|
+
}
|
287
|
+
},
|
288
|
+
"completed": false,
|
289
|
+
"survey_questions": [
|
290
|
+
|
291
|
+
]
|
292
|
+
}
|
293
|
+
http_version:
|
294
|
+
recorded_at: Sat, 18 Oct 2014 17:30:45 GMT
|
295
|
+
- request:
|
296
|
+
method: post
|
297
|
+
uri: http://localhost:3000/api/surveys
|
298
|
+
body:
|
299
|
+
encoding: UTF-8
|
300
|
+
string: '{"survey":{"service_user_id":"9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00"}}'
|
301
|
+
headers:
|
302
|
+
User-Agent:
|
303
|
+
- Faraday v0.9.0
|
304
|
+
Content-Type:
|
305
|
+
- application/json
|
306
|
+
Api-Token:
|
307
|
+
- testing
|
308
|
+
User-Token:
|
309
|
+
- 440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c
|
310
|
+
Service-User-Id:
|
311
|
+
- 9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00
|
312
|
+
Accept-Encoding:
|
313
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
314
|
+
Accept:
|
315
|
+
- "*/*"
|
316
|
+
response:
|
317
|
+
status:
|
318
|
+
code: 201
|
319
|
+
message: 'Created '
|
320
|
+
headers:
|
321
|
+
X-Frame-Options:
|
322
|
+
- SAMEORIGIN
|
323
|
+
X-Xss-Protection:
|
324
|
+
- 1; mode=block
|
325
|
+
X-Content-Type-Options:
|
326
|
+
- nosniff
|
327
|
+
X-Ua-Compatible:
|
328
|
+
- chrome=1
|
329
|
+
Content-Type:
|
330
|
+
- application/json; charset=utf-8
|
331
|
+
Etag:
|
332
|
+
- '"5265d7fa113e82a35cf5e32f25c56dd3"'
|
333
|
+
Cache-Control:
|
334
|
+
- max-age=0, private, must-revalidate
|
335
|
+
X-Request-Id:
|
336
|
+
- 3acf5b87-a701-4270-9833-557c3eb76520
|
337
|
+
X-Runtime:
|
338
|
+
- '0.030422'
|
339
|
+
Server:
|
340
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
341
|
+
Date:
|
342
|
+
- Sat, 18 Oct 2014 17:30:45 GMT
|
343
|
+
Content-Length:
|
344
|
+
- '476'
|
345
|
+
Connection:
|
346
|
+
- Keep-Alive
|
347
|
+
body:
|
348
|
+
encoding: UTF-8
|
349
|
+
string: |-
|
350
|
+
{
|
351
|
+
"id": 189,
|
352
|
+
"service_user_id": "9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00",
|
353
|
+
"_links": {
|
354
|
+
"self": {
|
355
|
+
"href": "http://localhost:3000/api/surveys/189"
|
356
|
+
},
|
357
|
+
"survey_questions": {
|
358
|
+
"post": {
|
359
|
+
"href": "http://localhost:3000/api/surveys/189/survey_questions"
|
360
|
+
},
|
361
|
+
"put": {
|
362
|
+
"href": "http://localhost:3000/api/surveys/189/survey_questions"
|
363
|
+
}
|
364
|
+
}
|
365
|
+
},
|
366
|
+
"completed": false,
|
367
|
+
"survey_questions": [
|
368
|
+
|
369
|
+
]
|
370
|
+
}
|
371
|
+
http_version:
|
372
|
+
recorded_at: Sat, 18 Oct 2014 17:30:45 GMT
|
373
|
+
- request:
|
374
|
+
method: get
|
375
|
+
uri: http://localhost:3000/api/surveys
|
376
|
+
body:
|
377
|
+
encoding: US-ASCII
|
378
|
+
string: ''
|
379
|
+
headers:
|
380
|
+
User-Agent:
|
381
|
+
- Faraday v0.9.0
|
382
|
+
Content-Type:
|
383
|
+
- application/json
|
384
|
+
Api-Token:
|
385
|
+
- testing
|
386
|
+
User-Token:
|
387
|
+
- 440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c
|
388
|
+
Service-User-Id:
|
389
|
+
- 9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00
|
390
|
+
Accept-Encoding:
|
391
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
392
|
+
Accept:
|
393
|
+
- "*/*"
|
394
|
+
response:
|
395
|
+
status:
|
396
|
+
code: 200
|
397
|
+
message: 'OK '
|
398
|
+
headers:
|
399
|
+
X-Frame-Options:
|
400
|
+
- SAMEORIGIN
|
401
|
+
X-Xss-Protection:
|
402
|
+
- 1; mode=block
|
403
|
+
X-Content-Type-Options:
|
404
|
+
- nosniff
|
405
|
+
X-Ua-Compatible:
|
406
|
+
- chrome=1
|
407
|
+
Content-Type:
|
408
|
+
- application/json; charset=utf-8
|
409
|
+
Etag:
|
410
|
+
- '"23dc82cfa73f7b8a091eb8abb5b8f7f3"'
|
411
|
+
Cache-Control:
|
412
|
+
- max-age=0, private, must-revalidate
|
413
|
+
X-Request-Id:
|
414
|
+
- b6d7988e-1b4a-4b99-b337-0c0d809fcafa
|
415
|
+
X-Runtime:
|
416
|
+
- '0.011304'
|
417
|
+
Server:
|
418
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
419
|
+
Date:
|
420
|
+
- Sat, 18 Oct 2014 17:30:45 GMT
|
421
|
+
Content-Length:
|
422
|
+
- '1137'
|
423
|
+
Connection:
|
424
|
+
- Keep-Alive
|
425
|
+
body:
|
426
|
+
encoding: UTF-8
|
427
|
+
string: |-
|
428
|
+
{
|
429
|
+
"surveys": [
|
430
|
+
{
|
431
|
+
"id": 188,
|
432
|
+
"service_user_id": "9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00",
|
433
|
+
"_links": {
|
434
|
+
"self": {
|
435
|
+
"href": "http://localhost:3000/api/surveys/188"
|
436
|
+
},
|
437
|
+
"survey_questions": {
|
438
|
+
"post": {
|
439
|
+
"href": "http://localhost:3000/api/surveys/188/survey_questions"
|
440
|
+
},
|
441
|
+
"put": {
|
442
|
+
"href": "http://localhost:3000/api/surveys/188/survey_questions"
|
443
|
+
}
|
444
|
+
}
|
445
|
+
},
|
446
|
+
"completed": false,
|
447
|
+
"survey_questions": [
|
448
|
+
|
449
|
+
]
|
450
|
+
},
|
451
|
+
{
|
452
|
+
"id": 189,
|
453
|
+
"service_user_id": "9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00",
|
454
|
+
"_links": {
|
455
|
+
"self": {
|
456
|
+
"href": "http://localhost:3000/api/surveys/189"
|
457
|
+
},
|
458
|
+
"survey_questions": {
|
459
|
+
"post": {
|
460
|
+
"href": "http://localhost:3000/api/surveys/189/survey_questions"
|
461
|
+
},
|
462
|
+
"put": {
|
463
|
+
"href": "http://localhost:3000/api/surveys/189/survey_questions"
|
464
|
+
}
|
465
|
+
}
|
466
|
+
},
|
467
|
+
"completed": false,
|
468
|
+
"survey_questions": [
|
469
|
+
|
470
|
+
]
|
471
|
+
}
|
472
|
+
]
|
473
|
+
}
|
474
|
+
http_version:
|
475
|
+
recorded_at: Sat, 18 Oct 2014 17:30:45 GMT
|
476
|
+
recorded_with: VCR 2.6.0
|
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
|
-
method:
|
5
|
-
uri: http://localhost:3000/
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/api/users/
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "{}"
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
11
|
- Faraday v0.9.0
|
@@ -19,8 +19,8 @@ http_interactions:
|
|
19
19
|
- "*/*"
|
20
20
|
response:
|
21
21
|
status:
|
22
|
-
code:
|
23
|
-
message: '
|
22
|
+
code: 201
|
23
|
+
message: 'Created '
|
24
24
|
headers:
|
25
25
|
X-Frame-Options:
|
26
26
|
- SAMEORIGIN
|
@@ -33,48 +33,42 @@ http_interactions:
|
|
33
33
|
Content-Type:
|
34
34
|
- application/json; charset=utf-8
|
35
35
|
Etag:
|
36
|
-
- '"
|
36
|
+
- '"903006ae2ce12ab6070ee76670a487bb"'
|
37
37
|
Cache-Control:
|
38
38
|
- max-age=0, private, must-revalidate
|
39
39
|
X-Request-Id:
|
40
|
-
-
|
40
|
+
- 5bcdbb1e-8c13-46f0-aab2-482c64577c0e
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
42
|
+
- '0.006907'
|
43
43
|
Server:
|
44
44
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
45
45
|
Date:
|
46
|
-
- Sat,
|
46
|
+
- Sat, 20 Sep 2014 14:14:34 GMT
|
47
47
|
Content-Length:
|
48
|
-
- '
|
48
|
+
- '272'
|
49
49
|
Connection:
|
50
50
|
- Keep-Alive
|
51
51
|
body:
|
52
52
|
encoding: UTF-8
|
53
53
|
string: |-
|
54
54
|
{
|
55
|
+
"id": 13,
|
56
|
+
"service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
|
55
57
|
"_links": {
|
56
58
|
"self": {
|
57
|
-
"href": "http://localhost:3000/api"
|
58
|
-
},
|
59
|
-
"surveys": {
|
60
|
-
"href": "http://localhost:3000/api/surveys"
|
61
|
-
},
|
62
|
-
"users": {
|
63
|
-
"href": "http://localhost:3000/api/users"
|
64
|
-
},
|
65
|
-
"questions": {
|
66
|
-
"href": "http://localhost:3000/api/questions"
|
59
|
+
"href": "http://localhost:3000/api/users/13"
|
67
60
|
}
|
68
|
-
}
|
61
|
+
},
|
62
|
+
"token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
|
69
63
|
}
|
70
64
|
http_version:
|
71
|
-
recorded_at: Sat,
|
65
|
+
recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
|
72
66
|
- request:
|
73
|
-
method:
|
74
|
-
uri: http://localhost:3000/
|
67
|
+
method: get
|
68
|
+
uri: http://localhost:3000/
|
75
69
|
body:
|
76
|
-
encoding:
|
77
|
-
string:
|
70
|
+
encoding: US-ASCII
|
71
|
+
string: ''
|
78
72
|
headers:
|
79
73
|
User-Agent:
|
80
74
|
- Faraday v0.9.0
|
@@ -88,8 +82,8 @@ http_interactions:
|
|
88
82
|
- "*/*"
|
89
83
|
response:
|
90
84
|
status:
|
91
|
-
code:
|
92
|
-
message: '
|
85
|
+
code: 200
|
86
|
+
message: 'OK '
|
93
87
|
headers:
|
94
88
|
X-Frame-Options:
|
95
89
|
- SAMEORIGIN
|
@@ -102,36 +96,45 @@ http_interactions:
|
|
102
96
|
Content-Type:
|
103
97
|
- application/json; charset=utf-8
|
104
98
|
Etag:
|
105
|
-
- '"
|
99
|
+
- '"2aa11a1ab77b139e58f765299f923a01"'
|
106
100
|
Cache-Control:
|
107
101
|
- max-age=0, private, must-revalidate
|
108
102
|
X-Request-Id:
|
109
|
-
-
|
103
|
+
- 3d9d0667-75a4-4108-a1dd-26aa65ae4fee
|
110
104
|
X-Runtime:
|
111
|
-
- '0.
|
105
|
+
- '0.004854'
|
112
106
|
Server:
|
113
107
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
114
108
|
Date:
|
115
|
-
- Sat,
|
109
|
+
- Sat, 18 Oct 2014 17:23:04 GMT
|
116
110
|
Content-Length:
|
117
|
-
- '
|
111
|
+
- '469'
|
118
112
|
Connection:
|
119
113
|
- Keep-Alive
|
120
114
|
body:
|
121
115
|
encoding: UTF-8
|
122
116
|
string: |-
|
123
117
|
{
|
124
|
-
"id": 13,
|
125
|
-
"service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
|
126
118
|
"_links": {
|
127
119
|
"self": {
|
128
|
-
"href": "http://localhost:3000/
|
120
|
+
"href": "http://localhost:3000/"
|
121
|
+
},
|
122
|
+
"surveys": {
|
123
|
+
"href": "http://localhost:3000/api/surveys{/id}{?query*}"
|
124
|
+
},
|
125
|
+
"users": {
|
126
|
+
"href": "http://localhost:3000/api/users{/id}{?query*}"
|
127
|
+
},
|
128
|
+
"questions": {
|
129
|
+
"href": "http://localhost:3000/api/questions{/id}{?query*}"
|
130
|
+
},
|
131
|
+
"survey_questions": {
|
132
|
+
"href": "http://localhost:3000/api/questions{/question_id}/survey_questions{?query*}"
|
129
133
|
}
|
130
|
-
}
|
131
|
-
"token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
|
134
|
+
}
|
132
135
|
}
|
133
136
|
http_version:
|
134
|
-
recorded_at: Sat,
|
137
|
+
recorded_at: Sat, 18 Oct 2014 17:23:04 GMT
|
135
138
|
- request:
|
136
139
|
method: post
|
137
140
|
uri: http://localhost:3000/api/users
|
@@ -145,6 +148,10 @@ http_interactions:
|
|
145
148
|
- application/json
|
146
149
|
Api-Token:
|
147
150
|
- testing
|
151
|
+
User-Token:
|
152
|
+
- 440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c
|
153
|
+
Service-User-Id:
|
154
|
+
- 9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00
|
148
155
|
Accept-Encoding:
|
149
156
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
150
157
|
Accept:
|
@@ -165,17 +172,17 @@ http_interactions:
|
|
165
172
|
Content-Type:
|
166
173
|
- application/json; charset=utf-8
|
167
174
|
Etag:
|
168
|
-
- '"
|
175
|
+
- '"de524230fc03846624c6b07bdfb110c2"'
|
169
176
|
Cache-Control:
|
170
177
|
- max-age=0, private, must-revalidate
|
171
178
|
X-Request-Id:
|
172
|
-
-
|
179
|
+
- 08c1d1c8-632b-4d10-b6cc-3567546f27f1
|
173
180
|
X-Runtime:
|
174
|
-
- '0.
|
181
|
+
- '0.009305'
|
175
182
|
Server:
|
176
183
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
177
184
|
Date:
|
178
|
-
-
|
185
|
+
- Sat, 18 Oct 2014 17:31:13 GMT
|
179
186
|
Content-Length:
|
180
187
|
- '261'
|
181
188
|
Connection:
|
@@ -184,14 +191,14 @@ http_interactions:
|
|
184
191
|
encoding: UTF-8
|
185
192
|
string: |-
|
186
193
|
{
|
187
|
-
"service_user_id": "
|
194
|
+
"service_user_id": "b98f19d9fc82b2d6ee9845a3844454b98a9f5b47a2b16dd48e768d18167c8133",
|
188
195
|
"_links": {
|
189
196
|
"self": {
|
190
|
-
"href": "http://localhost:3000/api/users/
|
197
|
+
"href": "http://localhost:3000/api/users/156"
|
191
198
|
}
|
192
199
|
},
|
193
|
-
"token": "
|
200
|
+
"token": "2d1af3825c28236b06e594daf2fcfec5edd7aed545beb06ea81becc246598385"
|
194
201
|
}
|
195
202
|
http_version:
|
196
|
-
recorded_at:
|
203
|
+
recorded_at: Sat, 18 Oct 2014 17:31:13 GMT
|
197
204
|
recorded_with: VCR 2.6.0
|