poptart 0.0.3 → 0.0.4
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/lib/version.rb +1 -1
- data/spec/requests/answering_survey_questions_spec.rb +2 -2
- data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +3674 -719
- data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +106 -77
- data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +34 -35
- data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +104 -78
- data/spec/vcr/poptart/root/returns_survey_links.yml +5 -5
- data/spec/vcr/user/management_creates_a_user.yml +20 -20
- data/spec/vcr/user/management_returns_a_user.yml +40 -40
- metadata +2 -14
- data/spec/vcr/poptart/user/answers_a_survey_question.yml +0 -1580
- data/spec/vcr/poptart/user/creates_a_user.yml +0 -135
- data/spec/vcr/poptart/user/creates_and_returns_a_random_question_survey.yml +0 -341
- data/spec/vcr/poptart/user/creates_and_returns_an_empty_survey.yml +0 -272
- data/spec/vcr/poptart/user/finds_survey_question_for_id.yml +0 -327
- data/spec/vcr/poptart/user/returns_a_user.yml +0 -267
@@ -37,13 +37,13 @@ http_interactions:
|
|
37
37
|
Cache-Control:
|
38
38
|
- max-age=0, private, must-revalidate
|
39
39
|
X-Request-Id:
|
40
|
-
-
|
40
|
+
- 2a54c48c-4507-4fab-adaf-d4874860c46e
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
42
|
+
- '0.004414'
|
43
43
|
Server:
|
44
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
44
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
45
45
|
Date:
|
46
|
-
-
|
46
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
47
47
|
Content-Length:
|
48
48
|
- '305'
|
49
49
|
Connection:
|
@@ -68,7 +68,7 @@ http_interactions:
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
http_version:
|
71
|
-
recorded_at:
|
71
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
72
72
|
- request:
|
73
73
|
method: post
|
74
74
|
uri: http://localhost:3000/api/users
|
@@ -102,42 +102,41 @@ http_interactions:
|
|
102
102
|
Content-Type:
|
103
103
|
- application/json; charset=utf-8
|
104
104
|
Etag:
|
105
|
-
- '"
|
105
|
+
- '"edaca038ca02a2bd69b26328f8d48a5f"'
|
106
106
|
Cache-Control:
|
107
107
|
- max-age=0, private, must-revalidate
|
108
108
|
X-Request-Id:
|
109
|
-
-
|
109
|
+
- ede0ac8a-a812-43fc-8106-604b7eaf242b
|
110
110
|
X-Runtime:
|
111
|
-
- '0.
|
111
|
+
- '0.008192'
|
112
112
|
Server:
|
113
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
113
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
114
114
|
Date:
|
115
|
-
-
|
115
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
116
116
|
Content-Length:
|
117
|
-
- '
|
117
|
+
- '132'
|
118
118
|
Connection:
|
119
119
|
- Keep-Alive
|
120
120
|
body:
|
121
121
|
encoding: UTF-8
|
122
122
|
string: |-
|
123
123
|
{
|
124
|
-
"id":
|
124
|
+
"id": 322,
|
125
125
|
"external_user_id": 42,
|
126
|
-
"token": "38d7d61cc18a56e2c3319db6aa17d8695215db9a8b37a160b3458ba3f2bdd28b8bd25abfea8c133941623bc358e0e2ee42313d598e07a97ac889449279d7b61d",
|
127
126
|
"_links": {
|
128
127
|
"self": {
|
129
|
-
"href": "http://localhost:3000/api/users/
|
128
|
+
"href": "http://localhost:3000/api/users/322"
|
130
129
|
}
|
131
130
|
}
|
132
131
|
}
|
133
132
|
http_version:
|
134
|
-
recorded_at:
|
133
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
135
134
|
- request:
|
136
135
|
method: post
|
137
136
|
uri: http://localhost:3000/api/surveys?random=true
|
138
137
|
body:
|
139
138
|
encoding: UTF-8
|
140
|
-
string: '{"survey":{"user_id":
|
139
|
+
string: '{"survey":{"user_id":322}}'
|
141
140
|
headers:
|
142
141
|
User-Agent:
|
143
142
|
- Faraday v0.9.0
|
@@ -165,166 +164,196 @@ http_interactions:
|
|
165
164
|
Content-Type:
|
166
165
|
- application/json; charset=utf-8
|
167
166
|
Etag:
|
168
|
-
- '"
|
167
|
+
- '"de4330dd1669c690eeba5f385ad436e4"'
|
169
168
|
Cache-Control:
|
170
169
|
- max-age=0, private, must-revalidate
|
171
170
|
X-Request-Id:
|
172
|
-
-
|
171
|
+
- 9fb162ff-46ad-40f5-9cd9-d21a1091e501
|
173
172
|
X-Runtime:
|
174
|
-
- '0.
|
173
|
+
- '0.051812'
|
175
174
|
Server:
|
176
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
175
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
177
176
|
Date:
|
178
|
-
-
|
177
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
179
178
|
Content-Length:
|
180
|
-
- '
|
179
|
+
- '4506'
|
181
180
|
Connection:
|
182
181
|
- Keep-Alive
|
183
182
|
body:
|
184
183
|
encoding: UTF-8
|
185
184
|
string: |-
|
186
185
|
{
|
187
|
-
"id":
|
188
|
-
"user_id":
|
186
|
+
"id": 272,
|
187
|
+
"user_id": 322,
|
188
|
+
"_links": {
|
189
|
+
"self": {
|
190
|
+
"href": "http://localhost:3000/api/surveys/272"
|
191
|
+
},
|
192
|
+
"submit": {
|
193
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
194
|
+
}
|
195
|
+
},
|
189
196
|
"survey_questions": [
|
190
197
|
{
|
191
|
-
"id":
|
192
|
-
"text": "How
|
198
|
+
"id": 988,
|
199
|
+
"text": "How do you feel right now?",
|
193
200
|
"type": "range",
|
194
201
|
"responses": [
|
195
202
|
"0",
|
196
203
|
"10"
|
197
204
|
],
|
205
|
+
"answer": null,
|
198
206
|
"freeform": false,
|
199
207
|
"_links": {
|
200
208
|
"self": {
|
201
|
-
"href": "http://localhost:3000/api/surveys/
|
209
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/988"
|
202
210
|
},
|
203
211
|
"survey": {
|
204
|
-
"href": "http://localhost:3000/api/surveys/
|
212
|
+
"href": "http://localhost:3000/api/surveys/272"
|
205
213
|
},
|
206
214
|
"create": {
|
207
|
-
"href": "http://localhost:3000/api/surveys/
|
215
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
208
216
|
},
|
209
217
|
"submit": {
|
210
|
-
"href": "http://localhost:3000/api/surveys/
|
218
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/988"
|
211
219
|
}
|
212
220
|
}
|
213
221
|
},
|
214
222
|
{
|
215
|
-
"id":
|
216
|
-
"text": "To what extent
|
223
|
+
"id": 989,
|
224
|
+
"text": "To what extent do you feel accepted by the person/people you are interacting with?",
|
217
225
|
"type": "range",
|
218
226
|
"responses": [
|
219
227
|
"0",
|
220
228
|
"10"
|
221
229
|
],
|
230
|
+
"answer": null,
|
222
231
|
"freeform": false,
|
223
232
|
"_links": {
|
224
233
|
"self": {
|
225
|
-
"href": "http://localhost:3000/api/surveys/
|
234
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/989"
|
226
235
|
},
|
227
236
|
"survey": {
|
228
|
-
"href": "http://localhost:3000/api/surveys/
|
237
|
+
"href": "http://localhost:3000/api/surveys/272"
|
229
238
|
},
|
230
239
|
"create": {
|
231
|
-
"href": "http://localhost:3000/api/surveys/
|
240
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
232
241
|
},
|
233
242
|
"submit": {
|
234
|
-
"href": "http://localhost:3000/api/surveys/
|
243
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/989"
|
235
244
|
}
|
236
245
|
}
|
237
246
|
},
|
238
247
|
{
|
239
|
-
"id":
|
240
|
-
"text": "
|
241
|
-
"type": "
|
248
|
+
"id": 990,
|
249
|
+
"text": "How hungry or full are you right now?",
|
250
|
+
"type": "multiple",
|
242
251
|
"responses": [
|
243
|
-
"
|
244
|
-
"
|
252
|
+
"Very hungry",
|
253
|
+
"Somewhat hungry",
|
254
|
+
"Neither full nor hungry",
|
255
|
+
"Somewhat full",
|
256
|
+
"Very full"
|
245
257
|
],
|
258
|
+
"answer": null,
|
246
259
|
"freeform": false,
|
247
260
|
"_links": {
|
248
261
|
"self": {
|
249
|
-
"href": "http://localhost:3000/api/surveys/
|
262
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/990"
|
250
263
|
},
|
251
264
|
"survey": {
|
252
|
-
"href": "http://localhost:3000/api/surveys/
|
265
|
+
"href": "http://localhost:3000/api/surveys/272"
|
253
266
|
},
|
254
267
|
"create": {
|
255
|
-
"href": "http://localhost:3000/api/surveys/
|
268
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
256
269
|
},
|
257
270
|
"submit": {
|
258
|
-
"href": "http://localhost:3000/api/surveys/
|
271
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/990"
|
259
272
|
}
|
260
273
|
}
|
261
274
|
},
|
262
275
|
{
|
263
|
-
"id":
|
264
|
-
"text": "
|
265
|
-
"type": "
|
276
|
+
"id": 991,
|
277
|
+
"text": "How do you feel right now?",
|
278
|
+
"type": "range",
|
266
279
|
"responses": [
|
267
|
-
"0
|
268
|
-
"
|
269
|
-
"1-2 hours",
|
270
|
-
"2-3 hours",
|
271
|
-
"3-4 hours",
|
272
|
-
"4-5 hours",
|
273
|
-
"5-6 hours"
|
280
|
+
"0",
|
281
|
+
"10"
|
274
282
|
],
|
283
|
+
"answer": null,
|
275
284
|
"freeform": false,
|
276
285
|
"_links": {
|
277
286
|
"self": {
|
278
|
-
"href": "http://localhost:3000/api/surveys/
|
287
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/991"
|
279
288
|
},
|
280
289
|
"survey": {
|
281
|
-
"href": "http://localhost:3000/api/surveys/
|
290
|
+
"href": "http://localhost:3000/api/surveys/272"
|
282
291
|
},
|
283
292
|
"create": {
|
284
|
-
"href": "http://localhost:3000/api/surveys/
|
293
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
285
294
|
},
|
286
295
|
"submit": {
|
287
|
-
"href": "http://localhost:3000/api/surveys/
|
296
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/991"
|
288
297
|
}
|
289
298
|
}
|
290
299
|
},
|
291
300
|
{
|
292
|
-
"id":
|
293
|
-
"text": "To what extent
|
301
|
+
"id": 992,
|
302
|
+
"text": "To what extent do you feel accepted by the person/people you are interacting with?",
|
294
303
|
"type": "range",
|
295
304
|
"responses": [
|
296
305
|
"0",
|
297
306
|
"10"
|
298
307
|
],
|
308
|
+
"answer": null,
|
299
309
|
"freeform": false,
|
300
310
|
"_links": {
|
301
311
|
"self": {
|
302
|
-
"href": "http://localhost:3000/api/surveys/
|
312
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/992"
|
303
313
|
},
|
304
314
|
"survey": {
|
305
|
-
"href": "http://localhost:3000/api/surveys/
|
315
|
+
"href": "http://localhost:3000/api/surveys/272"
|
306
316
|
},
|
307
317
|
"create": {
|
308
|
-
"href": "http://localhost:3000/api/surveys/
|
318
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
309
319
|
},
|
310
320
|
"submit": {
|
311
|
-
"href": "http://localhost:3000/api/surveys/
|
321
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/992"
|
312
322
|
}
|
313
323
|
}
|
314
|
-
}
|
315
|
-
],
|
316
|
-
"_links": {
|
317
|
-
"self": {
|
318
|
-
"href": "http://localhost:3000/api/surveys/190"
|
319
324
|
},
|
320
|
-
|
321
|
-
"
|
322
|
-
|
323
|
-
|
324
|
-
"
|
325
|
+
{
|
326
|
+
"id": 993,
|
327
|
+
"text": "Beyond any work you've already done today, how many additional hours do you expect to work today?",
|
328
|
+
"type": "multiple",
|
329
|
+
"responses": [
|
330
|
+
"0 (none)",
|
331
|
+
"Less than 1 hour",
|
332
|
+
"1-2 hours",
|
333
|
+
"2-3 hours",
|
334
|
+
"3-4 hours",
|
335
|
+
"4-5 hours",
|
336
|
+
"5-6 hours"
|
337
|
+
],
|
338
|
+
"answer": null,
|
339
|
+
"freeform": false,
|
340
|
+
"_links": {
|
341
|
+
"self": {
|
342
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/993"
|
343
|
+
},
|
344
|
+
"survey": {
|
345
|
+
"href": "http://localhost:3000/api/surveys/272"
|
346
|
+
},
|
347
|
+
"create": {
|
348
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions"
|
349
|
+
},
|
350
|
+
"submit": {
|
351
|
+
"href": "http://localhost:3000/api/surveys/272/survey_questions/993"
|
352
|
+
}
|
353
|
+
}
|
325
354
|
}
|
326
|
-
|
355
|
+
]
|
327
356
|
}
|
328
357
|
http_version:
|
329
|
-
recorded_at:
|
358
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
330
359
|
recorded_with: VCR 2.6.0
|
@@ -37,13 +37,13 @@ http_interactions:
|
|
37
37
|
Cache-Control:
|
38
38
|
- max-age=0, private, must-revalidate
|
39
39
|
X-Request-Id:
|
40
|
-
-
|
40
|
+
- 1b3d209b-a1d4-4622-b6be-d94004fb021b
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
42
|
+
- '0.004751'
|
43
43
|
Server:
|
44
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
44
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
45
45
|
Date:
|
46
|
-
-
|
46
|
+
- Sat, 05 Jul 2014 21:24:16 GMT
|
47
47
|
Content-Length:
|
48
48
|
- '305'
|
49
49
|
Connection:
|
@@ -68,7 +68,7 @@ http_interactions:
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
http_version:
|
71
|
-
recorded_at:
|
71
|
+
recorded_at: Sat, 05 Jul 2014 21:24:16 GMT
|
72
72
|
- request:
|
73
73
|
method: post
|
74
74
|
uri: http://localhost:3000/api/users
|
@@ -102,36 +102,35 @@ http_interactions:
|
|
102
102
|
Content-Type:
|
103
103
|
- application/json; charset=utf-8
|
104
104
|
Etag:
|
105
|
-
- '"
|
105
|
+
- '"8ca5ed292d2ffc0d35ce43526f309b8a"'
|
106
106
|
Cache-Control:
|
107
107
|
- max-age=0, private, must-revalidate
|
108
108
|
X-Request-Id:
|
109
|
-
-
|
109
|
+
- 2140b1ac-b72f-462e-a2fd-8bccc240df01
|
110
110
|
X-Runtime:
|
111
|
-
- '0.
|
111
|
+
- '0.008368'
|
112
112
|
Server:
|
113
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
113
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
114
114
|
Date:
|
115
|
-
-
|
115
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
116
116
|
Content-Length:
|
117
|
-
- '
|
117
|
+
- '132'
|
118
118
|
Connection:
|
119
119
|
- Keep-Alive
|
120
120
|
body:
|
121
121
|
encoding: UTF-8
|
122
122
|
string: |-
|
123
123
|
{
|
124
|
-
"id":
|
124
|
+
"id": 321,
|
125
125
|
"external_user_id": 42,
|
126
|
-
"token": "38d7d61cc18a56e2c3319db6aa17d8695215db9a8b37a160b3458ba3f2bdd28b8bd25abfea8c133941623bc358e0e2ee42313d598e07a97ac889449279d7b61d",
|
127
126
|
"_links": {
|
128
127
|
"self": {
|
129
|
-
"href": "http://localhost:3000/api/users/
|
128
|
+
"href": "http://localhost:3000/api/users/321"
|
130
129
|
}
|
131
130
|
}
|
132
131
|
}
|
133
132
|
http_version:
|
134
|
-
recorded_at:
|
133
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
135
134
|
- request:
|
136
135
|
method: get
|
137
136
|
uri: http://localhost:3000/
|
@@ -169,13 +168,13 @@ http_interactions:
|
|
169
168
|
Cache-Control:
|
170
169
|
- max-age=0, private, must-revalidate
|
171
170
|
X-Request-Id:
|
172
|
-
-
|
171
|
+
- 49262913-1d78-4272-b765-ecc9a4e94f55
|
173
172
|
X-Runtime:
|
174
|
-
- '0.
|
173
|
+
- '0.005116'
|
175
174
|
Server:
|
176
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
175
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
177
176
|
Date:
|
178
|
-
-
|
177
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
179
178
|
Content-Length:
|
180
179
|
- '305'
|
181
180
|
Connection:
|
@@ -200,13 +199,13 @@ http_interactions:
|
|
200
199
|
}
|
201
200
|
}
|
202
201
|
http_version:
|
203
|
-
recorded_at:
|
202
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
204
203
|
- request:
|
205
204
|
method: post
|
206
205
|
uri: http://localhost:3000/api/surveys
|
207
206
|
body:
|
208
207
|
encoding: UTF-8
|
209
|
-
string: '{"survey":{"user_id":
|
208
|
+
string: '{"survey":{"user_id":321}}'
|
210
209
|
headers:
|
211
210
|
User-Agent:
|
212
211
|
- Faraday v0.9.0
|
@@ -234,17 +233,17 @@ http_interactions:
|
|
234
233
|
Content-Type:
|
235
234
|
- application/json; charset=utf-8
|
236
235
|
Etag:
|
237
|
-
- '"
|
236
|
+
- '"7a45c755426282314067f807100b86d0"'
|
238
237
|
Cache-Control:
|
239
238
|
- max-age=0, private, must-revalidate
|
240
239
|
X-Request-Id:
|
241
|
-
-
|
240
|
+
- bd5c6423-f6a6-4b88-a8f4-615351ad1cd4
|
242
241
|
X-Runtime:
|
243
|
-
- '0.
|
242
|
+
- '0.009194'
|
244
243
|
Server:
|
245
|
-
- WEBrick/1.3.1 (Ruby/2.1.
|
244
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
246
245
|
Date:
|
247
|
-
-
|
246
|
+
- Sat, 05 Jul 2014 21:24:17 GMT
|
248
247
|
Content-Length:
|
249
248
|
- '250'
|
250
249
|
Connection:
|
@@ -253,20 +252,20 @@ http_interactions:
|
|
253
252
|
encoding: UTF-8
|
254
253
|
string: |-
|
255
254
|
{
|
256
|
-
"id":
|
257
|
-
"user_id":
|
258
|
-
"survey_questions": [
|
259
|
-
|
260
|
-
],
|
255
|
+
"id": 271,
|
256
|
+
"user_id": 321,
|
261
257
|
"_links": {
|
262
258
|
"self": {
|
263
|
-
"href": "http://localhost:3000/api/surveys/
|
259
|
+
"href": "http://localhost:3000/api/surveys/271"
|
264
260
|
},
|
265
261
|
"submit": {
|
266
|
-
"href": "http://localhost:3000/api/surveys/
|
262
|
+
"href": "http://localhost:3000/api/surveys/271/survey_questions"
|
267
263
|
}
|
268
|
-
}
|
264
|
+
},
|
265
|
+
"survey_questions": [
|
266
|
+
|
267
|
+
]
|
269
268
|
}
|
270
269
|
http_version:
|
271
|
-
recorded_at:
|
270
|
+
recorded_at: Sat, 05 Jul 2014 21:24:17 GMT
|
272
271
|
recorded_with: VCR 2.6.0
|