poptart 0.0.5 → 0.0.6
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 +4 -3
- data/lib/poptart/model.rb +49 -1
- data/lib/poptart/question.rb +1 -2
- data/lib/poptart/request.rb +1 -1
- data/lib/poptart/root.rb +0 -5
- data/lib/poptart/survey.rb +5 -6
- data/lib/poptart/survey_question.rb +2 -1
- data/lib/poptart/user.rb +16 -12
- data/lib/poptart.rb +2 -1
- data/lib/version.rb +1 -1
- data/poptart.gemspec +1 -0
- data/spec/requests/answering_survey_questions_spec.rb +32 -9
- data/spec/requests/root_spec.rb +6 -3
- data/spec/requests/user_management_spec.rb +8 -8
- data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +5444 -274
- data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +10066 -450
- data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +883 -69
- data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +665 -56
- data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1072 -74
- data/spec/vcr/answering/survey_questions_returns_all_answered_survey_questions_for_a_question.yml +5009 -0
- data/spec/vcr/poptart/root/builds_top_level_uri.yml +72 -0
- data/spec/vcr/poptart/root/builds_urls.yml +72 -0
- data/spec/vcr/user/management_creates_a_user.yml +63 -0
- data/spec/vcr/user/management_returns_a_user.yml +201 -14
- metadata +22 -2
@@ -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
|
+
- c5a25952-0d62-4615-bc58-ca916bc21d27
|
41
41
|
X-Runtime:
|
42
|
-
- '0.
|
42
|
+
- '0.004535'
|
43
43
|
Server:
|
44
44
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
45
45
|
Date:
|
46
|
-
-
|
46
|
+
- Tue, 09 Sep 2014 23:20:54 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: Tue, 09 Sep 2014 23:20:54 GMT
|
72
72
|
- request:
|
73
73
|
method: post
|
74
74
|
uri: http://localhost:3000/api/users
|
@@ -102,41 +102,41 @@ http_interactions:
|
|
102
102
|
Content-Type:
|
103
103
|
- application/json; charset=utf-8
|
104
104
|
Etag:
|
105
|
-
- '"
|
105
|
+
- '"1984ca647e67bee3954a60eb3713a70e"'
|
106
106
|
Cache-Control:
|
107
107
|
- max-age=0, private, must-revalidate
|
108
108
|
X-Request-Id:
|
109
|
-
-
|
109
|
+
- da1652ba-34df-49c4-bdcd-b4dd8d6c80db
|
110
110
|
X-Runtime:
|
111
|
-
- '0.
|
111
|
+
- '0.006685'
|
112
112
|
Server:
|
113
113
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
114
114
|
Date:
|
115
|
-
-
|
115
|
+
- Tue, 09 Sep 2014 23:20:54 GMT
|
116
116
|
Content-Length:
|
117
|
-
- '
|
117
|
+
- '130'
|
118
118
|
Connection:
|
119
119
|
- Keep-Alive
|
120
120
|
body:
|
121
121
|
encoding: UTF-8
|
122
122
|
string: |-
|
123
123
|
{
|
124
|
-
"id":
|
124
|
+
"id": 55,
|
125
125
|
"external_user_id": 42,
|
126
126
|
"_links": {
|
127
127
|
"self": {
|
128
|
-
"href": "http://localhost:3000/api/users/
|
128
|
+
"href": "http://localhost:3000/api/users/55"
|
129
129
|
}
|
130
130
|
}
|
131
131
|
}
|
132
132
|
http_version:
|
133
|
-
recorded_at:
|
133
|
+
recorded_at: Tue, 09 Sep 2014 23:20:54 GMT
|
134
134
|
- request:
|
135
135
|
method: post
|
136
136
|
uri: http://localhost:3000/api/surveys?random=true
|
137
137
|
body:
|
138
138
|
encoding: UTF-8
|
139
|
-
string: '{"survey":{"user_id":
|
139
|
+
string: '{"survey":{"user_id":55}}'
|
140
140
|
headers:
|
141
141
|
User-Agent:
|
142
142
|
- Faraday v0.9.0
|
@@ -164,38 +164,38 @@ http_interactions:
|
|
164
164
|
Content-Type:
|
165
165
|
- application/json; charset=utf-8
|
166
166
|
Etag:
|
167
|
-
- '"
|
167
|
+
- '"1c41ed0fcd5af60ec158ee9028502ae8"'
|
168
168
|
Cache-Control:
|
169
169
|
- max-age=0, private, must-revalidate
|
170
170
|
X-Request-Id:
|
171
|
-
-
|
171
|
+
- 0c15d971-0db0-4f01-896c-0c37a6b62acc
|
172
172
|
X-Runtime:
|
173
|
-
- '0.
|
173
|
+
- '0.035550'
|
174
174
|
Server:
|
175
175
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
176
176
|
Date:
|
177
|
-
-
|
177
|
+
- Tue, 09 Sep 2014 23:20:54 GMT
|
178
178
|
Content-Length:
|
179
|
-
- '
|
179
|
+
- '4118'
|
180
180
|
Connection:
|
181
181
|
- Keep-Alive
|
182
182
|
body:
|
183
183
|
encoding: UTF-8
|
184
184
|
string: |-
|
185
185
|
{
|
186
|
-
"id":
|
187
|
-
"user_id":
|
186
|
+
"id": 46,
|
187
|
+
"user_id": 55,
|
188
188
|
"_links": {
|
189
189
|
"self": {
|
190
|
-
"href": "http://localhost:3000/api/surveys/
|
190
|
+
"href": "http://localhost:3000/api/surveys/46"
|
191
191
|
},
|
192
192
|
"submit": {
|
193
|
-
"href": "http://localhost:3000/api/surveys/
|
193
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
194
194
|
}
|
195
195
|
},
|
196
196
|
"survey_questions": [
|
197
197
|
{
|
198
|
-
"id":
|
198
|
+
"id": 126,
|
199
199
|
"text": "How do you feel right now?",
|
200
200
|
"type": "range",
|
201
201
|
"responses": [
|
@@ -206,47 +206,76 @@ http_interactions:
|
|
206
206
|
"freeform": false,
|
207
207
|
"_links": {
|
208
208
|
"self": {
|
209
|
-
"href": "http://localhost:3000/api/surveys/
|
209
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/126"
|
210
210
|
},
|
211
211
|
"survey": {
|
212
|
-
"href": "http://localhost:3000/api/surveys/
|
212
|
+
"href": "http://localhost:3000/api/surveys/46"
|
213
213
|
},
|
214
214
|
"create": {
|
215
|
-
"href": "http://localhost:3000/api/surveys/
|
215
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
216
216
|
},
|
217
217
|
"submit": {
|
218
|
-
"href": "http://localhost:3000/api/surveys/
|
218
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/126"
|
219
219
|
}
|
220
220
|
}
|
221
221
|
},
|
222
222
|
{
|
223
|
-
"id":
|
224
|
-
"text": "
|
225
|
-
"type": "
|
223
|
+
"id": 127,
|
224
|
+
"text": "Where are you?",
|
225
|
+
"type": "multiple",
|
226
226
|
"responses": [
|
227
|
-
"
|
228
|
-
"
|
227
|
+
"At Home",
|
228
|
+
"At Work",
|
229
|
+
"In a car",
|
230
|
+
"Other"
|
231
|
+
],
|
232
|
+
"answer": null,
|
233
|
+
"freeform": true,
|
234
|
+
"_links": {
|
235
|
+
"self": {
|
236
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/127"
|
237
|
+
},
|
238
|
+
"survey": {
|
239
|
+
"href": "http://localhost:3000/api/surveys/46"
|
240
|
+
},
|
241
|
+
"create": {
|
242
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
243
|
+
},
|
244
|
+
"submit": {
|
245
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/127"
|
246
|
+
}
|
247
|
+
}
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"id": 128,
|
251
|
+
"text": "Are you judging or evaluating what you are doing right now (i.e. at the moment just before you were notified?)",
|
252
|
+
"type": "multiple",
|
253
|
+
"responses": [
|
254
|
+
"f",
|
255
|
+
"Yes - Negatively",
|
256
|
+
"Yes - Neutrally",
|
257
|
+
"Yes - Positively"
|
229
258
|
],
|
230
259
|
"answer": null,
|
231
260
|
"freeform": false,
|
232
261
|
"_links": {
|
233
262
|
"self": {
|
234
|
-
"href": "http://localhost:3000/api/surveys/
|
263
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/128"
|
235
264
|
},
|
236
265
|
"survey": {
|
237
|
-
"href": "http://localhost:3000/api/surveys/
|
266
|
+
"href": "http://localhost:3000/api/surveys/46"
|
238
267
|
},
|
239
268
|
"create": {
|
240
|
-
"href": "http://localhost:3000/api/surveys/
|
269
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
241
270
|
},
|
242
271
|
"submit": {
|
243
|
-
"href": "http://localhost:3000/api/surveys/
|
272
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/128"
|
244
273
|
}
|
245
274
|
}
|
246
275
|
},
|
247
276
|
{
|
248
|
-
"id":
|
249
|
-
"text": "
|
277
|
+
"id": 129,
|
278
|
+
"text": "Where would you place yourself on this ladder?\nThink of a ladder representing where people stand in your country.\nAt the top of the ladder are the people who are the best off - those who have the most money, the most education and the most respected jobs. At the bottom are the people who are the worst off - who have the least money, least education, and the least respected jobs or no job. The higher up you are on the ladder, the closer you are to the people at the very top; the lower you are the closer you are to people at the very bottom.",
|
250
279
|
"type": "range",
|
251
280
|
"responses": [
|
252
281
|
"0",
|
@@ -256,52 +285,891 @@ http_interactions:
|
|
256
285
|
"freeform": false,
|
257
286
|
"_links": {
|
258
287
|
"self": {
|
259
|
-
"href": "http://localhost:3000/api/surveys/
|
288
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/129"
|
260
289
|
},
|
261
290
|
"survey": {
|
262
|
-
"href": "http://localhost:3000/api/surveys/
|
291
|
+
"href": "http://localhost:3000/api/surveys/46"
|
263
292
|
},
|
264
293
|
"create": {
|
265
|
-
"href": "http://localhost:3000/api/surveys/
|
294
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
266
295
|
},
|
267
296
|
"submit": {
|
268
|
-
"href": "http://localhost:3000/api/surveys/
|
297
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/129"
|
269
298
|
}
|
270
299
|
}
|
271
300
|
},
|
272
301
|
{
|
273
|
-
"id":
|
274
|
-
"text": "
|
275
|
-
"type": "
|
302
|
+
"id": 130,
|
303
|
+
"text": "Are you alone?",
|
304
|
+
"type": "boolean",
|
276
305
|
"responses": [
|
277
|
-
"
|
278
|
-
"
|
279
|
-
"1-2 hours",
|
280
|
-
"2-3 hours",
|
281
|
-
"3-4 hours",
|
282
|
-
"4-5 hours",
|
283
|
-
"5-6 hours"
|
306
|
+
"t",
|
307
|
+
"f"
|
284
308
|
],
|
285
309
|
"answer": null,
|
286
310
|
"freeform": false,
|
287
311
|
"_links": {
|
288
312
|
"self": {
|
289
|
-
"href": "http://localhost:3000/api/surveys/
|
313
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/130"
|
290
314
|
},
|
291
315
|
"survey": {
|
292
|
-
"href": "http://localhost:3000/api/surveys/
|
316
|
+
"href": "http://localhost:3000/api/surveys/46"
|
293
317
|
},
|
294
318
|
"create": {
|
295
|
-
"href": "http://localhost:3000/api/surveys/
|
319
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions"
|
296
320
|
},
|
297
321
|
"submit": {
|
298
|
-
"href": "http://localhost:3000/api/surveys/
|
322
|
+
"href": "http://localhost:3000/api/surveys/46/survey_questions/130"
|
299
323
|
}
|
300
324
|
}
|
325
|
+
}
|
326
|
+
]
|
327
|
+
}
|
328
|
+
http_version:
|
329
|
+
recorded_at: Tue, 09 Sep 2014 23:20:54 GMT
|
330
|
+
- request:
|
331
|
+
method: post
|
332
|
+
uri: http://localhost:3000/api/http:%2F%2Flocalhost:3000%2Fapi%2F%252Fusers%2F/
|
333
|
+
body:
|
334
|
+
encoding: UTF-8
|
335
|
+
string: '{"user":{"external_user_id":42}}'
|
336
|
+
headers:
|
337
|
+
User-Agent:
|
338
|
+
- Faraday v0.9.0
|
339
|
+
Content-Type:
|
340
|
+
- application/json
|
341
|
+
Api-Token:
|
342
|
+
- testing
|
343
|
+
Accept-Encoding:
|
344
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
345
|
+
Accept:
|
346
|
+
- "*/*"
|
347
|
+
response:
|
348
|
+
status:
|
349
|
+
code: 404
|
350
|
+
message: 'Not Found '
|
351
|
+
headers:
|
352
|
+
Content-Type:
|
353
|
+
- text/html; charset=utf-8
|
354
|
+
Content-Length:
|
355
|
+
- '16625'
|
356
|
+
X-Request-Id:
|
357
|
+
- 3151d54d-7385-4619-b8c4-ecd6a4fea46b
|
358
|
+
X-Runtime:
|
359
|
+
- '0.021666'
|
360
|
+
Server:
|
361
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
362
|
+
Date:
|
363
|
+
- Sat, 13 Sep 2014 15:26:49 GMT
|
364
|
+
Connection:
|
365
|
+
- Keep-Alive
|
366
|
+
body:
|
367
|
+
encoding: UTF-8
|
368
|
+
string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
|
369
|
+
/>\n <title>Action Controller: Exception caught</title>\n <style>\n body
|
370
|
+
{\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
|
371
|
+
\ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
|
372
|
+
arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
|
373
|
+
\ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
|
374
|
+
\ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
|
375
|
+
0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
|
376
|
+
\ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
|
377
|
+
\ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
|
378
|
+
\ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
|
379
|
+
\ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
|
380
|
+
\ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
|
381
|
+
\ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
|
382
|
+
\ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
|
383
|
+
none;\n }\n\n #container {\n box-sizing: border-box;\n width:
|
384
|
+
100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
|
385
|
+
\ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
|
386
|
+
\ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
|
387
|
+
{\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
|
388
|
+
{\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
|
389
|
+
\ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
|
390
|
+
{\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
|
391
|
+
.5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
|
392
|
+
\ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
|
393
|
+
#F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
|
394
|
+
\ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
|
395
|
+
{ color: #C52F24; }\n\n #route_table {\n margin: 0 auto 0;\n border-collapse:
|
396
|
+
collapse;\n }\n\n #route_table td {\n padding: 0 30px;\n }\n\n #route_table
|
397
|
+
tr.bottom th {\n padding-bottom: 10px;\n line-height: 15px;\n }\n\n
|
398
|
+
\ #route_table .matched_paths {\n background-color: LightGoldenRodYellow;\n
|
399
|
+
\ }\n\n #route_table .matched_paths {\n border-bottom: solid 3px SlateGrey;\n
|
400
|
+
\ }\n\n #path_search {\n width: 80%;\n font-size: inherit;\n }\n\n
|
401
|
+
\ </style>\n\n <script>\n var toggle = function(id) {\n var s = document.getElementById(id).style;\n
|
402
|
+
\ s.display = s.display == 'none' ? 'block' : 'none';\n return false;\n
|
403
|
+
\ }\n var show = function(id) {\n document.getElementById(id).style.display
|
404
|
+
= 'block';\n }\n var hide = function(id) {\n document.getElementById(id).style.display
|
405
|
+
= 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
|
406
|
+
\ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
|
407
|
+
\ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
|
408
|
+
\ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>Routing Error</h1>\n</header>\n<div
|
409
|
+
id=\"container\">\n <h2>No route matches [POST] "/api/http%3A%2F%2Flocalhost%3A3000%2Fapi%2F%252Fusers%2F"</h2>\n\n
|
410
|
+
\ \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
|
411
|
+
id=\"traces\">\n <a href=\"#\" onclick=\"hide('Framework-Trace');hide('Full-Trace');show('Application-Trace');;
|
412
|
+
return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Full-Trace');show('Framework-Trace');;
|
413
|
+
return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Framework-Trace');show('Full-Trace');;
|
414
|
+
return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
|
415
|
+
block;\">\n <pre><code></code></pre>\n </div>\n <div id=\"Framework-Trace\"
|
416
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
417
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
418
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
419
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
420
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
421
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
422
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
423
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
424
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
425
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
426
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
427
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
428
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
429
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
430
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
431
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
432
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
433
|
+
`block in start_thread'</code></pre>\n </div>\n <div id=\"Full-Trace\"
|
434
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
435
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
436
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
437
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
438
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
439
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
440
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
441
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
442
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
443
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
444
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
445
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
446
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
447
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
448
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
449
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
450
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
451
|
+
`block in start_thread'</code></pre>\n </div>\n</div>\n\n\n <h2>\n
|
452
|
+
\ Routes\n </h2>\n\n <p>\n Routes match in priority from top
|
453
|
+
to bottom\n </p>\n\n \n<table id='route_table' class='route_table'>\n
|
454
|
+
\ <thead>\n <tr>\n <th>Helper</th>\n <th>HTTP Verb</th>\n <th>Path</th>\n
|
455
|
+
\ <th>Controller#Action</th>\n </tr>\n <tr class='bottom'>\n <th>\n
|
456
|
+
\ <a data-route-helper=\"_path\" href=\"#\" title=\"Returns a relative
|
457
|
+
path (without the http or domain)\">Path</a> /\n <a data-route-helper=\"_url\"
|
458
|
+
href=\"#\" title=\"Returns an absolute url (with the http and domain)\">Url</a>\n
|
459
|
+
\ </th>\n <th>\n </th>\n <th>\n <input id=\"path_search\"
|
460
|
+
name=\"path[]\" placeholder=\"Path Match\" type=\"search\" />\n </th>\n
|
461
|
+
\ <th>\n </th>\n </tr>\n </thead>\n <tbody class='matched_paths'
|
462
|
+
id='matched_paths'>\n </tbody>\n <tbody>\n <tr class='route_row' data-helper='path'>\n
|
463
|
+
\ <td data-route-name='api_question_survey_questions'>\n api_question_survey_questions<span
|
464
|
+
class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n GET\n
|
465
|
+
\ </td>\n <td data-route-path='/api/questions/:question_id/survey_questions(.:format)'
|
466
|
+
data-regexp='^\\/api\\/questions\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
467
|
+
\ /api/questions/:question_id/survey_questions(.:format)\n </td>\n <td
|
468
|
+
data-route-reqs='api/v1/survey_questions#index {:format=>"json"}'>\n
|
469
|
+
\ api/v1/survey_questions#index {:format=>"json"}\n </td>\n</tr>\n<tr
|
470
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_questions'>\n
|
471
|
+
\ api_questions<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
472
|
+
\ GET\n </td>\n <td data-route-path='/api/questions(.:format)' data-regexp='^\\/api\\/questions(?:\\.([^\\/.?]+))?$'>\n
|
473
|
+
\ /api/questions(.:format)\n </td>\n <td data-route-reqs='api/v1/questions#index
|
474
|
+
{:format=>"json"}'>\n api/v1/questions#index {:format=>"json"}\n
|
475
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_questions'>\n
|
476
|
+
\ api_survey_survey_questions<span class='helper'>_path</span>\n </td>\n
|
477
|
+
\ <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions(.:format)'
|
478
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
479
|
+
\ /api/surveys/:survey_id/survey_questions(.:format)\n </td>\n <td data-route-reqs='api/v1/survey_questions#create
|
480
|
+
{:format=>"json"}'>\n api/v1/survey_questions#create {:format=>"json"}\n
|
481
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_question'>\n
|
482
|
+
\ api_survey_survey_question<span class='helper'>_path</span>\n </td>\n
|
483
|
+
\ <td data-route-verb='GET'>\n GET\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
484
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
485
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
486
|
+
data-route-reqs='api/v1/survey_questions#show {:format=>"json"}'>\n
|
487
|
+
\ api/v1/survey_questions#show {:format=>"json"}\n </td>\n</tr>\n<tr
|
488
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
489
|
+
\ <td data-route-verb='PATCH'>\n PATCH\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
490
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
491
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
492
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
493
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
494
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
495
|
+
\ <td data-route-verb='PUT'>\n PUT\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
496
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
497
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
498
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
499
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
500
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_surveys'>\n
|
501
|
+
\ api_surveys<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
502
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys(.:format)' data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n
|
503
|
+
\ /api/surveys(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#index
|
504
|
+
{:format=>"json"}'>\n api/v1/surveys#index {:format=>"json"}\n
|
505
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name=''>\n
|
506
|
+
\ </td>\n <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys(.:format)'
|
507
|
+
data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n /api/surveys(.:format)\n
|
508
|
+
\ </td>\n <td data-route-reqs='api/v1/surveys#create {:format=>"json"}'>\n
|
509
|
+
\ api/v1/surveys#create {:format=>"json"}\n </td>\n</tr>\n<tr
|
510
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_survey'>\n
|
511
|
+
\ api_survey<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
512
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys/:id(.:format)' data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
513
|
+
\ /api/surveys/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#show
|
514
|
+
{:format=>"json"}'>\n api/v1/surveys#show {:format=>"json"}\n
|
515
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_users'>\n
|
516
|
+
\ api_users<span class='helper'>_path</span>\n </td>\n <td data-route-verb='POST'>\n
|
517
|
+
\ POST\n </td>\n <td data-route-path='/api/users(.:format)' data-regexp='^\\/api\\/users(?:\\.([^\\/.?]+))?$'>\n
|
518
|
+
\ /api/users(.:format)\n </td>\n <td data-route-reqs='api/v1/users#create
|
519
|
+
{:format=>"json"}'>\n api/v1/users#create {:format=>"json"}\n
|
520
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_user'>\n
|
521
|
+
\ api_user<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
522
|
+
\ GET\n </td>\n <td data-route-path='/api/users/:id(.:format)' data-regexp='^\\/api\\/users\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
523
|
+
\ /api/users/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/users#show
|
524
|
+
{:format=>"json"}'>\n api/v1/users#show {:format=>"json"}\n
|
525
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='root'>\n
|
526
|
+
\ root<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
527
|
+
\ GET\n </td>\n <td data-route-path='/' data-regexp='^\\/$'>\n /\n
|
528
|
+
\ </td>\n <td data-route-reqs='api/v1/root#index'>\n api/v1/root#index\n
|
529
|
+
\ </td>\n</tr>\n\n </tbody>\n</table>\n\n<script type='text/javascript'>\n
|
530
|
+
\ function each(elems, func) {\n if (!elems instanceof Array) { elems =
|
531
|
+
[elems]; }\n for (var i = 0, len = elems.length; i < len; i++) {\n func(elems[i]);\n
|
532
|
+
\ }\n }\n\n function setValOn(elems, val) {\n each(elems, function(elem)
|
533
|
+
{\n elem.innerHTML = val;\n });\n }\n\n function onClick(elems,
|
534
|
+
func) {\n each(elems, function(elem) {\n elem.onclick = func;\n });\n
|
535
|
+
\ }\n\n // Enables functionality to toggle between `_path` and `_url` helper
|
536
|
+
suffixes\n function setupRouteToggleHelperLinks() {\n var toggleLinks
|
537
|
+
= document.querySelectorAll('#route_table [data-route-helper]');\n onClick(toggleLinks,
|
538
|
+
function(){\n var helperTxt = this.getAttribute(\"data-route-helper\"),\n
|
539
|
+
\ helperElems = document.querySelectorAll('[data-route-name] span.helper');\n
|
540
|
+
\ setValOn(helperElems, helperTxt);\n });\n }\n\n // takes an array
|
541
|
+
of elements with a data-regexp attribute and\n // passes their their parent
|
542
|
+
<tr> into the callback function\n // if the regexp matchs a given path\n
|
543
|
+
\ function eachElemsForPath(elems, path, func) {\n each(elems, function(e){\n
|
544
|
+
\ var reg = e.getAttribute(\"data-regexp\");\n if (path.match(RegExp(reg)))
|
545
|
+
{\n func(e.parentNode.cloneNode(true));\n }\n })\n }\n\n //
|
546
|
+
Ensure path always starts with a slash \"/\" and remove params or fragments\n
|
547
|
+
\ function sanitizePath(path) {\n var path = path.charAt(0) == '/' ? path
|
548
|
+
: \"/\" + path;\n return path.replace(/\\#.*|\\?.*/, '');\n }\n\n //
|
549
|
+
Enables path search functionality\n function setupMatchPaths() {\n var
|
550
|
+
regexpElems = document.querySelectorAll('#route_table [data-regexp]'),\n
|
551
|
+
\ pathElem = document.querySelector('#path_search'),\n selectedSection
|
552
|
+
= document.querySelector('#matched_paths'),\n noMatchText = '<tr><th
|
553
|
+
colspan=\"4\">None</th></tr>';\n\n\n // Remove matches if no path is present\n
|
554
|
+
\ pathElem.onblur = function(e) {\n if (pathElem.value === \"\") selectedSection.innerHTML
|
555
|
+
= \"\";\n }\n\n // On key press perform a search for matching paths\n
|
556
|
+
\ pathElem.onkeyup = function(e){\n var path = sanitizePath(pathElem.value),\n
|
557
|
+
\ defaultText = '<tr><th colspan=\"4\">Paths Matching (' + path +
|
558
|
+
'):</th></tr>';\n\n // Clear out results section\n selectedSection.innerHTML=
|
559
|
+
defaultText;\n\n // Display matches if they exist\n eachElemsForPath(regexpElems,
|
560
|
+
path, function(e){\n selectedSection.appendChild(e);\n });\n\n
|
561
|
+
\ // If no match present, tell the user\n if (selectedSection.innerHTML
|
562
|
+
=== defaultText) {\n selectedSection.innerHTML = selectedSection.innerHTML
|
563
|
+
+ noMatchText;\n }\n }\n }\n\n setupMatchPaths();\n setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
|
564
|
+
http_version:
|
565
|
+
recorded_at: Sat, 13 Sep 2014 15:26:49 GMT
|
566
|
+
- request:
|
567
|
+
method: post
|
568
|
+
uri: http://localhost:3000/api/%2Fusers/
|
569
|
+
body:
|
570
|
+
encoding: UTF-8
|
571
|
+
string: '{"user":{"external_user_id":42}}'
|
572
|
+
headers:
|
573
|
+
User-Agent:
|
574
|
+
- Faraday v0.9.0
|
575
|
+
Content-Type:
|
576
|
+
- application/json
|
577
|
+
Api-Token:
|
578
|
+
- testing
|
579
|
+
Accept-Encoding:
|
580
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
581
|
+
Accept:
|
582
|
+
- "*/*"
|
583
|
+
response:
|
584
|
+
status:
|
585
|
+
code: 404
|
586
|
+
message: 'Not Found '
|
587
|
+
headers:
|
588
|
+
Content-Type:
|
589
|
+
- text/html; charset=utf-8
|
590
|
+
Content-Length:
|
591
|
+
- '16582'
|
592
|
+
X-Request-Id:
|
593
|
+
- 8c788ef5-c106-4711-b8c8-ad5d435efb57
|
594
|
+
X-Runtime:
|
595
|
+
- '0.023758'
|
596
|
+
Server:
|
597
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
598
|
+
Date:
|
599
|
+
- Sat, 13 Sep 2014 15:30:50 GMT
|
600
|
+
Connection:
|
601
|
+
- Keep-Alive
|
602
|
+
body:
|
603
|
+
encoding: UTF-8
|
604
|
+
string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
|
605
|
+
/>\n <title>Action Controller: Exception caught</title>\n <style>\n body
|
606
|
+
{\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
|
607
|
+
\ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
|
608
|
+
arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
|
609
|
+
\ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
|
610
|
+
\ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
|
611
|
+
0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
|
612
|
+
\ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
|
613
|
+
\ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
|
614
|
+
\ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
|
615
|
+
\ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
|
616
|
+
\ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
|
617
|
+
\ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
|
618
|
+
\ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
|
619
|
+
none;\n }\n\n #container {\n box-sizing: border-box;\n width:
|
620
|
+
100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
|
621
|
+
\ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
|
622
|
+
\ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
|
623
|
+
{\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
|
624
|
+
{\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
|
625
|
+
\ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
|
626
|
+
{\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
|
627
|
+
.5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
|
628
|
+
\ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
|
629
|
+
#F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
|
630
|
+
\ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
|
631
|
+
{ color: #C52F24; }\n\n #route_table {\n margin: 0 auto 0;\n border-collapse:
|
632
|
+
collapse;\n }\n\n #route_table td {\n padding: 0 30px;\n }\n\n #route_table
|
633
|
+
tr.bottom th {\n padding-bottom: 10px;\n line-height: 15px;\n }\n\n
|
634
|
+
\ #route_table .matched_paths {\n background-color: LightGoldenRodYellow;\n
|
635
|
+
\ }\n\n #route_table .matched_paths {\n border-bottom: solid 3px SlateGrey;\n
|
636
|
+
\ }\n\n #path_search {\n width: 80%;\n font-size: inherit;\n }\n\n
|
637
|
+
\ </style>\n\n <script>\n var toggle = function(id) {\n var s = document.getElementById(id).style;\n
|
638
|
+
\ s.display = s.display == 'none' ? 'block' : 'none';\n return false;\n
|
639
|
+
\ }\n var show = function(id) {\n document.getElementById(id).style.display
|
640
|
+
= 'block';\n }\n var hide = function(id) {\n document.getElementById(id).style.display
|
641
|
+
= 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
|
642
|
+
\ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
|
643
|
+
\ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
|
644
|
+
\ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>Routing Error</h1>\n</header>\n<div
|
645
|
+
id=\"container\">\n <h2>No route matches [POST] "/api/%2Fusers"</h2>\n\n
|
646
|
+
\ \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
|
647
|
+
id=\"traces\">\n <a href=\"#\" onclick=\"hide('Framework-Trace');hide('Full-Trace');show('Application-Trace');;
|
648
|
+
return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Full-Trace');show('Framework-Trace');;
|
649
|
+
return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Framework-Trace');show('Full-Trace');;
|
650
|
+
return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
|
651
|
+
block;\">\n <pre><code></code></pre>\n </div>\n <div id=\"Framework-Trace\"
|
652
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
653
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
654
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
655
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
656
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
657
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
658
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
659
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
660
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
661
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
662
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
663
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
664
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
665
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
666
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
667
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
668
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
669
|
+
`block in start_thread'</code></pre>\n </div>\n <div id=\"Full-Trace\"
|
670
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
671
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
672
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
673
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
674
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
675
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
676
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
677
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
678
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
679
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
680
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
681
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
682
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
683
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
684
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
685
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
686
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
687
|
+
`block in start_thread'</code></pre>\n </div>\n</div>\n\n\n <h2>\n
|
688
|
+
\ Routes\n </h2>\n\n <p>\n Routes match in priority from top
|
689
|
+
to bottom\n </p>\n\n \n<table id='route_table' class='route_table'>\n
|
690
|
+
\ <thead>\n <tr>\n <th>Helper</th>\n <th>HTTP Verb</th>\n <th>Path</th>\n
|
691
|
+
\ <th>Controller#Action</th>\n </tr>\n <tr class='bottom'>\n <th>\n
|
692
|
+
\ <a data-route-helper=\"_path\" href=\"#\" title=\"Returns a relative
|
693
|
+
path (without the http or domain)\">Path</a> /\n <a data-route-helper=\"_url\"
|
694
|
+
href=\"#\" title=\"Returns an absolute url (with the http and domain)\">Url</a>\n
|
695
|
+
\ </th>\n <th>\n </th>\n <th>\n <input id=\"path_search\"
|
696
|
+
name=\"path[]\" placeholder=\"Path Match\" type=\"search\" />\n </th>\n
|
697
|
+
\ <th>\n </th>\n </tr>\n </thead>\n <tbody class='matched_paths'
|
698
|
+
id='matched_paths'>\n </tbody>\n <tbody>\n <tr class='route_row' data-helper='path'>\n
|
699
|
+
\ <td data-route-name='api_question_survey_questions'>\n api_question_survey_questions<span
|
700
|
+
class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n GET\n
|
701
|
+
\ </td>\n <td data-route-path='/api/questions/:question_id/survey_questions(.:format)'
|
702
|
+
data-regexp='^\\/api\\/questions\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
703
|
+
\ /api/questions/:question_id/survey_questions(.:format)\n </td>\n <td
|
704
|
+
data-route-reqs='api/v1/survey_questions#index {:format=>"json"}'>\n
|
705
|
+
\ api/v1/survey_questions#index {:format=>"json"}\n </td>\n</tr>\n<tr
|
706
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_questions'>\n
|
707
|
+
\ api_questions<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
708
|
+
\ GET\n </td>\n <td data-route-path='/api/questions(.:format)' data-regexp='^\\/api\\/questions(?:\\.([^\\/.?]+))?$'>\n
|
709
|
+
\ /api/questions(.:format)\n </td>\n <td data-route-reqs='api/v1/questions#index
|
710
|
+
{:format=>"json"}'>\n api/v1/questions#index {:format=>"json"}\n
|
711
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_questions'>\n
|
712
|
+
\ api_survey_survey_questions<span class='helper'>_path</span>\n </td>\n
|
713
|
+
\ <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions(.:format)'
|
714
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
715
|
+
\ /api/surveys/:survey_id/survey_questions(.:format)\n </td>\n <td data-route-reqs='api/v1/survey_questions#create
|
716
|
+
{:format=>"json"}'>\n api/v1/survey_questions#create {:format=>"json"}\n
|
717
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_question'>\n
|
718
|
+
\ api_survey_survey_question<span class='helper'>_path</span>\n </td>\n
|
719
|
+
\ <td data-route-verb='GET'>\n GET\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
720
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
721
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
722
|
+
data-route-reqs='api/v1/survey_questions#show {:format=>"json"}'>\n
|
723
|
+
\ api/v1/survey_questions#show {:format=>"json"}\n </td>\n</tr>\n<tr
|
724
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
725
|
+
\ <td data-route-verb='PATCH'>\n PATCH\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
726
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
727
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
728
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
729
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
730
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
731
|
+
\ <td data-route-verb='PUT'>\n PUT\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
732
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
733
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
734
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
735
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
736
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_surveys'>\n
|
737
|
+
\ api_surveys<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
738
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys(.:format)' data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n
|
739
|
+
\ /api/surveys(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#index
|
740
|
+
{:format=>"json"}'>\n api/v1/surveys#index {:format=>"json"}\n
|
741
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name=''>\n
|
742
|
+
\ </td>\n <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys(.:format)'
|
743
|
+
data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n /api/surveys(.:format)\n
|
744
|
+
\ </td>\n <td data-route-reqs='api/v1/surveys#create {:format=>"json"}'>\n
|
745
|
+
\ api/v1/surveys#create {:format=>"json"}\n </td>\n</tr>\n<tr
|
746
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_survey'>\n
|
747
|
+
\ api_survey<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
748
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys/:id(.:format)' data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
749
|
+
\ /api/surveys/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#show
|
750
|
+
{:format=>"json"}'>\n api/v1/surveys#show {:format=>"json"}\n
|
751
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_users'>\n
|
752
|
+
\ api_users<span class='helper'>_path</span>\n </td>\n <td data-route-verb='POST'>\n
|
753
|
+
\ POST\n </td>\n <td data-route-path='/api/users(.:format)' data-regexp='^\\/api\\/users(?:\\.([^\\/.?]+))?$'>\n
|
754
|
+
\ /api/users(.:format)\n </td>\n <td data-route-reqs='api/v1/users#create
|
755
|
+
{:format=>"json"}'>\n api/v1/users#create {:format=>"json"}\n
|
756
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_user'>\n
|
757
|
+
\ api_user<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
758
|
+
\ GET\n </td>\n <td data-route-path='/api/users/:id(.:format)' data-regexp='^\\/api\\/users\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
759
|
+
\ /api/users/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/users#show
|
760
|
+
{:format=>"json"}'>\n api/v1/users#show {:format=>"json"}\n
|
761
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='root'>\n
|
762
|
+
\ root<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
763
|
+
\ GET\n </td>\n <td data-route-path='/' data-regexp='^\\/$'>\n /\n
|
764
|
+
\ </td>\n <td data-route-reqs='api/v1/root#index'>\n api/v1/root#index\n
|
765
|
+
\ </td>\n</tr>\n\n </tbody>\n</table>\n\n<script type='text/javascript'>\n
|
766
|
+
\ function each(elems, func) {\n if (!elems instanceof Array) { elems =
|
767
|
+
[elems]; }\n for (var i = 0, len = elems.length; i < len; i++) {\n func(elems[i]);\n
|
768
|
+
\ }\n }\n\n function setValOn(elems, val) {\n each(elems, function(elem)
|
769
|
+
{\n elem.innerHTML = val;\n });\n }\n\n function onClick(elems,
|
770
|
+
func) {\n each(elems, function(elem) {\n elem.onclick = func;\n });\n
|
771
|
+
\ }\n\n // Enables functionality to toggle between `_path` and `_url` helper
|
772
|
+
suffixes\n function setupRouteToggleHelperLinks() {\n var toggleLinks
|
773
|
+
= document.querySelectorAll('#route_table [data-route-helper]');\n onClick(toggleLinks,
|
774
|
+
function(){\n var helperTxt = this.getAttribute(\"data-route-helper\"),\n
|
775
|
+
\ helperElems = document.querySelectorAll('[data-route-name] span.helper');\n
|
776
|
+
\ setValOn(helperElems, helperTxt);\n });\n }\n\n // takes an array
|
777
|
+
of elements with a data-regexp attribute and\n // passes their their parent
|
778
|
+
<tr> into the callback function\n // if the regexp matchs a given path\n
|
779
|
+
\ function eachElemsForPath(elems, path, func) {\n each(elems, function(e){\n
|
780
|
+
\ var reg = e.getAttribute(\"data-regexp\");\n if (path.match(RegExp(reg)))
|
781
|
+
{\n func(e.parentNode.cloneNode(true));\n }\n })\n }\n\n //
|
782
|
+
Ensure path always starts with a slash \"/\" and remove params or fragments\n
|
783
|
+
\ function sanitizePath(path) {\n var path = path.charAt(0) == '/' ? path
|
784
|
+
: \"/\" + path;\n return path.replace(/\\#.*|\\?.*/, '');\n }\n\n //
|
785
|
+
Enables path search functionality\n function setupMatchPaths() {\n var
|
786
|
+
regexpElems = document.querySelectorAll('#route_table [data-regexp]'),\n
|
787
|
+
\ pathElem = document.querySelector('#path_search'),\n selectedSection
|
788
|
+
= document.querySelector('#matched_paths'),\n noMatchText = '<tr><th
|
789
|
+
colspan=\"4\">None</th></tr>';\n\n\n // Remove matches if no path is present\n
|
790
|
+
\ pathElem.onblur = function(e) {\n if (pathElem.value === \"\") selectedSection.innerHTML
|
791
|
+
= \"\";\n }\n\n // On key press perform a search for matching paths\n
|
792
|
+
\ pathElem.onkeyup = function(e){\n var path = sanitizePath(pathElem.value),\n
|
793
|
+
\ defaultText = '<tr><th colspan=\"4\">Paths Matching (' + path +
|
794
|
+
'):</th></tr>';\n\n // Clear out results section\n selectedSection.innerHTML=
|
795
|
+
defaultText;\n\n // Display matches if they exist\n eachElemsForPath(regexpElems,
|
796
|
+
path, function(e){\n selectedSection.appendChild(e);\n });\n\n
|
797
|
+
\ // If no match present, tell the user\n if (selectedSection.innerHTML
|
798
|
+
=== defaultText) {\n selectedSection.innerHTML = selectedSection.innerHTML
|
799
|
+
+ noMatchText;\n }\n }\n }\n\n setupMatchPaths();\n setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
|
800
|
+
http_version:
|
801
|
+
recorded_at: Sat, 13 Sep 2014 15:30:50 GMT
|
802
|
+
- request:
|
803
|
+
method: post
|
804
|
+
uri: http://localhost:3000/users/
|
805
|
+
body:
|
806
|
+
encoding: UTF-8
|
807
|
+
string: '{"user":{"external_user_id":42}}'
|
808
|
+
headers:
|
809
|
+
User-Agent:
|
810
|
+
- Faraday v0.9.0
|
811
|
+
Content-Type:
|
812
|
+
- application/json
|
813
|
+
Api-Token:
|
814
|
+
- testing
|
815
|
+
Accept-Encoding:
|
816
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
817
|
+
Accept:
|
818
|
+
- "*/*"
|
819
|
+
response:
|
820
|
+
status:
|
821
|
+
code: 404
|
822
|
+
message: 'Not Found '
|
823
|
+
headers:
|
824
|
+
Content-Type:
|
825
|
+
- text/html; charset=utf-8
|
826
|
+
Content-Length:
|
827
|
+
- '16575'
|
828
|
+
X-Request-Id:
|
829
|
+
- 7d067eaf-614c-426d-884c-db5918bb28cd
|
830
|
+
X-Runtime:
|
831
|
+
- '0.018915'
|
832
|
+
Server:
|
833
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
834
|
+
Date:
|
835
|
+
- Sun, 14 Sep 2014 16:59:38 GMT
|
836
|
+
Connection:
|
837
|
+
- Keep-Alive
|
838
|
+
body:
|
839
|
+
encoding: UTF-8
|
840
|
+
string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
|
841
|
+
/>\n <title>Action Controller: Exception caught</title>\n <style>\n body
|
842
|
+
{\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
|
843
|
+
\ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
|
844
|
+
arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
|
845
|
+
\ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
|
846
|
+
\ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
|
847
|
+
0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
|
848
|
+
\ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
|
849
|
+
\ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
|
850
|
+
\ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
|
851
|
+
\ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
|
852
|
+
\ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
|
853
|
+
\ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
|
854
|
+
\ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
|
855
|
+
none;\n }\n\n #container {\n box-sizing: border-box;\n width:
|
856
|
+
100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
|
857
|
+
\ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
|
858
|
+
\ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
|
859
|
+
{\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
|
860
|
+
{\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
|
861
|
+
\ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
|
862
|
+
{\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
|
863
|
+
.5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
|
864
|
+
\ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
|
865
|
+
#F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
|
866
|
+
\ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
|
867
|
+
{ color: #C52F24; }\n\n #route_table {\n margin: 0 auto 0;\n border-collapse:
|
868
|
+
collapse;\n }\n\n #route_table td {\n padding: 0 30px;\n }\n\n #route_table
|
869
|
+
tr.bottom th {\n padding-bottom: 10px;\n line-height: 15px;\n }\n\n
|
870
|
+
\ #route_table .matched_paths {\n background-color: LightGoldenRodYellow;\n
|
871
|
+
\ }\n\n #route_table .matched_paths {\n border-bottom: solid 3px SlateGrey;\n
|
872
|
+
\ }\n\n #path_search {\n width: 80%;\n font-size: inherit;\n }\n\n
|
873
|
+
\ </style>\n\n <script>\n var toggle = function(id) {\n var s = document.getElementById(id).style;\n
|
874
|
+
\ s.display = s.display == 'none' ? 'block' : 'none';\n return false;\n
|
875
|
+
\ }\n var show = function(id) {\n document.getElementById(id).style.display
|
876
|
+
= 'block';\n }\n var hide = function(id) {\n document.getElementById(id).style.display
|
877
|
+
= 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
|
878
|
+
\ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
|
879
|
+
\ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
|
880
|
+
\ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>Routing Error</h1>\n</header>\n<div
|
881
|
+
id=\"container\">\n <h2>No route matches [POST] "/users"</h2>\n\n
|
882
|
+
\ \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
|
883
|
+
id=\"traces\">\n <a href=\"#\" onclick=\"hide('Framework-Trace');hide('Full-Trace');show('Application-Trace');;
|
884
|
+
return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Full-Trace');show('Framework-Trace');;
|
885
|
+
return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide('Application-Trace');hide('Framework-Trace');show('Full-Trace');;
|
886
|
+
return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
|
887
|
+
block;\">\n <pre><code></code></pre>\n </div>\n <div id=\"Framework-Trace\"
|
888
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
889
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
890
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
891
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
892
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
893
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
894
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
895
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
896
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
897
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
898
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
899
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
900
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
901
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
902
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
903
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
904
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
905
|
+
`block in start_thread'</code></pre>\n </div>\n <div id=\"Full-Trace\"
|
906
|
+
style=\"display: none;\">\n <pre><code>actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:21:in
|
907
|
+
`call'\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
|
908
|
+
`call'\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'\nrailties
|
909
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `block in call'\nactivesupport
|
910
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'\nactivesupport
|
911
|
+
(4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'\nactivesupport
|
912
|
+
(4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'\nrailties
|
913
|
+
(4.0.4) lib/rails/rack/logger.rb:20:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
|
914
|
+
`call'\nrack (1.5.2) lib/rack/runtime.rb:17:in `call'\nactivesupport
|
915
|
+
(4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'\nrack
|
916
|
+
(1.5.2) lib/rack/lock.rb:17:in `call'\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
|
917
|
+
`call'\nrailties (4.0.4) lib/rails/engine.rb:511:in `call'\nrailties
|
918
|
+
(4.0.4) lib/rails/application.rb:97:in `call'\nrack (1.5.2) lib/rack/lock.rb:17:in
|
919
|
+
`call'\nrack (1.5.2) lib/rack/content_length.rb:14:in `call'\nrack
|
920
|
+
(1.5.2) lib/rack/handler/webrick.rb:60:in `service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
|
921
|
+
`service'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
|
922
|
+
`run'\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
|
923
|
+
`block in start_thread'</code></pre>\n </div>\n</div>\n\n\n <h2>\n
|
924
|
+
\ Routes\n </h2>\n\n <p>\n Routes match in priority from top
|
925
|
+
to bottom\n </p>\n\n \n<table id='route_table' class='route_table'>\n
|
926
|
+
\ <thead>\n <tr>\n <th>Helper</th>\n <th>HTTP Verb</th>\n <th>Path</th>\n
|
927
|
+
\ <th>Controller#Action</th>\n </tr>\n <tr class='bottom'>\n <th>\n
|
928
|
+
\ <a data-route-helper=\"_path\" href=\"#\" title=\"Returns a relative
|
929
|
+
path (without the http or domain)\">Path</a> /\n <a data-route-helper=\"_url\"
|
930
|
+
href=\"#\" title=\"Returns an absolute url (with the http and domain)\">Url</a>\n
|
931
|
+
\ </th>\n <th>\n </th>\n <th>\n <input id=\"path_search\"
|
932
|
+
name=\"path[]\" placeholder=\"Path Match\" type=\"search\" />\n </th>\n
|
933
|
+
\ <th>\n </th>\n </tr>\n </thead>\n <tbody class='matched_paths'
|
934
|
+
id='matched_paths'>\n </tbody>\n <tbody>\n <tr class='route_row' data-helper='path'>\n
|
935
|
+
\ <td data-route-name='api_question_survey_questions'>\n api_question_survey_questions<span
|
936
|
+
class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n GET\n
|
937
|
+
\ </td>\n <td data-route-path='/api/questions/:question_id/survey_questions(.:format)'
|
938
|
+
data-regexp='^\\/api\\/questions\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
939
|
+
\ /api/questions/:question_id/survey_questions(.:format)\n </td>\n <td
|
940
|
+
data-route-reqs='api/v1/survey_questions#index {:format=>"json"}'>\n
|
941
|
+
\ api/v1/survey_questions#index {:format=>"json"}\n </td>\n</tr>\n<tr
|
942
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_questions'>\n
|
943
|
+
\ api_questions<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
944
|
+
\ GET\n </td>\n <td data-route-path='/api/questions(.:format)' data-regexp='^\\/api\\/questions(?:\\.([^\\/.?]+))?$'>\n
|
945
|
+
\ /api/questions(.:format)\n </td>\n <td data-route-reqs='api/v1/questions#index
|
946
|
+
{:format=>"json"}'>\n api/v1/questions#index {:format=>"json"}\n
|
947
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_questions'>\n
|
948
|
+
\ api_survey_survey_questions<span class='helper'>_path</span>\n </td>\n
|
949
|
+
\ <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions(.:format)'
|
950
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions(?:\\.([^\\/.?]+))?$'>\n
|
951
|
+
\ /api/surveys/:survey_id/survey_questions(.:format)\n </td>\n <td data-route-reqs='api/v1/survey_questions#create
|
952
|
+
{:format=>"json"}'>\n api/v1/survey_questions#create {:format=>"json"}\n
|
953
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_survey_survey_question'>\n
|
954
|
+
\ api_survey_survey_question<span class='helper'>_path</span>\n </td>\n
|
955
|
+
\ <td data-route-verb='GET'>\n GET\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
956
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
957
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
958
|
+
data-route-reqs='api/v1/survey_questions#show {:format=>"json"}'>\n
|
959
|
+
\ api/v1/survey_questions#show {:format=>"json"}\n </td>\n</tr>\n<tr
|
960
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
961
|
+
\ <td data-route-verb='PATCH'>\n PATCH\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
962
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
963
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
964
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
965
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
966
|
+
class='route_row' data-helper='path'>\n <td data-route-name=''>\n </td>\n
|
967
|
+
\ <td data-route-verb='PUT'>\n PUT\n </td>\n <td data-route-path='/api/surveys/:survey_id/survey_questions/:id(.:format)'
|
968
|
+
data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)\\/survey_questions\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
969
|
+
\ /api/surveys/:survey_id/survey_questions/:id(.:format)\n </td>\n <td
|
970
|
+
data-route-reqs='api/v1/survey_questions#update {:format=>"json"}'>\n
|
971
|
+
\ api/v1/survey_questions#update {:format=>"json"}\n </td>\n</tr>\n<tr
|
972
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_surveys'>\n
|
973
|
+
\ api_surveys<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
974
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys(.:format)' data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n
|
975
|
+
\ /api/surveys(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#index
|
976
|
+
{:format=>"json"}'>\n api/v1/surveys#index {:format=>"json"}\n
|
977
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name=''>\n
|
978
|
+
\ </td>\n <td data-route-verb='POST'>\n POST\n </td>\n <td data-route-path='/api/surveys(.:format)'
|
979
|
+
data-regexp='^\\/api\\/surveys(?:\\.([^\\/.?]+))?$'>\n /api/surveys(.:format)\n
|
980
|
+
\ </td>\n <td data-route-reqs='api/v1/surveys#create {:format=>"json"}'>\n
|
981
|
+
\ api/v1/surveys#create {:format=>"json"}\n </td>\n</tr>\n<tr
|
982
|
+
class='route_row' data-helper='path'>\n <td data-route-name='api_survey'>\n
|
983
|
+
\ api_survey<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
984
|
+
\ GET\n </td>\n <td data-route-path='/api/surveys/:id(.:format)' data-regexp='^\\/api\\/surveys\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
985
|
+
\ /api/surveys/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/surveys#show
|
986
|
+
{:format=>"json"}'>\n api/v1/surveys#show {:format=>"json"}\n
|
987
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_users'>\n
|
988
|
+
\ api_users<span class='helper'>_path</span>\n </td>\n <td data-route-verb='POST'>\n
|
989
|
+
\ POST\n </td>\n <td data-route-path='/api/users(.:format)' data-regexp='^\\/api\\/users(?:\\.([^\\/.?]+))?$'>\n
|
990
|
+
\ /api/users(.:format)\n </td>\n <td data-route-reqs='api/v1/users#create
|
991
|
+
{:format=>"json"}'>\n api/v1/users#create {:format=>"json"}\n
|
992
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='api_user'>\n
|
993
|
+
\ api_user<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
994
|
+
\ GET\n </td>\n <td data-route-path='/api/users/:id(.:format)' data-regexp='^\\/api\\/users\\/([^\\/.?]+)(?:\\.([^\\/.?]+))?$'>\n
|
995
|
+
\ /api/users/:id(.:format)\n </td>\n <td data-route-reqs='api/v1/users#show
|
996
|
+
{:format=>"json"}'>\n api/v1/users#show {:format=>"json"}\n
|
997
|
+
\ </td>\n</tr>\n<tr class='route_row' data-helper='path'>\n <td data-route-name='root'>\n
|
998
|
+
\ root<span class='helper'>_path</span>\n </td>\n <td data-route-verb='GET'>\n
|
999
|
+
\ GET\n </td>\n <td data-route-path='/' data-regexp='^\\/$'>\n /\n
|
1000
|
+
\ </td>\n <td data-route-reqs='api/v1/root#index'>\n api/v1/root#index\n
|
1001
|
+
\ </td>\n</tr>\n\n </tbody>\n</table>\n\n<script type='text/javascript'>\n
|
1002
|
+
\ function each(elems, func) {\n if (!elems instanceof Array) { elems =
|
1003
|
+
[elems]; }\n for (var i = 0, len = elems.length; i < len; i++) {\n func(elems[i]);\n
|
1004
|
+
\ }\n }\n\n function setValOn(elems, val) {\n each(elems, function(elem)
|
1005
|
+
{\n elem.innerHTML = val;\n });\n }\n\n function onClick(elems,
|
1006
|
+
func) {\n each(elems, function(elem) {\n elem.onclick = func;\n });\n
|
1007
|
+
\ }\n\n // Enables functionality to toggle between `_path` and `_url` helper
|
1008
|
+
suffixes\n function setupRouteToggleHelperLinks() {\n var toggleLinks
|
1009
|
+
= document.querySelectorAll('#route_table [data-route-helper]');\n onClick(toggleLinks,
|
1010
|
+
function(){\n var helperTxt = this.getAttribute(\"data-route-helper\"),\n
|
1011
|
+
\ helperElems = document.querySelectorAll('[data-route-name] span.helper');\n
|
1012
|
+
\ setValOn(helperElems, helperTxt);\n });\n }\n\n // takes an array
|
1013
|
+
of elements with a data-regexp attribute and\n // passes their their parent
|
1014
|
+
<tr> into the callback function\n // if the regexp matchs a given path\n
|
1015
|
+
\ function eachElemsForPath(elems, path, func) {\n each(elems, function(e){\n
|
1016
|
+
\ var reg = e.getAttribute(\"data-regexp\");\n if (path.match(RegExp(reg)))
|
1017
|
+
{\n func(e.parentNode.cloneNode(true));\n }\n })\n }\n\n //
|
1018
|
+
Ensure path always starts with a slash \"/\" and remove params or fragments\n
|
1019
|
+
\ function sanitizePath(path) {\n var path = path.charAt(0) == '/' ? path
|
1020
|
+
: \"/\" + path;\n return path.replace(/\\#.*|\\?.*/, '');\n }\n\n //
|
1021
|
+
Enables path search functionality\n function setupMatchPaths() {\n var
|
1022
|
+
regexpElems = document.querySelectorAll('#route_table [data-regexp]'),\n
|
1023
|
+
\ pathElem = document.querySelector('#path_search'),\n selectedSection
|
1024
|
+
= document.querySelector('#matched_paths'),\n noMatchText = '<tr><th
|
1025
|
+
colspan=\"4\">None</th></tr>';\n\n\n // Remove matches if no path is present\n
|
1026
|
+
\ pathElem.onblur = function(e) {\n if (pathElem.value === \"\") selectedSection.innerHTML
|
1027
|
+
= \"\";\n }\n\n // On key press perform a search for matching paths\n
|
1028
|
+
\ pathElem.onkeyup = function(e){\n var path = sanitizePath(pathElem.value),\n
|
1029
|
+
\ defaultText = '<tr><th colspan=\"4\">Paths Matching (' + path +
|
1030
|
+
'):</th></tr>';\n\n // Clear out results section\n selectedSection.innerHTML=
|
1031
|
+
defaultText;\n\n // Display matches if they exist\n eachElemsForPath(regexpElems,
|
1032
|
+
path, function(e){\n selectedSection.appendChild(e);\n });\n\n
|
1033
|
+
\ // If no match present, tell the user\n if (selectedSection.innerHTML
|
1034
|
+
=== defaultText) {\n selectedSection.innerHTML = selectedSection.innerHTML
|
1035
|
+
+ noMatchText;\n }\n }\n }\n\n setupMatchPaths();\n setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
|
1036
|
+
http_version:
|
1037
|
+
recorded_at: Sun, 14 Sep 2014 16:59:38 GMT
|
1038
|
+
- request:
|
1039
|
+
method: post
|
1040
|
+
uri: http://localhost:3000/api/users/
|
1041
|
+
body:
|
1042
|
+
encoding: UTF-8
|
1043
|
+
string: "{}"
|
1044
|
+
headers:
|
1045
|
+
User-Agent:
|
1046
|
+
- Faraday v0.9.0
|
1047
|
+
Content-Type:
|
1048
|
+
- application/json
|
1049
|
+
Api-Token:
|
1050
|
+
- testing
|
1051
|
+
Accept-Encoding:
|
1052
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
1053
|
+
Accept:
|
1054
|
+
- "*/*"
|
1055
|
+
response:
|
1056
|
+
status:
|
1057
|
+
code: 201
|
1058
|
+
message: 'Created '
|
1059
|
+
headers:
|
1060
|
+
X-Frame-Options:
|
1061
|
+
- SAMEORIGIN
|
1062
|
+
X-Xss-Protection:
|
1063
|
+
- 1; mode=block
|
1064
|
+
X-Content-Type-Options:
|
1065
|
+
- nosniff
|
1066
|
+
X-Ua-Compatible:
|
1067
|
+
- chrome=1
|
1068
|
+
Content-Type:
|
1069
|
+
- application/json; charset=utf-8
|
1070
|
+
Etag:
|
1071
|
+
- '"a8f199bc6caa5fff3d3449c465eabfea"'
|
1072
|
+
Cache-Control:
|
1073
|
+
- max-age=0, private, must-revalidate
|
1074
|
+
X-Request-Id:
|
1075
|
+
- 7eeafa78-636e-4805-ad42-b5991318b0f9
|
1076
|
+
X-Runtime:
|
1077
|
+
- '0.006511'
|
1078
|
+
Server:
|
1079
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
1080
|
+
Date:
|
1081
|
+
- Sat, 20 Sep 2014 14:14:34 GMT
|
1082
|
+
Content-Length:
|
1083
|
+
- '272'
|
1084
|
+
Connection:
|
1085
|
+
- Keep-Alive
|
1086
|
+
body:
|
1087
|
+
encoding: UTF-8
|
1088
|
+
string: |-
|
1089
|
+
{
|
1090
|
+
"id": 12,
|
1091
|
+
"service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
|
1092
|
+
"_links": {
|
1093
|
+
"self": {
|
1094
|
+
"href": "http://localhost:3000/api/users/12"
|
1095
|
+
}
|
1096
|
+
},
|
1097
|
+
"token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
|
1098
|
+
}
|
1099
|
+
http_version:
|
1100
|
+
recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
|
1101
|
+
- request:
|
1102
|
+
method: post
|
1103
|
+
uri: http://localhost:3000/api/surveys/?random=true
|
1104
|
+
body:
|
1105
|
+
encoding: UTF-8
|
1106
|
+
string: '{"survey":{"user_id":12}}'
|
1107
|
+
headers:
|
1108
|
+
User-Agent:
|
1109
|
+
- Faraday v0.9.0
|
1110
|
+
Content-Type:
|
1111
|
+
- application/json
|
1112
|
+
Api-Token:
|
1113
|
+
- testing
|
1114
|
+
Accept-Encoding:
|
1115
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
1116
|
+
Accept:
|
1117
|
+
- "*/*"
|
1118
|
+
response:
|
1119
|
+
status:
|
1120
|
+
code: 201
|
1121
|
+
message: 'Created '
|
1122
|
+
headers:
|
1123
|
+
X-Frame-Options:
|
1124
|
+
- SAMEORIGIN
|
1125
|
+
X-Xss-Protection:
|
1126
|
+
- 1; mode=block
|
1127
|
+
X-Content-Type-Options:
|
1128
|
+
- nosniff
|
1129
|
+
X-Ua-Compatible:
|
1130
|
+
- chrome=1
|
1131
|
+
Content-Type:
|
1132
|
+
- application/json; charset=utf-8
|
1133
|
+
Etag:
|
1134
|
+
- '"8d698a52db0f4c5b310716c034a655e3"'
|
1135
|
+
Cache-Control:
|
1136
|
+
- max-age=0, private, must-revalidate
|
1137
|
+
X-Request-Id:
|
1138
|
+
- 48bcc608-571e-488e-85af-ec24f2f6d832
|
1139
|
+
X-Runtime:
|
1140
|
+
- '0.039988'
|
1141
|
+
Server:
|
1142
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
1143
|
+
Date:
|
1144
|
+
- Sat, 20 Sep 2014 14:14:34 GMT
|
1145
|
+
Content-Length:
|
1146
|
+
- '4487'
|
1147
|
+
Connection:
|
1148
|
+
- Keep-Alive
|
1149
|
+
body:
|
1150
|
+
encoding: UTF-8
|
1151
|
+
string: |-
|
1152
|
+
{
|
1153
|
+
"id": 12,
|
1154
|
+
"user_id": 12,
|
1155
|
+
"_links": {
|
1156
|
+
"self": {
|
1157
|
+
"href": "http://localhost:3000/api/surveys/12"
|
301
1158
|
},
|
1159
|
+
"survey_questions": {
|
1160
|
+
"post": {
|
1161
|
+
"href": "/api/surveys/12/survey_questions"
|
1162
|
+
},
|
1163
|
+
"put": {
|
1164
|
+
"href": "/api/surveys/12/survey_questions"
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
},
|
1168
|
+
"completed": false,
|
1169
|
+
"survey_questions": [
|
302
1170
|
{
|
303
|
-
"id":
|
304
|
-
"text": "
|
1171
|
+
"id": 30,
|
1172
|
+
"text": "How do you feel right now?",
|
305
1173
|
"type": "range",
|
306
1174
|
"responses": [
|
307
1175
|
"0",
|
@@ -311,46 +1179,176 @@ http_interactions:
|
|
311
1179
|
"freeform": false,
|
312
1180
|
"_links": {
|
313
1181
|
"self": {
|
314
|
-
"href": "
|
1182
|
+
"href": "/api/surveys/12/survey_questions/30"
|
1183
|
+
},
|
1184
|
+
"post": {
|
1185
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
1186
|
+
},
|
1187
|
+
"put": {
|
1188
|
+
"href": "/api/surveys/12/survey_questions/30"
|
315
1189
|
},
|
316
1190
|
"survey": {
|
317
|
-
"href": "
|
1191
|
+
"href": "/api/surveys/12"
|
1192
|
+
}
|
1193
|
+
}
|
1194
|
+
},
|
1195
|
+
{
|
1196
|
+
"id": 31,
|
1197
|
+
"text": "Where are you?",
|
1198
|
+
"type": "multiple",
|
1199
|
+
"responses": [
|
1200
|
+
"At Home",
|
1201
|
+
"At Work",
|
1202
|
+
"In a car",
|
1203
|
+
"Other"
|
1204
|
+
],
|
1205
|
+
"answer": null,
|
1206
|
+
"freeform": true,
|
1207
|
+
"_links": {
|
1208
|
+
"self": {
|
1209
|
+
"href": "/api/surveys/12/survey_questions/31"
|
318
1210
|
},
|
319
|
-
"
|
320
|
-
"href": "http://localhost:3000/api/surveys/
|
1211
|
+
"post": {
|
1212
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
321
1213
|
},
|
322
|
-
"
|
323
|
-
"href": "
|
1214
|
+
"put": {
|
1215
|
+
"href": "/api/surveys/12/survey_questions/31"
|
1216
|
+
},
|
1217
|
+
"survey": {
|
1218
|
+
"href": "/api/surveys/12"
|
324
1219
|
}
|
325
1220
|
}
|
326
1221
|
},
|
327
1222
|
{
|
328
|
-
"id":
|
329
|
-
"text": "
|
330
|
-
"type": "
|
1223
|
+
"id": 32,
|
1224
|
+
"text": "Who are you talking or interacting with?",
|
1225
|
+
"type": "multiple",
|
1226
|
+
"responses": [
|
1227
|
+
"Spouse/partner/significant other",
|
1228
|
+
"Children",
|
1229
|
+
"Parents",
|
1230
|
+
"Other relatives",
|
1231
|
+
"Friends",
|
1232
|
+
"Acquaintances",
|
1233
|
+
"Strangers",
|
1234
|
+
"Co-workers",
|
1235
|
+
"Customers/students",
|
1236
|
+
"Boss",
|
1237
|
+
"No one"
|
1238
|
+
],
|
1239
|
+
"answer": null,
|
1240
|
+
"freeform": true,
|
1241
|
+
"_links": {
|
1242
|
+
"self": {
|
1243
|
+
"href": "/api/surveys/12/survey_questions/32"
|
1244
|
+
},
|
1245
|
+
"post": {
|
1246
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
1247
|
+
},
|
1248
|
+
"put": {
|
1249
|
+
"href": "/api/surveys/12/survey_questions/32"
|
1250
|
+
},
|
1251
|
+
"survey": {
|
1252
|
+
"href": "/api/surveys/12"
|
1253
|
+
}
|
1254
|
+
}
|
1255
|
+
},
|
1256
|
+
{
|
1257
|
+
"id": 33,
|
1258
|
+
"text": "How many people are you talking or interacting with?",
|
1259
|
+
"type": "multiple",
|
331
1260
|
"responses": [
|
332
1261
|
"0",
|
1262
|
+
"1",
|
1263
|
+
"2",
|
1264
|
+
"3",
|
1265
|
+
"4",
|
1266
|
+
"5",
|
1267
|
+
"6",
|
1268
|
+
"7",
|
1269
|
+
"8",
|
1270
|
+
"9",
|
1271
|
+
"10",
|
1272
|
+
"More than 10"
|
1273
|
+
],
|
1274
|
+
"answer": null,
|
1275
|
+
"freeform": false,
|
1276
|
+
"_links": {
|
1277
|
+
"self": {
|
1278
|
+
"href": "/api/surveys/12/survey_questions/33"
|
1279
|
+
},
|
1280
|
+
"post": {
|
1281
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
1282
|
+
},
|
1283
|
+
"put": {
|
1284
|
+
"href": "/api/surveys/12/survey_questions/33"
|
1285
|
+
},
|
1286
|
+
"survey": {
|
1287
|
+
"href": "/api/surveys/12"
|
1288
|
+
}
|
1289
|
+
}
|
1290
|
+
},
|
1291
|
+
{
|
1292
|
+
"id": 34,
|
1293
|
+
"text": "Imagine you were given $10 to divide between yourself and a stranger to whom you would remain anonymous. How much would you give to the stranger?",
|
1294
|
+
"type": "multiple",
|
1295
|
+
"responses": [
|
1296
|
+
"0",
|
1297
|
+
"1",
|
1298
|
+
"2",
|
1299
|
+
"3",
|
1300
|
+
"4",
|
1301
|
+
"5",
|
1302
|
+
"6",
|
1303
|
+
"7",
|
1304
|
+
"8",
|
1305
|
+
"9",
|
333
1306
|
"10"
|
334
1307
|
],
|
335
1308
|
"answer": null,
|
336
1309
|
"freeform": false,
|
337
1310
|
"_links": {
|
338
1311
|
"self": {
|
339
|
-
"href": "
|
1312
|
+
"href": "/api/surveys/12/survey_questions/34"
|
1313
|
+
},
|
1314
|
+
"post": {
|
1315
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
1316
|
+
},
|
1317
|
+
"put": {
|
1318
|
+
"href": "/api/surveys/12/survey_questions/34"
|
340
1319
|
},
|
341
1320
|
"survey": {
|
342
|
-
"href": "
|
1321
|
+
"href": "/api/surveys/12"
|
1322
|
+
}
|
1323
|
+
}
|
1324
|
+
},
|
1325
|
+
{
|
1326
|
+
"id": 35,
|
1327
|
+
"text": "To what extent do you feel accepted by the person/people you are interacting with?",
|
1328
|
+
"type": "range",
|
1329
|
+
"responses": [
|
1330
|
+
"0",
|
1331
|
+
"10"
|
1332
|
+
],
|
1333
|
+
"answer": null,
|
1334
|
+
"freeform": false,
|
1335
|
+
"_links": {
|
1336
|
+
"self": {
|
1337
|
+
"href": "/api/surveys/12/survey_questions/35"
|
343
1338
|
},
|
344
|
-
"
|
345
|
-
"href": "http://localhost:3000/api/surveys/
|
1339
|
+
"post": {
|
1340
|
+
"href": "http://localhost:3000/api/surveys/12/survey_questions"
|
346
1341
|
},
|
347
|
-
"
|
348
|
-
"href": "
|
1342
|
+
"put": {
|
1343
|
+
"href": "/api/surveys/12/survey_questions/35"
|
1344
|
+
},
|
1345
|
+
"survey": {
|
1346
|
+
"href": "/api/surveys/12"
|
349
1347
|
}
|
350
1348
|
}
|
351
1349
|
}
|
352
1350
|
]
|
353
1351
|
}
|
354
1352
|
http_version:
|
355
|
-
recorded_at: Sat,
|
1353
|
+
recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
|
356
1354
|
recorded_with: VCR 2.6.0
|