poptart 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/poptart.rb +1 -4
- data/lib/poptart/link.rb +9 -0
- data/lib/poptart/model.rb +13 -29
- data/lib/poptart/question.rb +21 -17
- data/lib/poptart/root.rb +10 -1
- data/lib/poptart/survey.rb +34 -7
- data/lib/poptart/survey_question.rb +32 -12
- data/lib/poptart/user.rb +4 -21
- data/lib/version.rb +1 -1
- data/poptart.gemspec +0 -4
- data/spec/lib/poptart/model_spec.rb +95 -0
- data/spec/lib/poptart/question_spec.rb +47 -0
- data/spec/lib/poptart/root_spec.rb +50 -0
- data/spec/lib/poptart/survey_question_spec.rb +166 -0
- data/spec/lib/poptart/survey_spec.rb +105 -0
- data/spec/lib/poptart/user_spec.rb +45 -0
- data/spec/requests/questions_spec.rb +31 -0
- data/spec/requests/survey_questions_spec.rb +150 -0
- data/spec/requests/surveys_spec.rb +34 -5
- data/spec/requests/{user_management_spec.rb → users_spec.rb} +5 -5
- data/spec/spec_helper.rb +1 -4
- data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +1527 -1596
- data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +2942 -2035
- data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +254 -70
- data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +110 -48
- data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1618 -286
- data/spec/vcr/poptart/survey/adds_a_question_to_a_survey.yml +1939 -0
- data/spec/vcr/poptart/survey/creates_a_random_survey.yml +318 -0
- data/spec/vcr/poptart/survey/creates_an_empty_survey.yml +702 -0
- data/spec/vcr/poptart/survey/returns_a_survey_by_id.yml +618 -0
- data/spec/vcr/poptart/user/creates_a_user.yml +179 -0
- data/spec/vcr/{user/management_creates_a_user.yml → poptart/user/returns_a_user.yml} +72 -69
- data/spec/vcr/questions/creates_a_question.yml +186 -0
- data/spec/vcr/questions/finds_a_question_by_id.yml +326 -0
- data/spec/vcr/questions/finds_a_question_by_key.yml +144 -0
- data/spec/vcr/questions/returns_all_answered_survey_questions_for_a_question.yml +1021 -0
- data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question.yml +533 -479
- data/spec/vcr/survey/questions_answers_a_multiple_choice_question.yml +1454 -0
- data/spec/vcr/survey/questions_answers_a_survey_question.yml +1772 -0
- data/spec/vcr/survey/questions_creates_and_returns_an_empty_survey.yml +372 -0
- data/spec/vcr/survey/questions_finds_survey_question_for_id.yml +3083 -0
- data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question.yml +5756 -0
- data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question_by_key.yml +973 -0
- data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_survey.yml +620 -0
- metadata +55 -72
- data/lib/poptart/boolean_question.rb +0 -14
- data/lib/poptart/multiple_response_question.rb +0 -9
- data/lib/poptart/range_question.rb +0 -9
- data/lib/poptart/time_question.rb +0 -9
- data/spec/requests/answering_survey_questions_spec.rb +0 -79
- data/spec/requests/answers_spec.rb +0 -45
- data/spec/requests/creating_questions_spec.rb +0 -30
@@ -0,0 +1,620 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://localhost:3000/api/questions
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"question":{"question_type":"boolean","responses":[true,false],"text":"Do
|
9
|
+
you like poptarts?","key":"testingooptarts"}}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- Faraday v0.9.0
|
13
|
+
Content-Type:
|
14
|
+
- application/json
|
15
|
+
Api-Token:
|
16
|
+
- testing
|
17
|
+
User-Token:
|
18
|
+
- 57a8137c20771c1e4a800403e745abdfce7ec325af8a59d2934f58508ed5193b
|
19
|
+
Service-User-Id:
|
20
|
+
- a1bedf5085a725862ea8ba37f16edc291f742239bd92b23aae90aaa278a1b7b7
|
21
|
+
Accept-Encoding:
|
22
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
23
|
+
Accept:
|
24
|
+
- "*/*"
|
25
|
+
response:
|
26
|
+
status:
|
27
|
+
code: 201
|
28
|
+
message: 'Created '
|
29
|
+
headers:
|
30
|
+
X-Frame-Options:
|
31
|
+
- SAMEORIGIN
|
32
|
+
X-Xss-Protection:
|
33
|
+
- 1; mode=block
|
34
|
+
X-Content-Type-Options:
|
35
|
+
- nosniff
|
36
|
+
X-Ua-Compatible:
|
37
|
+
- chrome=1
|
38
|
+
Content-Type:
|
39
|
+
- application/json; charset=utf-8
|
40
|
+
Etag:
|
41
|
+
- '"b47edba160a95ce301be2965b437d3fc"'
|
42
|
+
Cache-Control:
|
43
|
+
- max-age=0, private, must-revalidate
|
44
|
+
X-Request-Id:
|
45
|
+
- 4adfb8c4-3799-4f23-a02d-404b216d3ab7
|
46
|
+
X-Runtime:
|
47
|
+
- '0.008680'
|
48
|
+
Server:
|
49
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
50
|
+
Date:
|
51
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
52
|
+
Content-Length:
|
53
|
+
- '281'
|
54
|
+
Connection:
|
55
|
+
- Keep-Alive
|
56
|
+
body:
|
57
|
+
encoding: UTF-8
|
58
|
+
string: |-
|
59
|
+
{
|
60
|
+
"id": 105,
|
61
|
+
"question_type": "boolean",
|
62
|
+
"text": "Do you like poptarts?",
|
63
|
+
"responses": [
|
64
|
+
true,
|
65
|
+
false
|
66
|
+
],
|
67
|
+
"key": "testingooptarts",
|
68
|
+
"_links": [
|
69
|
+
{
|
70
|
+
"rel": "self",
|
71
|
+
"href": "http://localhost:3000/api/questions/105",
|
72
|
+
"method": "GET"
|
73
|
+
}
|
74
|
+
]
|
75
|
+
}
|
76
|
+
http_version:
|
77
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
78
|
+
- request:
|
79
|
+
method: post
|
80
|
+
uri: http://localhost:3000/api/user
|
81
|
+
body:
|
82
|
+
encoding: UTF-8
|
83
|
+
string: "{}"
|
84
|
+
headers:
|
85
|
+
User-Agent:
|
86
|
+
- Faraday v0.9.0
|
87
|
+
Content-Type:
|
88
|
+
- application/json
|
89
|
+
Api-Token:
|
90
|
+
- testing
|
91
|
+
User-Token:
|
92
|
+
- 57a8137c20771c1e4a800403e745abdfce7ec325af8a59d2934f58508ed5193b
|
93
|
+
Service-User-Id:
|
94
|
+
- a1bedf5085a725862ea8ba37f16edc291f742239bd92b23aae90aaa278a1b7b7
|
95
|
+
Accept-Encoding:
|
96
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
97
|
+
Accept:
|
98
|
+
- "*/*"
|
99
|
+
response:
|
100
|
+
status:
|
101
|
+
code: 201
|
102
|
+
message: 'Created '
|
103
|
+
headers:
|
104
|
+
X-Frame-Options:
|
105
|
+
- SAMEORIGIN
|
106
|
+
X-Xss-Protection:
|
107
|
+
- 1; mode=block
|
108
|
+
X-Content-Type-Options:
|
109
|
+
- nosniff
|
110
|
+
X-Ua-Compatible:
|
111
|
+
- chrome=1
|
112
|
+
Content-Type:
|
113
|
+
- application/json; charset=utf-8
|
114
|
+
Etag:
|
115
|
+
- '"e0aebde78c71ddf46b08e6d58a821b83"'
|
116
|
+
Cache-Control:
|
117
|
+
- max-age=0, private, must-revalidate
|
118
|
+
X-Request-Id:
|
119
|
+
- 693e143d-ca7d-4be4-a72e-5f16ef254992
|
120
|
+
X-Runtime:
|
121
|
+
- '0.009722'
|
122
|
+
Server:
|
123
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
124
|
+
Date:
|
125
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
126
|
+
Content-Length:
|
127
|
+
- '292'
|
128
|
+
Connection:
|
129
|
+
- Keep-Alive
|
130
|
+
body:
|
131
|
+
encoding: UTF-8
|
132
|
+
string: |-
|
133
|
+
{
|
134
|
+
"service_user_id": "34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51",
|
135
|
+
"_links": [
|
136
|
+
{
|
137
|
+
"href": "http://localhost:3000/api/user",
|
138
|
+
"rel": "self",
|
139
|
+
"method": "GET"
|
140
|
+
}
|
141
|
+
],
|
142
|
+
"token": "4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15"
|
143
|
+
}
|
144
|
+
http_version:
|
145
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
146
|
+
- request:
|
147
|
+
method: post
|
148
|
+
uri: http://localhost:3000/api/surveys
|
149
|
+
body:
|
150
|
+
encoding: UTF-8
|
151
|
+
string: "{}"
|
152
|
+
headers:
|
153
|
+
User-Agent:
|
154
|
+
- Faraday v0.9.0
|
155
|
+
Content-Type:
|
156
|
+
- application/json
|
157
|
+
Api-Token:
|
158
|
+
- testing
|
159
|
+
User-Token:
|
160
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
161
|
+
Service-User-Id:
|
162
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
163
|
+
Accept-Encoding:
|
164
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
165
|
+
Accept:
|
166
|
+
- "*/*"
|
167
|
+
response:
|
168
|
+
status:
|
169
|
+
code: 201
|
170
|
+
message: 'Created '
|
171
|
+
headers:
|
172
|
+
X-Frame-Options:
|
173
|
+
- SAMEORIGIN
|
174
|
+
X-Xss-Protection:
|
175
|
+
- 1; mode=block
|
176
|
+
X-Content-Type-Options:
|
177
|
+
- nosniff
|
178
|
+
X-Ua-Compatible:
|
179
|
+
- chrome=1
|
180
|
+
Content-Type:
|
181
|
+
- application/json; charset=utf-8
|
182
|
+
Etag:
|
183
|
+
- '"4ea007c781998bd35bf7f44d337d68e6"'
|
184
|
+
Cache-Control:
|
185
|
+
- max-age=0, private, must-revalidate
|
186
|
+
X-Request-Id:
|
187
|
+
- 358740b9-bcdd-4e9a-b98d-c0b6db45bcbb
|
188
|
+
X-Runtime:
|
189
|
+
- '0.013112'
|
190
|
+
Server:
|
191
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
192
|
+
Date:
|
193
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
194
|
+
Content-Length:
|
195
|
+
- '425'
|
196
|
+
Connection:
|
197
|
+
- Keep-Alive
|
198
|
+
body:
|
199
|
+
encoding: UTF-8
|
200
|
+
string: |-
|
201
|
+
{
|
202
|
+
"id": 115,
|
203
|
+
"service_user_id": "34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51",
|
204
|
+
"_links": [
|
205
|
+
{
|
206
|
+
"href": "http://localhost:3000/api/surveys/115",
|
207
|
+
"rel": "self",
|
208
|
+
"method": "GET"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions",
|
212
|
+
"rel": "survey-questions",
|
213
|
+
"method": "POST"
|
214
|
+
}
|
215
|
+
],
|
216
|
+
"completed": true,
|
217
|
+
"survey_questions": [
|
218
|
+
|
219
|
+
]
|
220
|
+
}
|
221
|
+
http_version:
|
222
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
223
|
+
- request:
|
224
|
+
method: post
|
225
|
+
uri: http://localhost:3000/api/surveys/115/survey_questions
|
226
|
+
body:
|
227
|
+
encoding: UTF-8
|
228
|
+
string: '{"survey_question":{"question_id":105,"responses":null}}'
|
229
|
+
headers:
|
230
|
+
User-Agent:
|
231
|
+
- Faraday v0.9.0
|
232
|
+
Content-Type:
|
233
|
+
- application/json
|
234
|
+
Api-Token:
|
235
|
+
- testing
|
236
|
+
User-Token:
|
237
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
238
|
+
Service-User-Id:
|
239
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
240
|
+
Accept-Encoding:
|
241
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
242
|
+
Accept:
|
243
|
+
- "*/*"
|
244
|
+
response:
|
245
|
+
status:
|
246
|
+
code: 201
|
247
|
+
message: 'Created '
|
248
|
+
headers:
|
249
|
+
X-Frame-Options:
|
250
|
+
- SAMEORIGIN
|
251
|
+
X-Xss-Protection:
|
252
|
+
- 1; mode=block
|
253
|
+
X-Content-Type-Options:
|
254
|
+
- nosniff
|
255
|
+
X-Ua-Compatible:
|
256
|
+
- chrome=1
|
257
|
+
Content-Type:
|
258
|
+
- application/json; charset=utf-8
|
259
|
+
Etag:
|
260
|
+
- '"bb3ab0e78c0b8f7312a5fb1556a554bd"'
|
261
|
+
Cache-Control:
|
262
|
+
- max-age=0, private, must-revalidate
|
263
|
+
X-Request-Id:
|
264
|
+
- 358525af-d4d8-4cb7-9ed3-b15ee62ab5d1
|
265
|
+
X-Runtime:
|
266
|
+
- '0.011725'
|
267
|
+
Server:
|
268
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
269
|
+
Date:
|
270
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
271
|
+
Content-Length:
|
272
|
+
- '623'
|
273
|
+
Connection:
|
274
|
+
- Keep-Alive
|
275
|
+
body:
|
276
|
+
encoding: UTF-8
|
277
|
+
string: |-
|
278
|
+
{
|
279
|
+
"id": 70,
|
280
|
+
"text": "Do you like poptarts?",
|
281
|
+
"question_type": "boolean",
|
282
|
+
"responses": [
|
283
|
+
"t",
|
284
|
+
"f"
|
285
|
+
],
|
286
|
+
"answer": null,
|
287
|
+
"_links": [
|
288
|
+
{
|
289
|
+
"rel": "self",
|
290
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/70",
|
291
|
+
"method": "GET"
|
292
|
+
},
|
293
|
+
{
|
294
|
+
"rel": "self",
|
295
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/70",
|
296
|
+
"method": "PUT"
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"rel": "survey",
|
300
|
+
"href": "http://localhost:3000/api/surveys/115",
|
301
|
+
"method": "GET"
|
302
|
+
}
|
303
|
+
],
|
304
|
+
"created_at": "2015-01-25T14:21:47.669Z",
|
305
|
+
"key": "testingooptarts",
|
306
|
+
"question_id": 105
|
307
|
+
}
|
308
|
+
http_version:
|
309
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
310
|
+
- request:
|
311
|
+
method: post
|
312
|
+
uri: http://localhost:3000/api/surveys/115/survey_questions
|
313
|
+
body:
|
314
|
+
encoding: UTF-8
|
315
|
+
string: '{"survey_question":{"question_id":105,"responses":null}}'
|
316
|
+
headers:
|
317
|
+
User-Agent:
|
318
|
+
- Faraday v0.9.0
|
319
|
+
Content-Type:
|
320
|
+
- application/json
|
321
|
+
Api-Token:
|
322
|
+
- testing
|
323
|
+
User-Token:
|
324
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
325
|
+
Service-User-Id:
|
326
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
327
|
+
Accept-Encoding:
|
328
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
329
|
+
Accept:
|
330
|
+
- "*/*"
|
331
|
+
response:
|
332
|
+
status:
|
333
|
+
code: 201
|
334
|
+
message: 'Created '
|
335
|
+
headers:
|
336
|
+
X-Frame-Options:
|
337
|
+
- SAMEORIGIN
|
338
|
+
X-Xss-Protection:
|
339
|
+
- 1; mode=block
|
340
|
+
X-Content-Type-Options:
|
341
|
+
- nosniff
|
342
|
+
X-Ua-Compatible:
|
343
|
+
- chrome=1
|
344
|
+
Content-Type:
|
345
|
+
- application/json; charset=utf-8
|
346
|
+
Etag:
|
347
|
+
- '"111d9c7e5b4c79dcfa0c82015b197cf3"'
|
348
|
+
Cache-Control:
|
349
|
+
- max-age=0, private, must-revalidate
|
350
|
+
X-Request-Id:
|
351
|
+
- d4446213-c76a-4305-8bc2-6de6ab4289cd
|
352
|
+
X-Runtime:
|
353
|
+
- '0.012382'
|
354
|
+
Server:
|
355
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
356
|
+
Date:
|
357
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
358
|
+
Content-Length:
|
359
|
+
- '623'
|
360
|
+
Connection:
|
361
|
+
- Keep-Alive
|
362
|
+
body:
|
363
|
+
encoding: UTF-8
|
364
|
+
string: |-
|
365
|
+
{
|
366
|
+
"id": 71,
|
367
|
+
"text": "Do you like poptarts?",
|
368
|
+
"question_type": "boolean",
|
369
|
+
"responses": [
|
370
|
+
"t",
|
371
|
+
"f"
|
372
|
+
],
|
373
|
+
"answer": null,
|
374
|
+
"_links": [
|
375
|
+
{
|
376
|
+
"rel": "self",
|
377
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/71",
|
378
|
+
"method": "GET"
|
379
|
+
},
|
380
|
+
{
|
381
|
+
"rel": "self",
|
382
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/71",
|
383
|
+
"method": "PUT"
|
384
|
+
},
|
385
|
+
{
|
386
|
+
"rel": "survey",
|
387
|
+
"href": "http://localhost:3000/api/surveys/115",
|
388
|
+
"method": "GET"
|
389
|
+
}
|
390
|
+
],
|
391
|
+
"created_at": "2015-01-25T14:21:47.696Z",
|
392
|
+
"key": "testingooptarts",
|
393
|
+
"question_id": 105
|
394
|
+
}
|
395
|
+
http_version:
|
396
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
397
|
+
- request:
|
398
|
+
method: put
|
399
|
+
uri: http://localhost:3000/api/surveys/115/survey_questions/70
|
400
|
+
body:
|
401
|
+
encoding: UTF-8
|
402
|
+
string: '{"id":70,"survey_question":{"answer":true}}'
|
403
|
+
headers:
|
404
|
+
User-Agent:
|
405
|
+
- Faraday v0.9.0
|
406
|
+
Content-Type:
|
407
|
+
- application/json
|
408
|
+
Api-Token:
|
409
|
+
- testing
|
410
|
+
User-Token:
|
411
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
412
|
+
Service-User-Id:
|
413
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
414
|
+
Accept-Encoding:
|
415
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
416
|
+
Accept:
|
417
|
+
- "*/*"
|
418
|
+
response:
|
419
|
+
status:
|
420
|
+
code: 204
|
421
|
+
message: 'No Content '
|
422
|
+
headers:
|
423
|
+
X-Frame-Options:
|
424
|
+
- SAMEORIGIN
|
425
|
+
X-Xss-Protection:
|
426
|
+
- 1; mode=block
|
427
|
+
X-Content-Type-Options:
|
428
|
+
- nosniff
|
429
|
+
X-Ua-Compatible:
|
430
|
+
- chrome=1
|
431
|
+
Cache-Control:
|
432
|
+
- no-cache
|
433
|
+
X-Request-Id:
|
434
|
+
- 471983be-da8d-493b-a457-3251b4525fb7
|
435
|
+
X-Runtime:
|
436
|
+
- '0.010864'
|
437
|
+
Server:
|
438
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
439
|
+
Date:
|
440
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
441
|
+
Connection:
|
442
|
+
- Keep-Alive
|
443
|
+
body:
|
444
|
+
encoding: UTF-8
|
445
|
+
string: ''
|
446
|
+
http_version:
|
447
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
448
|
+
- request:
|
449
|
+
method: put
|
450
|
+
uri: http://localhost:3000/api/surveys/115/survey_questions/71
|
451
|
+
body:
|
452
|
+
encoding: UTF-8
|
453
|
+
string: '{"id":71,"survey_question":{"answer":false}}'
|
454
|
+
headers:
|
455
|
+
User-Agent:
|
456
|
+
- Faraday v0.9.0
|
457
|
+
Content-Type:
|
458
|
+
- application/json
|
459
|
+
Api-Token:
|
460
|
+
- testing
|
461
|
+
User-Token:
|
462
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
463
|
+
Service-User-Id:
|
464
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
465
|
+
Accept-Encoding:
|
466
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
467
|
+
Accept:
|
468
|
+
- "*/*"
|
469
|
+
response:
|
470
|
+
status:
|
471
|
+
code: 204
|
472
|
+
message: 'No Content '
|
473
|
+
headers:
|
474
|
+
X-Frame-Options:
|
475
|
+
- SAMEORIGIN
|
476
|
+
X-Xss-Protection:
|
477
|
+
- 1; mode=block
|
478
|
+
X-Content-Type-Options:
|
479
|
+
- nosniff
|
480
|
+
X-Ua-Compatible:
|
481
|
+
- chrome=1
|
482
|
+
Cache-Control:
|
483
|
+
- no-cache
|
484
|
+
X-Request-Id:
|
485
|
+
- 5b4aeb90-57eb-4c04-9803-33bcf777c8dd
|
486
|
+
X-Runtime:
|
487
|
+
- '0.015913'
|
488
|
+
Server:
|
489
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
490
|
+
Date:
|
491
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
492
|
+
Connection:
|
493
|
+
- Keep-Alive
|
494
|
+
body:
|
495
|
+
encoding: UTF-8
|
496
|
+
string: ''
|
497
|
+
http_version:
|
498
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
499
|
+
- request:
|
500
|
+
method: get
|
501
|
+
uri: http://localhost:3000/api/survey_questions?survey_id=115
|
502
|
+
body:
|
503
|
+
encoding: US-ASCII
|
504
|
+
string: ''
|
505
|
+
headers:
|
506
|
+
User-Agent:
|
507
|
+
- Faraday v0.9.0
|
508
|
+
Content-Type:
|
509
|
+
- application/json
|
510
|
+
Api-Token:
|
511
|
+
- testing
|
512
|
+
User-Token:
|
513
|
+
- 4d1466ca360d95047fad629c8b49c901e5d468332bcbc2bfaed055fd6c5f3b15
|
514
|
+
Service-User-Id:
|
515
|
+
- 34e2ec554af1ebffc0752752537cc1ce1f425e666ccec19d71e561044d377e51
|
516
|
+
Accept-Encoding:
|
517
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
518
|
+
Accept:
|
519
|
+
- "*/*"
|
520
|
+
response:
|
521
|
+
status:
|
522
|
+
code: 200
|
523
|
+
message: 'OK '
|
524
|
+
headers:
|
525
|
+
X-Frame-Options:
|
526
|
+
- SAMEORIGIN
|
527
|
+
X-Xss-Protection:
|
528
|
+
- 1; mode=block
|
529
|
+
X-Content-Type-Options:
|
530
|
+
- nosniff
|
531
|
+
X-Ua-Compatible:
|
532
|
+
- chrome=1
|
533
|
+
Content-Type:
|
534
|
+
- application/json; charset=utf-8
|
535
|
+
Etag:
|
536
|
+
- '"225dd03727b23c94b8fff1a1dee5c665"'
|
537
|
+
Cache-Control:
|
538
|
+
- max-age=0, private, must-revalidate
|
539
|
+
X-Request-Id:
|
540
|
+
- a176c8e7-7367-47a3-b4cd-20bac2e98191
|
541
|
+
X-Runtime:
|
542
|
+
- '0.011210'
|
543
|
+
Server:
|
544
|
+
- WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
|
545
|
+
Date:
|
546
|
+
- Sun, 25 Jan 2015 14:21:47 GMT
|
547
|
+
Content-Length:
|
548
|
+
- '1518'
|
549
|
+
Connection:
|
550
|
+
- Keep-Alive
|
551
|
+
body:
|
552
|
+
encoding: UTF-8
|
553
|
+
string: |-
|
554
|
+
{
|
555
|
+
"survey_questions": [
|
556
|
+
{
|
557
|
+
"id": 70,
|
558
|
+
"text": "Do you like poptarts?",
|
559
|
+
"question_type": "boolean",
|
560
|
+
"responses": [
|
561
|
+
"t",
|
562
|
+
"f"
|
563
|
+
],
|
564
|
+
"answer": "t",
|
565
|
+
"_links": [
|
566
|
+
{
|
567
|
+
"rel": "self",
|
568
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/70",
|
569
|
+
"method": "GET"
|
570
|
+
},
|
571
|
+
{
|
572
|
+
"rel": "self",
|
573
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/70",
|
574
|
+
"method": "PUT"
|
575
|
+
},
|
576
|
+
{
|
577
|
+
"rel": "survey",
|
578
|
+
"href": "http://localhost:3000/api/surveys/115",
|
579
|
+
"method": "GET"
|
580
|
+
}
|
581
|
+
],
|
582
|
+
"created_at": "2015-01-25T14:21:47.669Z",
|
583
|
+
"key": "testingooptarts",
|
584
|
+
"question_id": 105
|
585
|
+
},
|
586
|
+
{
|
587
|
+
"id": 71,
|
588
|
+
"text": "Do you like poptarts?",
|
589
|
+
"question_type": "boolean",
|
590
|
+
"responses": [
|
591
|
+
"t",
|
592
|
+
"f"
|
593
|
+
],
|
594
|
+
"answer": "f",
|
595
|
+
"_links": [
|
596
|
+
{
|
597
|
+
"rel": "self",
|
598
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/71",
|
599
|
+
"method": "GET"
|
600
|
+
},
|
601
|
+
{
|
602
|
+
"rel": "self",
|
603
|
+
"href": "http://localhost:3000/api/surveys/115/survey_questions/71",
|
604
|
+
"method": "PUT"
|
605
|
+
},
|
606
|
+
{
|
607
|
+
"rel": "survey",
|
608
|
+
"href": "http://localhost:3000/api/surveys/115",
|
609
|
+
"method": "GET"
|
610
|
+
}
|
611
|
+
],
|
612
|
+
"created_at": "2015-01-25T14:21:47.696Z",
|
613
|
+
"key": "testingooptarts",
|
614
|
+
"question_id": 105
|
615
|
+
}
|
616
|
+
]
|
617
|
+
}
|
618
|
+
http_version:
|
619
|
+
recorded_at: Sun, 25 Jan 2015 14:21:47 GMT
|
620
|
+
recorded_with: VCR 2.9.3
|