poptart 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/poptart.rb +1 -4
  4. data/lib/poptart/link.rb +9 -0
  5. data/lib/poptart/model.rb +13 -29
  6. data/lib/poptart/question.rb +21 -17
  7. data/lib/poptart/root.rb +10 -1
  8. data/lib/poptart/survey.rb +34 -7
  9. data/lib/poptart/survey_question.rb +32 -12
  10. data/lib/poptart/user.rb +4 -21
  11. data/lib/version.rb +1 -1
  12. data/poptart.gemspec +0 -4
  13. data/spec/lib/poptart/model_spec.rb +95 -0
  14. data/spec/lib/poptart/question_spec.rb +47 -0
  15. data/spec/lib/poptart/root_spec.rb +50 -0
  16. data/spec/lib/poptart/survey_question_spec.rb +166 -0
  17. data/spec/lib/poptart/survey_spec.rb +105 -0
  18. data/spec/lib/poptart/user_spec.rb +45 -0
  19. data/spec/requests/questions_spec.rb +31 -0
  20. data/spec/requests/survey_questions_spec.rb +150 -0
  21. data/spec/requests/surveys_spec.rb +34 -5
  22. data/spec/requests/{user_management_spec.rb → users_spec.rb} +5 -5
  23. data/spec/spec_helper.rb +1 -4
  24. data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +1527 -1596
  25. data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +2942 -2035
  26. data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +254 -70
  27. data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +110 -48
  28. data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1618 -286
  29. data/spec/vcr/poptart/survey/adds_a_question_to_a_survey.yml +1939 -0
  30. data/spec/vcr/poptart/survey/creates_a_random_survey.yml +318 -0
  31. data/spec/vcr/poptart/survey/creates_an_empty_survey.yml +702 -0
  32. data/spec/vcr/poptart/survey/returns_a_survey_by_id.yml +618 -0
  33. data/spec/vcr/poptart/user/creates_a_user.yml +179 -0
  34. data/spec/vcr/{user/management_creates_a_user.yml → poptart/user/returns_a_user.yml} +72 -69
  35. data/spec/vcr/questions/creates_a_question.yml +186 -0
  36. data/spec/vcr/questions/finds_a_question_by_id.yml +326 -0
  37. data/spec/vcr/questions/finds_a_question_by_key.yml +144 -0
  38. data/spec/vcr/questions/returns_all_answered_survey_questions_for_a_question.yml +1021 -0
  39. data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question.yml +533 -479
  40. data/spec/vcr/survey/questions_answers_a_multiple_choice_question.yml +1454 -0
  41. data/spec/vcr/survey/questions_answers_a_survey_question.yml +1772 -0
  42. data/spec/vcr/survey/questions_creates_and_returns_an_empty_survey.yml +372 -0
  43. data/spec/vcr/survey/questions_finds_survey_question_for_id.yml +3083 -0
  44. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question.yml +5756 -0
  45. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question_by_key.yml +973 -0
  46. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_survey.yml +620 -0
  47. metadata +55 -72
  48. data/lib/poptart/boolean_question.rb +0 -14
  49. data/lib/poptart/multiple_response_question.rb +0 -9
  50. data/lib/poptart/range_question.rb +0 -9
  51. data/lib/poptart/time_question.rb +0 -9
  52. data/spec/requests/answering_survey_questions_spec.rb +0 -79
  53. data/spec/requests/answers_spec.rb +0 -45
  54. data/spec/requests/creating_questions_spec.rb +0 -30
@@ -0,0 +1,150 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Survey questions', :vcr do
4
+ it "answers a survey question" do
5
+ user = Poptart::User.create
6
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
7
+ survey = Poptart::Survey.create
8
+
9
+ question = Poptart::Question.create(
10
+ 'Do you like poptarts?',
11
+ responses: [true, false],
12
+ question_type: 'boolean'
13
+ )
14
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
15
+ survey_question = survey.add_survey_question(survey_question)
16
+
17
+ expect(survey.survey_questions.count).to eq(1)
18
+ expect(survey_question.responses).to eq(['t', 'f'])
19
+ expect(survey_question.question_type).to eq('boolean')
20
+
21
+ survey_question.answer = true
22
+ expect(survey_question.submit).to eq(true)
23
+
24
+ survey = Poptart::Survey.find(survey.id)
25
+ expect(survey.survey_questions.first.answer).to eq(true)
26
+ expect(survey.completed?).to eq(true)
27
+ end
28
+
29
+ it "answers a multiple choice question" do
30
+ user = Poptart::User.create
31
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
32
+ survey = Poptart::Survey.create
33
+
34
+ question = Poptart::Question.create(
35
+ 'Where are you?',
36
+ responses: ["At Home", "At Work", "In a car", "Other"],
37
+ question_type: 'multiple'
38
+ )
39
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
40
+ survey_question = survey.add_survey_question(survey_question)
41
+
42
+ expect(survey.survey_questions.count).to eq(1)
43
+ expect(survey_question.responses).to eq(["At Home", "At Work", "In a car", "Other"])
44
+ expect(survey_question.question_type).to eq('multiple')
45
+
46
+ survey_question.answer = 'At Home'
47
+ expect(survey_question.submit).to be
48
+
49
+ survey = Poptart::Survey.find(survey.id)
50
+ expect(survey.survey_questions.first.answer).to eq('At Home')
51
+ end
52
+
53
+ it "finds survey question for id" do
54
+ user = Poptart::User.create
55
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
56
+ questions = Poptart::Question.all(type: 'multiple')
57
+ survey = Poptart::Survey.create
58
+
59
+ question = Poptart::Question.create(
60
+ 'Where are you?',
61
+ responses: ["At Home", "At Work", "In a car", "Other"],
62
+ question_type: 'multiple'
63
+ )
64
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
65
+ first_survey_question = survey.add_survey_question(survey_question)
66
+ second_survey_question = survey.add_survey_question(survey_question)
67
+
68
+ survey_question = survey.survey_question_for_id(first_survey_question.id)
69
+ expect(first_survey_question).to eq(survey.survey_question_for_id(first_survey_question.id))
70
+ expect(second_survey_question).to eq(survey.survey_question_for_id(second_survey_question.id))
71
+ end
72
+
73
+ it "returns all answered survey questions for a question", :vcr do
74
+ question = Poptart::Question.create(
75
+ 'Do you like poptarts?',
76
+ responses: [true, false],
77
+ question_type: 'boolean'
78
+ )
79
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
80
+ user = Poptart::User.create
81
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
82
+
83
+ survey = Poptart::Survey.create
84
+ first_survey_question = survey.add_survey_question(survey_question)
85
+ second_survey = Poptart::Survey.create
86
+ second_survey_question = second_survey.add_survey_question(survey_question)
87
+
88
+ first_survey_question.answer = true
89
+ expect(first_survey_question.submit).to be
90
+
91
+ second_survey_question.answer = false
92
+ expect(second_survey_question.submit).to be
93
+
94
+ survey_questions = Poptart::SurveyQuestion.find_all(question_id: question.id)
95
+ expect(survey_questions.map(&:answer)).to match([true, false])
96
+ end
97
+
98
+ it "returns all answered survey questions for a question by key", :vcr do
99
+ key = 'testingooptarts'
100
+ question = Poptart::Question.create(
101
+ 'Do you like poptarts?',
102
+ responses: [true, false],
103
+ question_type: 'boolean',
104
+ key: key
105
+ )
106
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
107
+ user = Poptart::User.create
108
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
109
+
110
+ survey = Poptart::Survey.create
111
+ first_survey_question = survey.add_survey_question(survey_question)
112
+ second_survey = Poptart::Survey.create
113
+ second_survey_question = second_survey.add_survey_question(survey_question)
114
+
115
+ first_survey_question.answer = true
116
+ expect(first_survey_question.submit).to be
117
+
118
+ second_survey_question.answer = false
119
+ expect(second_survey_question.submit).to be
120
+
121
+ survey_questions = Poptart::SurveyQuestion.find_all(key: key)
122
+ expect(survey_questions.map(&:answer)).to match([true, false])
123
+ end
124
+
125
+ it "returns all answered survey questions for a survey", :vcr do
126
+ key = 'testingooptarts'
127
+ question = Poptart::Question.create(
128
+ 'Do you like poptarts?',
129
+ responses: [true, false],
130
+ question_type: 'boolean',
131
+ key: key
132
+ )
133
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
134
+ user = Poptart::User.create
135
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
136
+
137
+ survey = Poptart::Survey.create
138
+ first_survey_question = survey.add_survey_question(survey_question)
139
+ second_survey_question = survey.add_survey_question(survey_question)
140
+
141
+ first_survey_question.answer = true
142
+ expect(first_survey_question.submit).to be
143
+
144
+ second_survey_question.answer = false
145
+ expect(second_survey_question.submit).to be
146
+
147
+ survey_questions = Poptart::SurveyQuestion.find_all(survey_id: survey.id)
148
+ expect(survey_questions.map(&:answer)).to match([true, false])
149
+ end
150
+ end
@@ -1,11 +1,40 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe 'surveys' do
4
- it 'fetchs all surveys for a user', :vcr do
3
+ describe Poptart::Survey, :vcr do
4
+ it 'creates an empty survey' do
5
5
  user = Poptart::User.create
6
6
  Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
7
- survey1 = user.create_survey
8
- survey2 = user.create_survey
9
- expect(user.surveys.map(&:id)).to eq([survey1.id, survey2.id])
7
+ survey = Poptart::Survey.create
8
+ expect(Poptart::Survey.all.map(&:id).include?(survey.id)).to eq(true)
9
+ end
10
+
11
+ it 'returns a survey by id' do
12
+ user = Poptart::User.create
13
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
14
+ survey = Poptart::Survey.create
15
+ returned_survey = Poptart::Survey.find(survey.id)
16
+ expect(returned_survey.id).to eq(survey.id)
17
+ end
18
+
19
+ it 'adds a question to a survey' do
20
+ question = Poptart::Question.create('Do you like poptarts?',
21
+ question_type: 'boolean',
22
+ responses: [true, false])
23
+
24
+ user = Poptart::User.create
25
+ Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
26
+ survey = Poptart::Survey.create
27
+ expect(survey.survey_questions.count).to eq(0)
28
+
29
+ survey_question = Poptart::SurveyQuestion.new('question_id' => question.id)
30
+
31
+ survey_question = survey.add_survey_question(survey_question)
32
+ expect(survey_question).to be
33
+ expect(survey_question.id).to be
34
+
35
+ survey = Poptart::Survey.find(survey.id)
36
+ expect(survey.survey_questions.count).to eq(1)
37
+ expect(survey.survey_questions.first.id).to eq(survey_question.id)
38
+ expect(survey.survey_questions.first.responses).to eq(['t', 'f'])
10
39
  end
11
40
  end
@@ -1,16 +1,16 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "User Management" do
3
+ describe Poptart::User do
4
4
  it "creates a user", :vcr do
5
5
  user = Poptart::User.create
6
- user.service_user_id.should be
7
- user.token.should be
6
+ expect(user.service_user_id).to be
7
+ expect(user.token).to be
8
8
  end
9
9
 
10
10
  it "returns a user", :vcr do
11
11
  user = Poptart::User.create
12
12
  Poptart.authorize(service_user_id: user.service_user_id, user_token: user.token)
13
- other_user = Poptart::User.for_id(user.service_user_id)
14
- user.service_user_id.should == other_user.service_user_id
13
+ other_user = Poptart::User.get_user
14
+ expect(user.service_user_id).to eq(other_user.service_user_id)
15
15
  end
16
16
  end
data/spec/spec_helper.rb CHANGED
@@ -1,15 +1,12 @@
1
1
  require_relative "../lib/poptart"
2
2
 
3
- require 'mocha/api'
4
- require 'bourne'
5
3
  require 'vcr'
6
4
 
7
5
  require 'active_support/inflector'
8
6
  require 'pry/test/helper'
9
7
 
10
8
  RSpec.configure do |c|
11
- c.mock_with :mocha
12
- c.treat_symbols_as_metadata_keys_with_true_values = true
9
+ c.mock_with :rspec
13
10
 
14
11
  c.around(:each, :vcr) do |example|
15
12
  name = example.metadata[:full_description].split(/\s+/, 2).join("/").underscore.gsub(/[^\w\/]+/, "_")
@@ -1957,75 +1957,6 @@ http_interactions:
1957
1957
  }
1958
1958
  http_version:
1959
1959
  recorded_at: Tue, 09 Sep 2014 23:21:50 GMT
1960
- - request:
1961
- method: get
1962
- uri: http://localhost:3000/
1963
- body:
1964
- encoding: US-ASCII
1965
- string: ''
1966
- headers:
1967
- User-Agent:
1968
- - Faraday v0.9.0
1969
- Content-Type:
1970
- - application/json
1971
- Api-Token:
1972
- - testing
1973
- Accept-Encoding:
1974
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1975
- Accept:
1976
- - "*/*"
1977
- response:
1978
- status:
1979
- code: 200
1980
- message: 'OK '
1981
- headers:
1982
- X-Frame-Options:
1983
- - SAMEORIGIN
1984
- X-Xss-Protection:
1985
- - 1; mode=block
1986
- X-Content-Type-Options:
1987
- - nosniff
1988
- X-Ua-Compatible:
1989
- - chrome=1
1990
- Content-Type:
1991
- - application/json; charset=utf-8
1992
- Etag:
1993
- - '"a723ac88b99a06c255a3384c2d01f4fb"'
1994
- Cache-Control:
1995
- - max-age=0, private, must-revalidate
1996
- X-Request-Id:
1997
- - 7a03de2a-5ab1-4566-ad63-6aa5d43640d9
1998
- X-Runtime:
1999
- - '0.006164'
2000
- Server:
2001
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
2002
- Date:
2003
- - Tue, 09 Sep 2014 23:22:20 GMT
2004
- Content-Length:
2005
- - '305'
2006
- Connection:
2007
- - Keep-Alive
2008
- body:
2009
- encoding: UTF-8
2010
- string: |-
2011
- {
2012
- "_links": {
2013
- "self": {
2014
- "href": "http://localhost:3000/api"
2015
- },
2016
- "surveys": {
2017
- "href": "http://localhost:3000/api/surveys"
2018
- },
2019
- "users": {
2020
- "href": "http://localhost:3000/api/users"
2021
- },
2022
- "questions": {
2023
- "href": "http://localhost:3000/api/questions"
2024
- }
2025
- }
2026
- }
2027
- http_version:
2028
- recorded_at: Tue, 09 Sep 2014 23:22:20 GMT
2029
1960
  - request:
2030
1961
  method: get
2031
1962
  uri: http://localhost:3000/
@@ -12139,11 +12070,11 @@ http_interactions:
12139
12070
  http_version:
12140
12071
  recorded_at: Sat, 18 Oct 2014 17:29:40 GMT
12141
12072
  - request:
12142
- method: get
12143
- uri: http://localhost:3000/api/questions
12073
+ method: post
12074
+ uri: http://localhost:3000/api/users
12144
12075
  body:
12145
- encoding: US-ASCII
12146
- string: ''
12076
+ encoding: UTF-8
12077
+ string: "{}"
12147
12078
  headers:
12148
12079
  User-Agent:
12149
12080
  - Faraday v0.9.0
@@ -12161,8 +12092,8 @@ http_interactions:
12161
12092
  - "*/*"
12162
12093
  response:
12163
12094
  status:
12164
- code: 200
12165
- message: 'OK '
12095
+ code: 201
12096
+ message: 'Created '
12166
12097
  headers:
12167
12098
  X-Frame-Options:
12168
12099
  - SAMEORIGIN
@@ -12175,1697 +12106,1626 @@ http_interactions:
12175
12106
  Content-Type:
12176
12107
  - application/json; charset=utf-8
12177
12108
  Etag:
12178
- - '"ff623305a658e615bfb2397dd59466c0"'
12109
+ - '"f1ea635ec017566cc82565fc17a17f9f"'
12179
12110
  Cache-Control:
12180
12111
  - max-age=0, private, must-revalidate
12181
12112
  X-Request-Id:
12182
- - 00b09473-093c-44f0-9b98-2d32716cdd9c
12113
+ - f8faa078-d8ad-442a-b36d-0f49bfedef9d
12183
12114
  X-Runtime:
12184
- - '0.028182'
12115
+ - '0.005908'
12185
12116
  Server:
12186
12117
  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
12187
12118
  Date:
12188
12119
  - Sat, 18 Oct 2014 17:30:43 GMT
12189
12120
  Content-Length:
12190
- - '33341'
12121
+ - '261'
12191
12122
  Connection:
12192
12123
  - Keep-Alive
12193
12124
  body:
12194
12125
  encoding: UTF-8
12195
12126
  string: |-
12196
- [
12197
- {
12198
- "id": 1,
12199
- "question_type": "multiple",
12200
- "text": "How hungry or full are you right now?",
12201
- "responses": [
12202
- "Very hungry",
12203
- "Somewhat hungry",
12204
- "Neither full nor hungry",
12205
- "Somewhat full",
12206
- "Very full"
12207
- ],
12208
- "freeform": false,
12209
- "absolute_index": null,
12210
- "parent_question_id": null,
12211
- "key": "how_hungry_are_you"
12212
- },
12213
- {
12214
- "id": 2,
12215
- "question_type": "time",
12216
- "text": "What time did you wake up this morning?",
12217
- "responses": null,
12218
- "freeform": false,
12219
- "absolute_index": null,
12220
- "parent_question_id": null,
12221
- "key": "what_time_did_you_wake_up"
12222
- },
12223
- {
12224
- "id": 3,
12225
- "question_type": "time",
12226
- "text": "What time did you got to sleep last night?",
12227
- "responses": null,
12228
- "freeform": false,
12229
- "absolute_index": null,
12230
- "parent_question_id": null,
12231
- "key": "what_time_did_you_sleep"
12232
- },
12233
- {
12234
- "id": 4,
12235
- "question_type": "multiple",
12236
- "text": "Are you judging or evaluating yourself right now (i.e. at the moment just before you were notified)?",
12237
- "responses": [
12238
- "f",
12239
- "Yes - Negatively",
12240
- "Yes - Neutrally",
12241
- "Yes - Positively"
12242
- ],
12243
- "freeform": false,
12244
- "absolute_index": null,
12245
- "parent_question_id": null,
12246
- "key": "are_you_judging_yourself"
12247
- },
12248
- {
12249
- "id": 5,
12250
- "question_type": "range",
12251
- "text": "How well did you sleep last night?",
12252
- "responses": [
12253
- "0",
12254
- "10"
12255
- ],
12256
- "freeform": false,
12257
- "absolute_index": null,
12258
- "parent_question_id": null,
12259
- "key": "how_well_did_you_sleep"
12260
- },
12261
- {
12262
- "id": 6,
12263
- "question_type": "range",
12264
- "text": "To what extent are you engrossed in what you are doing?",
12265
- "responses": [
12266
- "0",
12267
- "10"
12268
- ],
12269
- "freeform": false,
12270
- "absolute_index": null,
12271
- "parent_question_id": null,
12272
- "key": "what_extent_are_you_engrossed"
12273
- },
12274
- {
12275
- "id": 7,
12276
- "question_type": "multiple",
12277
- "text": "Are you judging or evaluating what you are doing right now (i.e. at the moment just before you were notified?)",
12278
- "responses": [
12279
- "f",
12280
- "Yes - Negatively",
12281
- "Yes - Neutrally",
12282
- "Yes - Positively"
12283
- ],
12284
- "freeform": false,
12285
- "absolute_index": null,
12286
- "parent_question_id": null,
12287
- "key": "are_you_judging_or_evaluating_what_you_are_doing"
12127
+ {
12128
+ "service_user_id": "8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471",
12129
+ "_links": {
12130
+ "self": {
12131
+ "href": "http://localhost:3000/api/users/147"
12132
+ }
12288
12133
  },
12289
- {
12290
- "id": 8,
12291
- "question_type": "boolean",
12292
- "text": "In the past 24 hours, have you engaged in sexual activity with another person?",
12293
- "responses": [
12294
- "t",
12295
- "f"
12296
- ],
12297
- "freeform": false,
12298
- "absolute_index": null,
12299
- "parent_question_id": null,
12300
- "key": "had_sex"
12134
+ "token": "cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7"
12135
+ }
12136
+ http_version:
12137
+ recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
12138
+ - request:
12139
+ method: post
12140
+ uri: http://localhost:3000/api/surveys/182/survey_questions
12141
+ body:
12142
+ encoding: UTF-8
12143
+ string: '{"survey_question":{"question_id":25}}'
12144
+ headers:
12145
+ User-Agent:
12146
+ - Faraday v0.9.0
12147
+ Content-Type:
12148
+ - application/json
12149
+ Api-Token:
12150
+ - testing
12151
+ User-Token:
12152
+ - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
12153
+ Service-User-Id:
12154
+ - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
12155
+ Accept-Encoding:
12156
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12157
+ Accept:
12158
+ - "*/*"
12159
+ response:
12160
+ status:
12161
+ code: 201
12162
+ message: 'Created '
12163
+ headers:
12164
+ X-Frame-Options:
12165
+ - SAMEORIGIN
12166
+ X-Xss-Protection:
12167
+ - 1; mode=block
12168
+ X-Content-Type-Options:
12169
+ - nosniff
12170
+ X-Ua-Compatible:
12171
+ - chrome=1
12172
+ Content-Type:
12173
+ - application/json; charset=utf-8
12174
+ Etag:
12175
+ - '"5242ab3d8954c48021cc19dcfcc728db"'
12176
+ Cache-Control:
12177
+ - max-age=0, private, must-revalidate
12178
+ X-Request-Id:
12179
+ - 0c6717c6-85a6-419c-b6b2-8b6121ecc3bf
12180
+ X-Runtime:
12181
+ - '0.023080'
12182
+ Server:
12183
+ - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
12184
+ Date:
12185
+ - Sat, 18 Oct 2014 17:30:43 GMT
12186
+ Content-Length:
12187
+ - '605'
12188
+ Connection:
12189
+ - Keep-Alive
12190
+ body:
12191
+ encoding: UTF-8
12192
+ string: |-
12193
+ {
12194
+ "id": 261,
12195
+ "text": "Where are you?",
12196
+ "type": "multiple",
12197
+ "responses": [
12198
+ "At Home",
12199
+ "At Work",
12200
+ "In a car",
12201
+ "Other"
12202
+ ],
12203
+ "answer": null,
12204
+ "freeform": true,
12205
+ "_links": {
12206
+ "self": {
12207
+ "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
12208
+ },
12209
+ "post": {
12210
+ "href": "http://localhost:3000/api/surveys/182/survey_questions"
12211
+ },
12212
+ "put": {
12213
+ "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
12214
+ },
12215
+ "survey": {
12216
+ "href": "http://localhost:3000/api/surveys/182"
12217
+ }
12301
12218
  },
12302
- {
12303
- "id": 9,
12304
- "question_type": "multiple",
12305
- "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?",
12306
- "responses": [
12307
- "0",
12308
- "1",
12309
- "2",
12310
- "3",
12311
- "4",
12312
- "5",
12313
- "6",
12314
- "7",
12315
- "8",
12316
- "9",
12317
- "10"
12318
- ],
12319
- "freeform": false,
12320
- "absolute_index": null,
12321
- "parent_question_id": null,
12322
- "key": "how_much_would_you_give_to_stranger"
12323
- },
12324
- {
12325
- "id": 10,
12326
- "question_type": "boolean",
12327
- "text": "Have you surprised someone with a gift (including small gifts) in the last week?",
12328
- "responses": [
12329
- "t",
12330
- "f"
12331
- ],
12332
- "freeform": false,
12333
- "absolute_index": null,
12334
- "parent_question_id": null,
12335
- "key": "have_you_surprised_someone"
12336
- },
12337
- {
12338
- "id": 11,
12339
- "question_type": "multiple",
12340
- "text": "In general, how is your health?",
12341
- "responses": [
12342
- "Excellent",
12343
- "Very Good",
12344
- "Good",
12345
- "Fair",
12346
- "Poor"
12347
- ],
12348
- "freeform": false,
12349
- "absolute_index": null,
12350
- "parent_question_id": null,
12351
- "key": "how_is_your_health"
12352
- },
12353
- {
12354
- "id": 12,
12355
- "question_type": "range",
12356
- "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.",
12357
- "responses": [
12358
- "0",
12359
- "10"
12360
- ],
12361
- "freeform": false,
12362
- "absolute_index": null,
12363
- "parent_question_id": null,
12364
- "key": "ladder"
12365
- },
12366
- {
12367
- "id": 13,
12368
- "question_type": "range",
12369
- "text": "To what extent is what you're doing interesting?",
12370
- "responses": [
12371
- "0",
12372
- "10"
12373
- ],
12374
- "freeform": false,
12375
- "absolute_index": null,
12376
- "parent_question_id": null,
12377
- "key": "what_extent_interesting"
12378
- },
12379
- {
12380
- "id": 14,
12381
- "question_type": "multiple",
12382
- "text": "On average, how many hours do you work each week?",
12383
- "responses": [
12384
- "Less than 5",
12385
- "5-10",
12386
- "10-20",
12387
- "20-30",
12388
- "30-40",
12389
- "40-50",
12390
- "50-60",
12391
- "60-70",
12392
- "More than 70"
12393
- ],
12394
- "freeform": false,
12395
- "absolute_index": null,
12396
- "parent_question_id": null,
12397
- "key": "how_many_hours_do_you_work"
12398
- },
12399
- {
12400
- "id": 15,
12401
- "question_type": "range",
12402
- "text": "How do you feel right now?",
12403
- "responses": [
12404
- "0",
12405
- "10"
12406
- ],
12407
- "freeform": false,
12408
- "absolute_index": 0,
12409
- "parent_question_id": null,
12410
- "key": "how_do_you_feel_right_now"
12411
- },
12412
- {
12413
- "id": 16,
12414
- "question_type": "range",
12415
- "text": "To what extent do you expect good things to happen in the future?",
12416
- "responses": [
12417
- "0",
12418
- "10"
12419
- ],
12420
- "freeform": false,
12421
- "absolute_index": null,
12422
- "parent_question_id": null,
12423
- "key": "good_things_future"
12424
- },
12425
- {
12426
- "id": 17,
12427
- "question_type": "boolean",
12428
- "text": "Have you taken any over-the-counter pain medication in the past 24 hours?",
12429
- "responses": [
12430
- "t",
12431
- "f"
12432
- ],
12433
- "freeform": false,
12434
- "absolute_index": null,
12435
- "parent_question_id": null,
12436
- "key": "pain_medication"
12437
- },
12438
- {
12439
- "id": 18,
12440
- "question_type": "range",
12441
- "text": "To what extent have you procrastinated so far today?",
12442
- "responses": [
12443
- "0",
12444
- "10"
12445
- ],
12446
- "freeform": false,
12447
- "absolute_index": null,
12448
- "parent_question_id": null,
12449
- "key": "procrastinated"
12450
- },
12451
- {
12452
- "id": 19,
12453
- "question_type": "range",
12454
- "text": "To what extent are you being productive?",
12455
- "responses": [
12456
- "0",
12457
- "10"
12458
- ],
12459
- "freeform": false,
12460
- "absolute_index": null,
12461
- "parent_question_id": null,
12462
- "key": "productive"
12463
- },
12464
- {
12465
- "id": 20,
12466
- "question_type": "multiple",
12467
- "text": "Who are you talking or interacting with?",
12468
- "responses": [
12469
- "Spouse/partner/significant other",
12470
- "Children",
12471
- "Parents",
12472
- "Other relatives",
12473
- "Friends",
12474
- "Acquaintances",
12475
- "Strangers",
12476
- "Co-workers",
12477
- "Customers/students",
12478
- "Boss",
12479
- "No one"
12480
- ],
12481
- "freeform": true,
12482
- "absolute_index": null,
12483
- "parent_question_id": null,
12484
- "key": "who_are_you_talking_with"
12485
- },
12486
- {
12487
- "id": 27,
12488
- "question_type": "boolean",
12489
- "text": "Do you have to do what you're doing?",
12490
- "responses": [
12491
- "t",
12492
- "f"
12493
- ],
12494
- "freeform": false,
12495
- "absolute_index": null,
12496
- "parent_question_id": null,
12497
- "key": "do_you_have_to_do_what_youre_doing"
12498
- },
12499
- {
12500
- "id": 21,
12501
- "question_type": "range",
12502
- "text": "To what extent do you feel accepted by the person/people you are interacting with?",
12503
- "responses": [
12504
- "0",
12505
- "10"
12506
- ],
12507
- "freeform": false,
12508
- "absolute_index": null,
12509
- "parent_question_id": 20,
12510
- "key": null
12511
- },
12512
- {
12513
- "id": 22,
12514
- "question_type": "boolean",
12515
- "text": "Are you alone?",
12516
- "responses": [
12517
- "t",
12518
- "f"
12519
- ],
12520
- "freeform": false,
12521
- "absolute_index": null,
12522
- "parent_question_id": null,
12523
- "key": "are_you_alone"
12524
- },
12525
- {
12526
- "id": 23,
12527
- "question_type": "boolean",
12528
- "text": "Do you want to do what you're doing?",
12529
- "responses": [
12530
- "t",
12531
- "f"
12532
- ],
12533
- "freeform": false,
12534
- "absolute_index": null,
12535
- "parent_question_id": null,
12536
- "key": "do_you_want_to_do_what_youre_doing"
12537
- },
12538
- {
12539
- "id": 24,
12540
- "question_type": "boolean",
12541
- "text": "Are you talking or interacting with anyone?",
12542
- "responses": [
12543
- "t",
12544
- "f"
12545
- ],
12546
- "freeform": false,
12547
- "absolute_index": null,
12548
- "parent_question_id": null,
12549
- "key": "are_you_talking_to_anyone"
12550
- },
12551
- {
12552
- "id": 25,
12553
- "question_type": "multiple",
12554
- "text": "Where are you?",
12555
- "responses": [
12556
- "At Home",
12557
- "At Work",
12558
- "In a car",
12559
- "Other"
12560
- ],
12561
- "freeform": true,
12562
- "absolute_index": 1,
12563
- "parent_question_id": null,
12564
- "key": "where_are_you"
12565
- },
12566
- {
12567
- "id": 26,
12568
- "question_type": "multiple",
12569
- "text": "How many people are you talking or interacting with?",
12570
- "responses": [
12571
- "0",
12572
- "1",
12573
- "2",
12574
- "3",
12575
- "4",
12576
- "5",
12577
- "6",
12578
- "7",
12579
- "8",
12580
- "9",
12581
- "10",
12582
- "More than 10"
12583
- ],
12584
- "freeform": false,
12585
- "absolute_index": null,
12586
- "parent_question_id": null,
12587
- "key": "how_many_people_are_you_talking_with"
12588
- },
12589
- {
12590
- "id": 28,
12591
- "question_type": "range",
12592
- "text": "To what extent are you focused on what you are doing?",
12593
- "responses": [
12594
- "0",
12595
- "10"
12596
- ],
12597
- "freeform": false,
12598
- "absolute_index": null,
12599
- "parent_question_id": null,
12600
- "key": "how_focused"
12601
- },
12602
- {
12603
- "id": 29,
12604
- "question_type": "multiple",
12605
- "text": "When did you last check Facebook?",
12606
- "responses": [
12607
- "Right now",
12608
- "In the last 5 minutes",
12609
- "In the last 15 minutes",
12610
- "In the last 30 minutes",
12611
- "In the last hour",
12612
- "1-2 hours ago",
12613
- "3-5 hours ago",
12614
- "6-12 hours ago",
12615
- "24 hours ago",
12616
- "Don't use facebook"
12617
- ],
12618
- "freeform": false,
12619
- "absolute_index": null,
12620
- "parent_question_id": null,
12621
- "key": "when_did_last_check_facebook"
12622
- },
12623
- {
12624
- "id": 30,
12625
- "question_type": "multiple",
12626
- "text": "Beyond any work you've already done today, how many additional hours do you expect to work today?",
12627
- "responses": [
12628
- "0 (none)",
12629
- "Less than 1 hour",
12630
- "1-2 hours",
12631
- "2-3 hours",
12632
- "3-4 hours",
12633
- "4-5 hours",
12634
- "5-6 hours"
12635
- ],
12636
- "freeform": false,
12637
- "absolute_index": null,
12638
- "parent_question_id": null,
12639
- "key": "how_many_additional_work_hours"
12640
- },
12641
- {
12642
- "id": 31,
12643
- "question_type": "boolean",
12644
- "text": "If you could, and it had no negative consequences, would you jump forward in time 24 hours?",
12645
- "responses": [
12646
- "t",
12647
- "f"
12648
- ],
12649
- "freeform": false,
12650
- "absolute_index": null,
12651
- "parent_question_id": null,
12652
- "key": "jump_forward_24_hours"
12653
- },
12654
- {
12655
- "id": 32,
12656
- "question_type": "boolean",
12657
- "text": "Do you like poptarts?",
12658
- "responses": [
12659
- "t",
12660
- "f"
12661
- ],
12662
- "freeform": true,
12663
- "absolute_index": 10,
12664
- "parent_question_id": 42,
12665
- "key": null
12666
- },
12667
- {
12668
- "id": 33,
12669
- "question_type": "boolean",
12670
- "text": "Do you like poptarts?",
12671
- "responses": [
12672
- "t",
12673
- "f"
12674
- ],
12675
- "freeform": true,
12676
- "absolute_index": 10,
12677
- "parent_question_id": 42,
12678
- "key": null
12679
- },
12680
- {
12681
- "id": 34,
12682
- "question_type": "multiple",
12683
- "text": "Do you love poptarts?",
12684
- "responses": [
12685
- "Yes",
12686
- "No"
12687
- ],
12688
- "freeform": true,
12689
- "absolute_index": null,
12690
- "parent_question_id": null,
12691
- "key": null
12692
- },
12693
- {
12694
- "id": 35,
12695
- "question_type": "multiple",
12696
- "text": "Do you love poptarts?",
12697
- "responses": [
12698
- "Yes",
12699
- "No"
12700
- ],
12701
- "freeform": true,
12702
- "absolute_index": null,
12703
- "parent_question_id": null,
12704
- "key": null
12705
- },
12706
- {
12707
- "id": 36,
12708
- "question_type": "multiple",
12709
- "text": "Do you love poptarts?",
12710
- "responses": [
12711
- "Yes",
12712
- "No"
12713
- ],
12714
- "freeform": true,
12715
- "absolute_index": null,
12716
- "parent_question_id": null,
12717
- "key": "poptarts"
12718
- },
12719
- {
12720
- "id": 37,
12721
- "question_type": "boolean",
12722
- "text": "Do you like poptarts?",
12723
- "responses": [
12724
- "t",
12725
- "f"
12726
- ],
12727
- "freeform": true,
12728
- "absolute_index": 10,
12729
- "parent_question_id": 42,
12730
- "key": null
12731
- },
12732
- {
12733
- "id": 38,
12734
- "question_type": "boolean",
12735
- "text": "Do you like poptarts?",
12736
- "responses": [
12737
- "t",
12738
- "f"
12739
- ],
12740
- "freeform": true,
12741
- "absolute_index": 10,
12742
- "parent_question_id": 42,
12743
- "key": null
12744
- },
12745
- {
12746
- "id": 39,
12747
- "question_type": "boolean",
12748
- "text": "Do you like poptarts?",
12749
- "responses": [
12750
- "t",
12751
- "f"
12752
- ],
12753
- "freeform": true,
12754
- "absolute_index": 10,
12755
- "parent_question_id": 42,
12756
- "key": null
12757
- },
12758
- {
12759
- "id": 40,
12760
- "question_type": "boolean",
12761
- "text": "Do you like poptarts?",
12762
- "responses": [
12763
- "t",
12764
- "f"
12765
- ],
12766
- "freeform": true,
12767
- "absolute_index": 10,
12768
- "parent_question_id": 42,
12769
- "key": "poptarts"
12770
- },
12771
- {
12772
- "id": 41,
12773
- "question_type": "boolean",
12774
- "text": "Do you like poptarts?",
12775
- "responses": [
12776
- "t",
12777
- "f"
12778
- ],
12779
- "freeform": false,
12780
- "absolute_index": null,
12781
- "parent_question_id": null,
12782
- "key": "nyan"
12783
- },
12784
- {
12785
- "id": 42,
12786
- "question_type": "boolean",
12787
- "text": "Do you like poptarts?",
12788
- "responses": [
12789
- "t",
12790
- "f"
12791
- ],
12792
- "freeform": false,
12793
- "absolute_index": null,
12794
- "parent_question_id": null,
12795
- "key": "nyan"
12796
- },
12797
- {
12798
- "id": 43,
12799
- "question_type": "boolean",
12800
- "text": "Do you like poptarts?",
12801
- "responses": [
12802
- "t",
12803
- "f"
12804
- ],
12805
- "freeform": false,
12806
- "absolute_index": null,
12807
- "parent_question_id": null,
12808
- "key": "nyan"
12809
- },
12810
- {
12811
- "id": 44,
12812
- "question_type": "boolean",
12813
- "text": "Do you like poptarts?",
12814
- "responses": [
12815
- "t",
12816
- "f"
12817
- ],
12818
- "freeform": false,
12819
- "absolute_index": null,
12820
- "parent_question_id": null,
12821
- "key": "nyan"
12822
- },
12823
- {
12824
- "id": 45,
12825
- "question_type": "boolean",
12826
- "text": "Do you like poptarts?",
12827
- "responses": [
12828
- "t",
12829
- "f"
12830
- ],
12831
- "freeform": false,
12832
- "absolute_index": null,
12833
- "parent_question_id": null,
12834
- "key": "nyan"
12835
- },
12836
- {
12837
- "id": 46,
12838
- "question_type": "boolean",
12839
- "text": "Do you like poptarts?",
12840
- "responses": [
12841
- "t",
12842
- "f"
12843
- ],
12844
- "freeform": false,
12845
- "absolute_index": null,
12846
- "parent_question_id": null,
12847
- "key": "nyan"
12848
- },
12849
- {
12850
- "id": 47,
12851
- "question_type": "boolean",
12852
- "text": "Do you like poptarts?",
12853
- "responses": [
12854
- "t",
12855
- "f"
12856
- ],
12857
- "freeform": false,
12858
- "absolute_index": null,
12859
- "parent_question_id": null,
12860
- "key": "nyan"
12861
- },
12862
- {
12863
- "id": 48,
12864
- "question_type": "boolean",
12865
- "text": "Do you really like poptarts?",
12866
- "responses": [
12867
- "t",
12868
- "f"
12869
- ],
12870
- "freeform": false,
12871
- "absolute_index": null,
12872
- "parent_question_id": null,
12873
- "key": "nyan"
12874
- },
12875
- {
12876
- "id": 49,
12877
- "question_type": "boolean",
12878
- "text": "Do you like poptarts?",
12879
- "responses": [
12880
- "t",
12881
- "f"
12882
- ],
12883
- "freeform": false,
12884
- "absolute_index": null,
12885
- "parent_question_id": null,
12886
- "key": "frosted"
12887
- },
12888
- {
12889
- "id": 50,
12890
- "question_type": "boolean",
12891
- "text": "Do you like poptarts?",
12892
- "responses": [
12893
- "t",
12894
- "f"
12895
- ],
12896
- "freeform": false,
12897
- "absolute_index": null,
12898
- "parent_question_id": null,
12899
- "key": "frosted"
12900
- },
12901
- {
12902
- "id": 51,
12903
- "question_type": "boolean",
12904
- "text": "Do you like poptarts?",
12905
- "responses": [
12906
- "t",
12907
- "f"
12908
- ],
12909
- "freeform": false,
12910
- "absolute_index": null,
12911
- "parent_question_id": null,
12912
- "key": "frosted"
12913
- },
12914
- {
12915
- "id": 52,
12916
- "question_type": "boolean",
12917
- "text": "Do you like poptarts?",
12918
- "responses": [
12919
- "t",
12920
- "f"
12921
- ],
12922
- "freeform": false,
12923
- "absolute_index": null,
12924
- "parent_question_id": null,
12925
- "key": "frosted"
12926
- },
12927
- {
12928
- "id": 53,
12929
- "question_type": "boolean",
12930
- "text": "Do you like poptarts?",
12931
- "responses": [
12932
- "t",
12933
- "f"
12934
- ],
12935
- "freeform": false,
12936
- "absolute_index": null,
12937
- "parent_question_id": null,
12938
- "key": "frosted"
12939
- },
12940
- {
12941
- "id": 54,
12942
- "question_type": "boolean",
12943
- "text": "Do you like poptarts?",
12944
- "responses": [
12945
- "t",
12946
- "f"
12947
- ],
12948
- "freeform": false,
12949
- "absolute_index": null,
12950
- "parent_question_id": null,
12951
- "key": "frosted"
12952
- },
12953
- {
12954
- "id": 55,
12955
- "question_type": "boolean",
12956
- "text": "Do you like poptarts?",
12957
- "responses": [
12958
- "t",
12959
- "f"
12960
- ],
12961
- "freeform": false,
12962
- "absolute_index": null,
12963
- "parent_question_id": null,
12964
- "key": "what"
12965
- },
12966
- {
12967
- "id": 56,
12968
- "question_type": "boolean",
12969
- "text": "Do you like poptarts?",
12970
- "responses": [
12971
- "t",
12972
- "f"
12973
- ],
12974
- "freeform": false,
12975
- "absolute_index": null,
12976
- "parent_question_id": null,
12977
- "key": "what"
12978
- },
12979
- {
12980
- "id": 57,
12981
- "question_type": "boolean",
12982
- "text": "Do you like poptarts?",
12983
- "responses": [
12984
- "t",
12985
- "f"
12986
- ],
12987
- "freeform": false,
12988
- "absolute_index": null,
12989
- "parent_question_id": null,
12990
- "key": "qJQUbJDBQ6hpF6N9Q+zLcw=="
12991
- },
12992
- {
12993
- "id": 58,
12994
- "question_type": "boolean",
12995
- "text": "Do you like poptarts?",
12996
- "responses": [
12997
- "t",
12998
- "f"
12999
- ],
13000
- "freeform": false,
13001
- "absolute_index": null,
13002
- "parent_question_id": null,
13003
- "key": "xPlF8nL0uASmMp49hrkxTg=="
13004
- },
13005
- {
13006
- "id": 59,
13007
- "question_type": "boolean",
13008
- "text": "Do you like poptarts?",
13009
- "responses": [
13010
- "t",
13011
- "f"
13012
- ],
13013
- "freeform": false,
13014
- "absolute_index": null,
13015
- "parent_question_id": null,
13016
- "key": "LVyVxvlVCQh157o55jpnjA=="
13017
- },
13018
- {
13019
- "id": 60,
13020
- "question_type": "boolean",
13021
- "text": "Do you like poptarts?",
13022
- "responses": [
13023
- "t",
13024
- "f"
13025
- ],
13026
- "freeform": false,
13027
- "absolute_index": null,
13028
- "parent_question_id": null,
13029
- "key": "Z+xZh1IzJRXUu53SYeE9bg=="
13030
- },
13031
- {
13032
- "id": 61,
13033
- "question_type": "boolean",
13034
- "text": "Do you like poptarts?",
13035
- "responses": [
13036
- "t",
13037
- "f"
13038
- ],
13039
- "freeform": false,
13040
- "absolute_index": null,
13041
- "parent_question_id": null,
13042
- "key": "rIKtVMW3KdKfweWZ7PnrUA=="
13043
- },
13044
- {
13045
- "id": 62,
13046
- "question_type": "boolean",
13047
- "text": "Do you like poptarts?",
13048
- "responses": [
13049
- "t",
13050
- "f"
13051
- ],
13052
- "freeform": false,
13053
- "absolute_index": null,
13054
- "parent_question_id": null,
13055
- "key": "JzfnEqc7bqtaJxKdgul2UQ=="
13056
- },
13057
- {
13058
- "id": 63,
13059
- "question_type": "boolean",
13060
- "text": "Do you like poptarts?",
13061
- "responses": [
13062
- "t",
13063
- "f"
13064
- ],
13065
- "freeform": false,
13066
- "absolute_index": null,
13067
- "parent_question_id": null,
13068
- "key": "2JonyCUrRA7WVVdgGaKm7g=="
13069
- },
13070
- {
13071
- "id": 64,
13072
- "question_type": "boolean",
13073
- "text": "Do you like poptarts?",
13074
- "responses": [
13075
- "t",
13076
- "f"
13077
- ],
13078
- "freeform": false,
13079
- "absolute_index": null,
13080
- "parent_question_id": null,
13081
- "key": "testingooptarts"
13082
- },
13083
- {
13084
- "id": 65,
13085
- "question_type": "boolean",
13086
- "text": "Do you like poptarts?",
13087
- "responses": [
13088
- "t",
13089
- "f"
13090
- ],
13091
- "freeform": false,
13092
- "absolute_index": null,
13093
- "parent_question_id": null,
13094
- "key": null
13095
- },
13096
- {
13097
- "id": 66,
13098
- "question_type": "boolean",
13099
- "text": "Do you like poptarts?",
13100
- "responses": [
13101
- "t",
13102
- "f"
13103
- ],
13104
- "freeform": false,
13105
- "absolute_index": null,
13106
- "parent_question_id": null,
13107
- "key": null
13108
- },
13109
- {
13110
- "id": 67,
13111
- "question_type": "boolean",
13112
- "text": "Do you like poptarts?",
13113
- "responses": [
13114
- "t",
13115
- "f"
13116
- ],
13117
- "freeform": false,
13118
- "absolute_index": null,
13119
- "parent_question_id": null,
13120
- "key": null
13121
- },
13122
- {
13123
- "id": 68,
13124
- "question_type": "boolean",
13125
- "text": "Do you like poptarts?",
13126
- "responses": [
13127
- "t",
13128
- "f"
13129
- ],
13130
- "freeform": false,
13131
- "absolute_index": null,
13132
- "parent_question_id": null,
13133
- "key": null
13134
- },
13135
- {
13136
- "id": 69,
13137
- "question_type": "boolean",
13138
- "text": "Do you like poptarts?",
13139
- "responses": [
13140
- "t",
13141
- "f"
13142
- ],
13143
- "freeform": false,
13144
- "absolute_index": null,
13145
- "parent_question_id": null,
13146
- "key": null
13147
- },
13148
- {
13149
- "id": 70,
13150
- "question_type": "boolean",
13151
- "text": "Do you like poptarts?",
13152
- "responses": [
13153
- "t",
13154
- "f"
13155
- ],
13156
- "freeform": false,
13157
- "absolute_index": null,
13158
- "parent_question_id": null,
13159
- "key": null
13160
- },
13161
- {
13162
- "id": 71,
13163
- "question_type": "boolean",
13164
- "text": "Do you like poptarts?",
13165
- "responses": [
13166
- "t",
13167
- "f"
13168
- ],
13169
- "freeform": false,
13170
- "absolute_index": null,
13171
- "parent_question_id": null,
13172
- "key": null
13173
- },
13174
- {
13175
- "id": 72,
13176
- "question_type": "boolean",
13177
- "text": "Do you like poptarts?",
13178
- "responses": [
13179
- "t",
13180
- "f"
13181
- ],
13182
- "freeform": false,
13183
- "absolute_index": null,
13184
- "parent_question_id": null,
13185
- "key": null
13186
- },
13187
- {
13188
- "id": 73,
13189
- "question_type": "boolean",
13190
- "text": "Do you like poptarts?",
13191
- "responses": [
13192
- "t",
13193
- "f"
13194
- ],
13195
- "freeform": false,
13196
- "absolute_index": null,
13197
- "parent_question_id": null,
13198
- "key": null
13199
- },
13200
- {
13201
- "id": 74,
13202
- "question_type": "boolean",
13203
- "text": "Do you like poptarts?",
13204
- "responses": [
13205
- "t",
13206
- "f"
13207
- ],
13208
- "freeform": false,
13209
- "absolute_index": null,
13210
- "parent_question_id": null,
13211
- "key": null
13212
- },
13213
- {
13214
- "id": 75,
13215
- "question_type": "boolean",
13216
- "text": "Do you like poptarts?",
13217
- "responses": [
13218
- "t",
13219
- "f"
13220
- ],
13221
- "freeform": false,
13222
- "absolute_index": null,
13223
- "parent_question_id": null,
13224
- "key": null
13225
- },
13226
- {
13227
- "id": 76,
13228
- "question_type": "boolean",
13229
- "text": "Do you like poptarts?",
13230
- "responses": [
13231
- "t",
13232
- "f"
13233
- ],
13234
- "freeform": false,
13235
- "absolute_index": null,
13236
- "parent_question_id": null,
13237
- "key": null
13238
- },
13239
- {
13240
- "id": 77,
13241
- "question_type": "boolean",
13242
- "text": "Do you like poptarts?",
13243
- "responses": [
13244
- "t",
13245
- "f"
13246
- ],
13247
- "freeform": false,
13248
- "absolute_index": null,
13249
- "parent_question_id": null,
13250
- "key": null
13251
- },
13252
- {
13253
- "id": 78,
13254
- "question_type": "boolean",
13255
- "text": "Do you like poptarts?",
13256
- "responses": [
13257
- "t",
13258
- "f"
13259
- ],
13260
- "freeform": false,
13261
- "absolute_index": null,
13262
- "parent_question_id": null,
13263
- "key": null
13264
- },
13265
- {
13266
- "id": 79,
13267
- "question_type": "boolean",
13268
- "text": "Do you like poptarts?",
13269
- "responses": [
13270
- "t",
13271
- "f"
13272
- ],
13273
- "freeform": false,
13274
- "absolute_index": null,
13275
- "parent_question_id": null,
13276
- "key": null
12219
+ "created_at": "2014-10-18T17:30:43.405Z"
12220
+ }
12221
+ http_version:
12222
+ recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
12223
+ - request:
12224
+ method: put
12225
+ uri: http://localhost:3000/api/surveys/182/survey_questions/261
12226
+ body:
12227
+ encoding: UTF-8
12228
+ string: '{"id":261,"survey_question":{"answer":"At Home"}}'
12229
+ headers:
12230
+ User-Agent:
12231
+ - Faraday v0.9.0
12232
+ Content-Type:
12233
+ - application/json
12234
+ Api-Token:
12235
+ - testing
12236
+ User-Token:
12237
+ - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
12238
+ Service-User-Id:
12239
+ - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
12240
+ Accept-Encoding:
12241
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12242
+ Accept:
12243
+ - "*/*"
12244
+ response:
12245
+ status:
12246
+ code: 204
12247
+ message: 'No Content '
12248
+ headers:
12249
+ X-Frame-Options:
12250
+ - SAMEORIGIN
12251
+ X-Xss-Protection:
12252
+ - 1; mode=block
12253
+ X-Content-Type-Options:
12254
+ - nosniff
12255
+ X-Ua-Compatible:
12256
+ - chrome=1
12257
+ Cache-Control:
12258
+ - no-cache
12259
+ X-Request-Id:
12260
+ - 6d8a2c39-8583-48f0-8cf4-fe2ebc4e1384
12261
+ X-Runtime:
12262
+ - '0.010215'
12263
+ Server:
12264
+ - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
12265
+ Date:
12266
+ - Sat, 18 Oct 2014 17:30:43 GMT
12267
+ Connection:
12268
+ - Keep-Alive
12269
+ body:
12270
+ encoding: UTF-8
12271
+ string: ''
12272
+ http_version:
12273
+ recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
12274
+ - request:
12275
+ method: get
12276
+ uri: http://localhost:3000/api/surveys/182
12277
+ body:
12278
+ encoding: US-ASCII
12279
+ string: ''
12280
+ headers:
12281
+ User-Agent:
12282
+ - Faraday v0.9.0
12283
+ Content-Type:
12284
+ - application/json
12285
+ Api-Token:
12286
+ - testing
12287
+ User-Token:
12288
+ - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
12289
+ Service-User-Id:
12290
+ - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
12291
+ Accept-Encoding:
12292
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12293
+ Accept:
12294
+ - "*/*"
12295
+ response:
12296
+ status:
12297
+ code: 200
12298
+ message: 'OK '
12299
+ headers:
12300
+ X-Frame-Options:
12301
+ - SAMEORIGIN
12302
+ X-Xss-Protection:
12303
+ - 1; mode=block
12304
+ X-Content-Type-Options:
12305
+ - nosniff
12306
+ X-Ua-Compatible:
12307
+ - chrome=1
12308
+ Content-Type:
12309
+ - application/json; charset=utf-8
12310
+ Etag:
12311
+ - '"21a425e42a02d27f05c9e40208818d4a"'
12312
+ Cache-Control:
12313
+ - max-age=0, private, must-revalidate
12314
+ X-Request-Id:
12315
+ - 6228b7db-8d94-4ef8-8c45-9c6a1fd2a85a
12316
+ X-Runtime:
12317
+ - '0.013101'
12318
+ Server:
12319
+ - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
12320
+ Date:
12321
+ - Sat, 18 Oct 2014 17:30:43 GMT
12322
+ Content-Length:
12323
+ - '1198'
12324
+ Connection:
12325
+ - Keep-Alive
12326
+ body:
12327
+ encoding: UTF-8
12328
+ string: |-
12329
+ {
12330
+ "id": 182,
12331
+ "service_user_id": "8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471",
12332
+ "_links": {
12333
+ "self": {
12334
+ "href": "http://localhost:3000/api/surveys/182"
12335
+ },
12336
+ "survey_questions": {
12337
+ "post": {
12338
+ "href": "http://localhost:3000/api/surveys/182/survey_questions"
12339
+ },
12340
+ "put": {
12341
+ "href": "http://localhost:3000/api/surveys/182/survey_questions"
12342
+ }
12343
+ }
13277
12344
  },
12345
+ "completed": false,
12346
+ "survey_questions": [
12347
+ {
12348
+ "id": 261,
12349
+ "text": "Where are you?",
12350
+ "type": "multiple",
12351
+ "responses": [
12352
+ "At Home",
12353
+ "At Work",
12354
+ "In a car",
12355
+ "Other"
12356
+ ],
12357
+ "answer": "At Home",
12358
+ "freeform": true,
12359
+ "_links": {
12360
+ "self": {
12361
+ "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
12362
+ },
12363
+ "post": {
12364
+ "href": "http://localhost:3000/api/surveys/182/survey_questions"
12365
+ },
12366
+ "put": {
12367
+ "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
12368
+ },
12369
+ "survey": {
12370
+ "href": "http://localhost:3000/api/surveys/182"
12371
+ }
12372
+ },
12373
+ "created_at": "2014-10-18T17:30:43.405Z"
12374
+ }
12375
+ ]
12376
+ }
12377
+ http_version:
12378
+ recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
12379
+ - request:
12380
+ method: get
12381
+ uri: http://localhost:3000/
12382
+ body:
12383
+ encoding: US-ASCII
12384
+ string: ''
12385
+ headers:
12386
+ User-Agent:
12387
+ - Faraday v0.9.0
12388
+ Content-Type:
12389
+ - application/json
12390
+ Api-Token:
12391
+ - testing
12392
+ Accept-Encoding:
12393
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12394
+ Accept:
12395
+ - "*/*"
12396
+ response:
12397
+ status:
12398
+ code: 500
12399
+ message: 'Internal Server Error '
12400
+ headers:
12401
+ Content-Type:
12402
+ - text/html; charset=utf-8
12403
+ Content-Length:
12404
+ - '13174'
12405
+ X-Request-Id:
12406
+ - 5982ccc0-fce7-48e6-b1c1-6823c3116fd7
12407
+ X-Runtime:
12408
+ - '0.019436'
12409
+ Server:
12410
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
12411
+ Date:
12412
+ - Sat, 17 Jan 2015 13:45:54 GMT
12413
+ Connection:
12414
+ - Keep-Alive
12415
+ body:
12416
+ encoding: UTF-8
12417
+ string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
12418
+ />\n <title>Action Controller: Exception caught</title>\n <style>\n body
12419
+ {\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
12420
+ \ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
12421
+ arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
12422
+ \ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
12423
+ \ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
12424
+ 0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
12425
+ \ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
12426
+ \ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
12427
+ \ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
12428
+ \ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
12429
+ \ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
12430
+ \ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
12431
+ \ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
12432
+ none;\n }\n\n #container {\n box-sizing: border-box;\n width:
12433
+ 100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
12434
+ \ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
12435
+ \ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
12436
+ {\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
12437
+ {\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
12438
+ \ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
12439
+ {\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
12440
+ .5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
12441
+ \ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
12442
+ #F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
12443
+ \ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
12444
+ { color: #C52F24; }\n\n \n </style>\n\n <script>\n var toggle = function(id)
12445
+ {\n var s = document.getElementById(id).style;\n s.display = s.display
12446
+ == 'none' ? 'block' : 'none';\n return false;\n }\n var show =
12447
+ function(id) {\n document.getElementById(id).style.display = 'block';\n
12448
+ \ }\n var hide = function(id) {\n document.getElementById(id).style.display
12449
+ = 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
12450
+ \ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
12451
+ \ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
12452
+ \ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>\n PG::ConnectionBad\n
12453
+ \ </h1>\n</header>\n\n<div id=\"container\">\n <h2>could not connect to server:
12454
+ No such file or directory\n\tIs the server running locally and accepting\n\tconnections
12455
+ on Unix domain socket &quot;/tmp/.s.PGSQL.5432&quot;?\n</h2>\n\n \n \n<p><code>Rails.root:
12456
+ /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div id=\"traces\">\n
12457
+ \ <a href=\"#\" onclick=\"hide(&#39;Framework-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Application-Trace&#39;);;
12458
+ return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Framework-Trace&#39;);;
12459
+ return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Framework-Trace&#39;);show(&#39;Full-Trace&#39;);;
12460
+ return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
12461
+ block;\">\n <pre><code></code></pre>\n </div>\n <div id=\"Framework-Trace\"
12462
+ style=\"display: none;\">\n <pre><code>activerecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12463
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12464
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12465
+ `connect&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:556:in
12466
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
12467
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
12468
+ `postgresql_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
12469
+ `new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in
12470
+ `checkout_new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
12471
+ `acquire_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in
12472
+ `block in checkout&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
12473
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
12474
+ `checkout&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
12475
+ `block in connection&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
12476
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
12477
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in
12478
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:79:in
12479
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:53:in
12480
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:796:in
12481
+ `current_version&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:804:in
12482
+ `needs_migration?&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:383:in
12483
+ `check_pending!&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:370:in
12484
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:29:in
12485
+ `block in call&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:373:in
12486
+ `_run__4385228089887704791__call__callbacks&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:80:in
12487
+ `run_callbacks&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in
12488
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in
12489
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in
12490
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
12491
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
12492
+ `call&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties
12493
+ (4.0.4) lib/rails/rack/logger.rb:20:in `block in call&#39;\nactivesupport
12494
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged&#39;\nactivesupport
12495
+ (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged&#39;\nactivesupport
12496
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged&#39;\nrailties
12497
+ (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
12498
+ `call&#39;\nrack (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport
12499
+ (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call&#39;\nrack
12500
+ (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
12501
+ `call&#39;\nrailties (4.0.4) lib/rails/engine.rb:511:in `call&#39;\nrailties
12502
+ (4.0.4) lib/rails/application.rb:97:in `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in
12503
+ `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in `call&#39;\nrack
12504
+ (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
12505
+ `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
12506
+ `run&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/server.rb:295:in
12507
+ `block in start_thread&#39;</code></pre>\n </div>\n <div id=\"Full-Trace\"
12508
+ style=\"display: none;\">\n <pre><code>activerecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12509
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12510
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
12511
+ `connect&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:556:in
12512
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
12513
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
12514
+ `postgresql_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
12515
+ `new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in
12516
+ `checkout_new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
12517
+ `acquire_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in
12518
+ `block in checkout&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
12519
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
12520
+ `checkout&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
12521
+ `block in connection&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
12522
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
12523
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in
12524
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:79:in
12525
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:53:in
12526
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:796:in
12527
+ `current_version&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:804:in
12528
+ `needs_migration?&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:383:in
12529
+ `check_pending!&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:370:in
12530
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:29:in
12531
+ `block in call&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:373:in
12532
+ `_run__4385228089887704791__call__callbacks&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:80:in
12533
+ `run_callbacks&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in
12534
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in
12535
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in
12536
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
12537
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
12538
+ `call&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties
12539
+ (4.0.4) lib/rails/rack/logger.rb:20:in `block in call&#39;\nactivesupport
12540
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged&#39;\nactivesupport
12541
+ (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged&#39;\nactivesupport
12542
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged&#39;\nrailties
12543
+ (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
12544
+ `call&#39;\nrack (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport
12545
+ (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call&#39;\nrack
12546
+ (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
12547
+ `call&#39;\nrailties (4.0.4) lib/rails/engine.rb:511:in `call&#39;\nrailties
12548
+ (4.0.4) lib/rails/application.rb:97:in `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in
12549
+ `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in `call&#39;\nrack
12550
+ (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
12551
+ `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
12552
+ `run&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/server.rb:295:in
12553
+ `block in start_thread&#39;</code></pre>\n </div>\n</div>\n\n \n\n<h2
12554
+ style=\"margin-top: 30px\">Request</h2>\n<p><b>Parameters</b>:</p> <pre>None</pre>\n\n<div
12555
+ class=\"details\">\n <div class=\"summary\"><a href=\"#\" onclick=\"return
12556
+ toggleSessionDump()\">Toggle session dump</a></div>\n <div id=\"session_dump\"
12557
+ style=\"display:none\"><pre></pre></div>\n</div>\n\n<div class=\"details\">\n
12558
+ \ <div class=\"summary\"><a href=\"#\" onclick=\"return toggleEnvDump()\">Toggle
12559
+ env dump</a></div>\n <div id=\"env_dump\" style=\"display:none\"><pre>GATEWAY_INTERFACE:
12560
+ &quot;CGI/1.1&quot;\nHTTP_ACCEPT: &quot;*/*&quot;\nHTTP_ACCEPT_ENCODING: &quot;gzip;q=1.0,deflate;q=0.6,identity;q=0.3&quot;\nREMOTE_ADDR:
12561
+ &quot;127.0.0.1&quot;\nREMOTE_HOST: &quot;127.0.0.1&quot;\nSERVER_NAME: &quot;localhost&quot;\nSERVER_PROTOCOL:
12562
+ &quot;HTTP/1.1&quot;</pre></div>\n</div>\n\n<h2 style=\"margin-top: 30px\">Response</h2>\n<p><b>Headers</b>:</p>
12563
+ <pre>None</pre>\n\n</div>\n\n\n</body>\n</html>\n"
12564
+ http_version:
12565
+ recorded_at: Sat, 17 Jan 2015 13:45:54 GMT
12566
+ - request:
12567
+ method: get
12568
+ uri: http://localhost:3000/api/questions
12569
+ body:
12570
+ encoding: US-ASCII
12571
+ string: ''
12572
+ headers:
12573
+ User-Agent:
12574
+ - Faraday v0.9.0
12575
+ Content-Type:
12576
+ - application/json
12577
+ Api-Token:
12578
+ - testing
12579
+ User-Token:
12580
+ - 4c9403c233fdbabbb0b1d53fd6c65c3d47f06b9be3f087319622db6955c1576b
12581
+ Service-User-Id:
12582
+ - 390e397336a3e2e0a362bf10e93b02b7cff7b821f348bac902806688dfdf7121
12583
+ Accept-Encoding:
12584
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12585
+ Accept:
12586
+ - "*/*"
12587
+ response:
12588
+ status:
12589
+ code: 200
12590
+ message: 'OK '
12591
+ headers:
12592
+ X-Frame-Options:
12593
+ - SAMEORIGIN
12594
+ X-Xss-Protection:
12595
+ - 1; mode=block
12596
+ X-Content-Type-Options:
12597
+ - nosniff
12598
+ X-Ua-Compatible:
12599
+ - chrome=1
12600
+ Content-Type:
12601
+ - application/json; charset=utf-8
12602
+ Etag:
12603
+ - '"91dfe37b1aa95288ae4f64eae420615a"'
12604
+ Cache-Control:
12605
+ - max-age=0, private, must-revalidate
12606
+ X-Request-Id:
12607
+ - d6ca1660-a63c-4ec8-9a91-0c3e154bc9a7
12608
+ X-Runtime:
12609
+ - '0.021503'
12610
+ Server:
12611
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
12612
+ Date:
12613
+ - Sat, 17 Jan 2015 13:48:57 GMT
12614
+ Content-Length:
12615
+ - '15116'
12616
+ Connection:
12617
+ - Keep-Alive
12618
+ body:
12619
+ encoding: UTF-8
12620
+ string: |-
12621
+ [
13278
12622
  {
13279
- "id": 80,
13280
- "question_type": "boolean",
13281
- "text": "Do you like poptarts?",
12623
+ "id": 1,
12624
+ "question_type": "multiple",
12625
+ "text": "How hungry or full are you right now?",
13282
12626
  "responses": [
13283
- "t",
13284
- "f"
12627
+ "Very hungry",
12628
+ "Somewhat hungry",
12629
+ "Neither full nor hungry",
12630
+ "Somewhat full",
12631
+ "Very full"
13285
12632
  ],
13286
- "freeform": false,
13287
- "absolute_index": null,
13288
- "parent_question_id": null,
13289
- "key": null
12633
+ "key": "how_hungry_are_you",
12634
+ "_links": {
12635
+ "self": {
12636
+ "href": "http://localhost:3000/api/questions/1"
12637
+ }
12638
+ }
13290
12639
  },
13291
12640
  {
13292
- "id": 81,
13293
- "question_type": "boolean",
13294
- "text": "Do you like poptarts?",
13295
- "responses": [
13296
- "t",
13297
- "f"
13298
- ],
13299
- "freeform": false,
13300
- "absolute_index": null,
13301
- "parent_question_id": null,
13302
- "key": null
12641
+ "id": 2,
12642
+ "question_type": "time",
12643
+ "text": "What time did you wake up this morning?",
12644
+ "responses": null,
12645
+ "key": "what_time_did_you_wake_up",
12646
+ "_links": {
12647
+ "self": {
12648
+ "href": "http://localhost:3000/api/questions/2"
12649
+ }
12650
+ }
13303
12651
  },
13304
12652
  {
13305
- "id": 82,
13306
- "question_type": "boolean",
13307
- "text": "Do you like poptarts?",
13308
- "responses": [
13309
- "t",
13310
- "f"
13311
- ],
13312
- "freeform": false,
13313
- "absolute_index": null,
13314
- "parent_question_id": null,
13315
- "key": null
12653
+ "id": 3,
12654
+ "question_type": "time",
12655
+ "text": "What time did you got to sleep last night?",
12656
+ "responses": null,
12657
+ "key": "what_time_did_you_sleep",
12658
+ "_links": {
12659
+ "self": {
12660
+ "href": "http://localhost:3000/api/questions/3"
12661
+ }
12662
+ }
13316
12663
  },
13317
12664
  {
13318
- "id": 83,
13319
- "question_type": "boolean",
13320
- "text": "Do you like poptarts?",
12665
+ "id": 4,
12666
+ "question_type": "multiple",
12667
+ "text": "Are you judging or evaluating yourself right now (i.e. at the moment just before you were notified)?",
13321
12668
  "responses": [
13322
- "t",
13323
- "f"
12669
+ "f",
12670
+ "Yes - Negatively",
12671
+ "Yes - Neutrally",
12672
+ "Yes - Positively"
13324
12673
  ],
13325
- "freeform": false,
13326
- "absolute_index": null,
13327
- "parent_question_id": null,
13328
- "key": null
12674
+ "key": "are_you_judging_yourself",
12675
+ "_links": {
12676
+ "self": {
12677
+ "href": "http://localhost:3000/api/questions/4"
12678
+ }
12679
+ }
13329
12680
  },
13330
12681
  {
13331
- "id": 84,
13332
- "question_type": "boolean",
13333
- "text": "Do you like poptarts?",
12682
+ "id": 5,
12683
+ "question_type": "range",
12684
+ "text": "How well did you sleep last night?",
13334
12685
  "responses": [
13335
- "t",
13336
- "f"
12686
+ "0",
12687
+ "10"
13337
12688
  ],
13338
- "freeform": false,
13339
- "absolute_index": null,
13340
- "parent_question_id": null,
13341
- "key": "testingooptarts"
12689
+ "key": "how_well_did_you_sleep",
12690
+ "_links": {
12691
+ "self": {
12692
+ "href": "http://localhost:3000/api/questions/5"
12693
+ }
12694
+ }
13342
12695
  },
13343
12696
  {
13344
- "id": 85,
13345
- "question_type": "boolean",
13346
- "text": "Do you like poptarts?",
12697
+ "id": 6,
12698
+ "question_type": "range",
12699
+ "text": "To what extent are you engrossed in what you are doing?",
13347
12700
  "responses": [
13348
- "t",
13349
- "f"
12701
+ "0",
12702
+ "10"
13350
12703
  ],
13351
- "freeform": false,
13352
- "absolute_index": null,
13353
- "parent_question_id": null,
13354
- "key": null
12704
+ "key": "what_extent_are_you_engrossed",
12705
+ "_links": {
12706
+ "self": {
12707
+ "href": "http://localhost:3000/api/questions/6"
12708
+ }
12709
+ }
13355
12710
  },
13356
12711
  {
13357
- "id": 86,
13358
- "question_type": "boolean",
13359
- "text": "Do you like poptarts?",
12712
+ "id": 7,
12713
+ "question_type": "multiple",
12714
+ "text": "Are you judging or evaluating what you are doing right now (i.e. at the moment just before you were notified?)",
13360
12715
  "responses": [
13361
- "t",
13362
- "f"
12716
+ "f",
12717
+ "Yes - Negatively",
12718
+ "Yes - Neutrally",
12719
+ "Yes - Positively"
13363
12720
  ],
13364
- "freeform": false,
13365
- "absolute_index": null,
13366
- "parent_question_id": null,
13367
- "key": "testingooptarts"
12721
+ "key": "are_you_judging_or_evaluating_what_you_are_doing",
12722
+ "_links": {
12723
+ "self": {
12724
+ "href": "http://localhost:3000/api/questions/7"
12725
+ }
12726
+ }
13368
12727
  },
13369
12728
  {
13370
- "id": 87,
12729
+ "id": 8,
13371
12730
  "question_type": "boolean",
13372
- "text": "Do you like poptarts?",
12731
+ "text": "In the past 24 hours, have you engaged in sexual activity with another person?",
13373
12732
  "responses": [
13374
12733
  "t",
13375
12734
  "f"
13376
12735
  ],
13377
- "freeform": false,
13378
- "absolute_index": null,
13379
- "parent_question_id": null,
13380
- "key": null
12736
+ "key": "had_sex",
12737
+ "_links": {
12738
+ "self": {
12739
+ "href": "http://localhost:3000/api/questions/8"
12740
+ }
12741
+ }
13381
12742
  },
13382
12743
  {
13383
- "id": 88,
13384
- "question_type": "boolean",
13385
- "text": "Do you like poptarts?",
12744
+ "id": 9,
12745
+ "question_type": "multiple",
12746
+ "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?",
13386
12747
  "responses": [
13387
- "t",
13388
- "f"
12748
+ "0",
12749
+ "1",
12750
+ "2",
12751
+ "3",
12752
+ "4",
12753
+ "5",
12754
+ "6",
12755
+ "7",
12756
+ "8",
12757
+ "9",
12758
+ "10"
13389
12759
  ],
13390
- "freeform": false,
13391
- "absolute_index": null,
13392
- "parent_question_id": null,
13393
- "key": "testingooptarts"
12760
+ "key": "how_much_would_you_give_to_stranger",
12761
+ "_links": {
12762
+ "self": {
12763
+ "href": "http://localhost:3000/api/questions/9"
12764
+ }
12765
+ }
13394
12766
  },
13395
12767
  {
13396
- "id": 89,
12768
+ "id": 10,
13397
12769
  "question_type": "boolean",
13398
- "text": "Do you like poptarts?",
12770
+ "text": "Have you surprised someone with a gift (including small gifts) in the last week?",
13399
12771
  "responses": [
13400
12772
  "t",
13401
12773
  "f"
13402
12774
  ],
13403
- "freeform": false,
13404
- "absolute_index": null,
13405
- "parent_question_id": null,
13406
- "key": null
12775
+ "key": "have_you_surprised_someone",
12776
+ "_links": {
12777
+ "self": {
12778
+ "href": "http://localhost:3000/api/questions/10"
12779
+ }
12780
+ }
13407
12781
  },
13408
12782
  {
13409
- "id": 90,
13410
- "question_type": "boolean",
13411
- "text": "Do you like poptarts?",
12783
+ "id": 11,
12784
+ "question_type": "multiple",
12785
+ "text": "In general, how is your health?",
13412
12786
  "responses": [
13413
- "t",
13414
- "f"
12787
+ "Excellent",
12788
+ "Very Good",
12789
+ "Good",
12790
+ "Fair",
12791
+ "Poor"
13415
12792
  ],
13416
- "freeform": false,
13417
- "absolute_index": null,
13418
- "parent_question_id": null,
13419
- "key": "testingooptarts"
12793
+ "key": "how_is_your_health",
12794
+ "_links": {
12795
+ "self": {
12796
+ "href": "http://localhost:3000/api/questions/11"
12797
+ }
12798
+ }
13420
12799
  },
13421
12800
  {
13422
- "id": 91,
13423
- "question_type": "boolean",
13424
- "text": "Do you like poptarts?",
12801
+ "id": 12,
12802
+ "question_type": "range",
12803
+ "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.",
13425
12804
  "responses": [
13426
- "t",
13427
- "f"
12805
+ "0",
12806
+ "10"
13428
12807
  ],
13429
- "freeform": false,
13430
- "absolute_index": null,
13431
- "parent_question_id": null,
13432
- "key": null
12808
+ "key": "ladder",
12809
+ "_links": {
12810
+ "self": {
12811
+ "href": "http://localhost:3000/api/questions/12"
12812
+ }
12813
+ }
13433
12814
  },
13434
12815
  {
13435
- "id": 92,
13436
- "question_type": "boolean",
13437
- "text": "Do you like poptarts?",
12816
+ "id": 13,
12817
+ "question_type": "range",
12818
+ "text": "To what extent is what you're doing interesting?",
13438
12819
  "responses": [
13439
- "t",
13440
- "f"
12820
+ "0",
12821
+ "10"
13441
12822
  ],
13442
- "freeform": false,
13443
- "absolute_index": null,
13444
- "parent_question_id": null,
13445
- "key": "testingooptarts"
12823
+ "key": "what_extent_interesting",
12824
+ "_links": {
12825
+ "self": {
12826
+ "href": "http://localhost:3000/api/questions/13"
12827
+ }
12828
+ }
13446
12829
  },
13447
12830
  {
13448
- "id": 93,
13449
- "question_type": "boolean",
13450
- "text": "Do you like poptarts?",
12831
+ "id": 14,
12832
+ "question_type": "multiple",
12833
+ "text": "On average, how many hours do you work each week?",
13451
12834
  "responses": [
13452
- "t",
13453
- "f"
12835
+ "Less than 5",
12836
+ "5-10",
12837
+ "10-20",
12838
+ "20-30",
12839
+ "30-40",
12840
+ "40-50",
12841
+ "50-60",
12842
+ "60-70",
12843
+ "More than 70"
13454
12844
  ],
13455
- "freeform": false,
13456
- "absolute_index": null,
13457
- "parent_question_id": null,
13458
- "key": null
12845
+ "key": "how_many_hours_do_you_work",
12846
+ "_links": {
12847
+ "self": {
12848
+ "href": "http://localhost:3000/api/questions/14"
12849
+ }
12850
+ }
13459
12851
  },
13460
12852
  {
13461
- "id": 94,
13462
- "question_type": "boolean",
13463
- "text": "Do you like poptarts?",
12853
+ "id": 15,
12854
+ "question_type": "range",
12855
+ "text": "How do you feel right now?",
13464
12856
  "responses": [
13465
- "t",
13466
- "f"
12857
+ "0",
12858
+ "10"
13467
12859
  ],
13468
- "freeform": false,
13469
- "absolute_index": null,
13470
- "parent_question_id": null,
13471
- "key": null
12860
+ "key": "how_do_you_feel_right_now",
12861
+ "_links": {
12862
+ "self": {
12863
+ "href": "http://localhost:3000/api/questions/15"
12864
+ }
12865
+ }
13472
12866
  },
13473
12867
  {
13474
- "id": 95,
13475
- "question_type": "boolean",
13476
- "text": "Do you like poptarts?",
12868
+ "id": 16,
12869
+ "question_type": "range",
12870
+ "text": "To what extent do you expect good things to happen in the future?",
13477
12871
  "responses": [
13478
- "t",
13479
- "f"
12872
+ "0",
12873
+ "10"
13480
12874
  ],
13481
- "freeform": false,
13482
- "absolute_index": null,
13483
- "parent_question_id": null,
13484
- "key": null
12875
+ "key": "good_things_future",
12876
+ "_links": {
12877
+ "self": {
12878
+ "href": "http://localhost:3000/api/questions/16"
12879
+ }
12880
+ }
13485
12881
  },
13486
12882
  {
13487
- "id": 96,
12883
+ "id": 17,
13488
12884
  "question_type": "boolean",
13489
- "text": "Do you like poptarts?",
12885
+ "text": "Have you taken any over-the-counter pain medication in the past 24 hours?",
13490
12886
  "responses": [
13491
12887
  "t",
13492
12888
  "f"
13493
12889
  ],
13494
- "freeform": false,
13495
- "absolute_index": null,
13496
- "parent_question_id": null,
13497
- "key": null
12890
+ "key": "pain_medication",
12891
+ "_links": {
12892
+ "self": {
12893
+ "href": "http://localhost:3000/api/questions/17"
12894
+ }
12895
+ }
13498
12896
  },
13499
12897
  {
13500
- "id": 97,
13501
- "question_type": "boolean",
13502
- "text": "Do you like poptarts?",
12898
+ "id": 18,
12899
+ "question_type": "range",
12900
+ "text": "To what extent have you procrastinated so far today?",
13503
12901
  "responses": [
13504
- "t",
13505
- "f"
12902
+ "0",
12903
+ "10"
13506
12904
  ],
13507
- "freeform": false,
13508
- "absolute_index": null,
13509
- "parent_question_id": null,
13510
- "key": null
12905
+ "key": "procrastinated",
12906
+ "_links": {
12907
+ "self": {
12908
+ "href": "http://localhost:3000/api/questions/18"
12909
+ }
12910
+ }
13511
12911
  },
13512
12912
  {
13513
- "id": 98,
13514
- "question_type": "boolean",
13515
- "text": "Do you like poptarts?",
12913
+ "id": 19,
12914
+ "question_type": "range",
12915
+ "text": "To what extent are you being productive?",
13516
12916
  "responses": [
13517
- "t",
13518
- "f"
12917
+ "0",
12918
+ "10"
13519
12919
  ],
13520
- "freeform": false,
13521
- "absolute_index": null,
13522
- "parent_question_id": null,
13523
- "key": null
12920
+ "key": "productive",
12921
+ "_links": {
12922
+ "self": {
12923
+ "href": "http://localhost:3000/api/questions/19"
12924
+ }
12925
+ }
13524
12926
  },
13525
12927
  {
13526
- "id": 99,
13527
- "question_type": "boolean",
13528
- "text": "Do you like poptarts?",
12928
+ "id": 20,
12929
+ "question_type": "multiple",
12930
+ "text": "Who are you talking or interacting with?",
13529
12931
  "responses": [
13530
- "t",
13531
- "f"
12932
+ "Spouse/partner/significant other",
12933
+ "Children",
12934
+ "Parents",
12935
+ "Other relatives",
12936
+ "Friends",
12937
+ "Acquaintances",
12938
+ "Strangers",
12939
+ "Co-workers",
12940
+ "Customers/students",
12941
+ "Boss",
12942
+ "No one"
13532
12943
  ],
13533
- "freeform": false,
13534
- "absolute_index": null,
13535
- "parent_question_id": null,
13536
- "key": "testingooptarts"
12944
+ "key": "who_are_you_talking_with",
12945
+ "_links": {
12946
+ "self": {
12947
+ "href": "http://localhost:3000/api/questions/20"
12948
+ }
12949
+ }
13537
12950
  },
13538
12951
  {
13539
- "id": 100,
13540
- "question_type": "boolean",
13541
- "text": "Do you like poptarts?",
12952
+ "id": 27,
12953
+ "question_type": "multiple",
12954
+ "text": "How many people are you talking or interacting with?",
13542
12955
  "responses": [
13543
- "t",
13544
- "f"
12956
+ "0",
12957
+ "1",
12958
+ "2",
12959
+ "3",
12960
+ "4",
12961
+ "5",
12962
+ "6",
12963
+ "7",
12964
+ "8",
12965
+ "9",
12966
+ "10",
12967
+ "More than 10"
13545
12968
  ],
13546
- "freeform": false,
13547
- "absolute_index": null,
13548
- "parent_question_id": null,
13549
- "key": null
12969
+ "key": "how_many_people_are_you_talking_with",
12970
+ "_links": {
12971
+ "self": {
12972
+ "href": "http://localhost:3000/api/questions/27"
12973
+ }
12974
+ }
13550
12975
  },
13551
12976
  {
13552
- "id": 101,
13553
- "question_type": "boolean",
13554
- "text": "Do you like poptarts?",
12977
+ "id": 21,
12978
+ "question_type": "range",
12979
+ "text": "To what extent do you feel accepted by the person/people you are interacting with?",
13555
12980
  "responses": [
13556
- "t",
13557
- "f"
12981
+ "0",
12982
+ "10"
13558
12983
  ],
13559
- "freeform": false,
13560
- "absolute_index": null,
13561
- "parent_question_id": null,
13562
- "key": "testingooptarts"
12984
+ "key": null,
12985
+ "_links": {
12986
+ "self": {
12987
+ "href": "http://localhost:3000/api/questions/21"
12988
+ }
12989
+ }
13563
12990
  },
13564
12991
  {
13565
- "id": 102,
12992
+ "id": 22,
13566
12993
  "question_type": "boolean",
13567
- "text": "Do you like poptarts?",
12994
+ "text": "Are you alone?",
13568
12995
  "responses": [
13569
12996
  "t",
13570
12997
  "f"
13571
12998
  ],
13572
- "freeform": false,
13573
- "absolute_index": null,
13574
- "parent_question_id": null,
13575
- "key": null
12999
+ "key": "are_you_alone",
13000
+ "_links": {
13001
+ "self": {
13002
+ "href": "http://localhost:3000/api/questions/22"
13003
+ }
13004
+ }
13576
13005
  },
13577
13006
  {
13578
- "id": 103,
13007
+ "id": 23,
13579
13008
  "question_type": "boolean",
13580
- "text": "Do you like poptarts?",
13009
+ "text": "Do you want to do what you're doing?",
13581
13010
  "responses": [
13582
13011
  "t",
13583
13012
  "f"
13584
13013
  ],
13585
- "freeform": false,
13586
- "absolute_index": null,
13587
- "parent_question_id": null,
13588
- "key": "testingooptarts"
13014
+ "key": "do_you_want_to_do_what_youre_doing",
13015
+ "_links": {
13016
+ "self": {
13017
+ "href": "http://localhost:3000/api/questions/23"
13018
+ }
13019
+ }
13589
13020
  },
13590
13021
  {
13591
- "id": 104,
13022
+ "id": 24,
13592
13023
  "question_type": "boolean",
13593
- "text": "Do you like poptarts?",
13024
+ "text": "Are you talking or interacting with anyone?",
13594
13025
  "responses": [
13595
13026
  "t",
13596
13027
  "f"
13597
13028
  ],
13598
- "freeform": false,
13599
- "absolute_index": null,
13600
- "parent_question_id": null,
13601
- "key": null
13029
+ "key": "are_you_talking_to_anyone",
13030
+ "_links": {
13031
+ "self": {
13032
+ "href": "http://localhost:3000/api/questions/24"
13033
+ }
13034
+ }
13602
13035
  },
13603
13036
  {
13604
- "id": 105,
13605
- "question_type": "boolean",
13606
- "text": "Do you like poptarts?",
13037
+ "id": 25,
13038
+ "question_type": "multiple",
13039
+ "text": "Where are you?",
13607
13040
  "responses": [
13608
- "t",
13609
- "f"
13041
+ "At Home",
13042
+ "At Work",
13043
+ "In a car",
13044
+ "Other"
13610
13045
  ],
13611
- "freeform": false,
13612
- "absolute_index": null,
13613
- "parent_question_id": null,
13614
- "key": "testingooptarts"
13046
+ "key": "where_are_you",
13047
+ "_links": {
13048
+ "self": {
13049
+ "href": "http://localhost:3000/api/questions/25"
13050
+ }
13051
+ }
13615
13052
  },
13616
13053
  {
13617
- "id": 106,
13618
- "question_type": "boolean",
13619
- "text": "Do you like poptarts?",
13054
+ "id": 26,
13055
+ "question_type": "multiple",
13056
+ "text": "What are you doing?",
13620
13057
  "responses": [
13621
- "t",
13622
- "f"
13058
+ "Eating",
13059
+ "Bathroom",
13060
+ "Working"
13623
13061
  ],
13624
- "freeform": false,
13625
- "absolute_index": null,
13626
- "parent_question_id": null,
13627
- "key": null
13062
+ "key": "what_are_you_doing",
13063
+ "_links": {
13064
+ "self": {
13065
+ "href": "http://localhost:3000/api/questions/26"
13066
+ }
13067
+ }
13628
13068
  },
13629
13069
  {
13630
- "id": 107,
13070
+ "id": 28,
13631
13071
  "question_type": "boolean",
13632
- "text": "Do you like poptarts?",
13072
+ "text": "Do you have to do what you're doing?",
13633
13073
  "responses": [
13634
13074
  "t",
13635
13075
  "f"
13636
13076
  ],
13637
- "freeform": false,
13638
- "absolute_index": null,
13639
- "parent_question_id": null,
13640
- "key": "testingooptarts"
13077
+ "key": "do_you_have_to_do_what_youre_doing",
13078
+ "_links": {
13079
+ "self": {
13080
+ "href": "http://localhost:3000/api/questions/28"
13081
+ }
13082
+ }
13641
13083
  },
13642
13084
  {
13643
- "id": 108,
13644
- "question_type": "boolean",
13645
- "text": "Do you like poptarts?",
13085
+ "id": 29,
13086
+ "question_type": "range",
13087
+ "text": "To what extent are you focused on what you are doing?",
13646
13088
  "responses": [
13647
- "t",
13648
- "f"
13089
+ "0",
13090
+ "10"
13649
13091
  ],
13650
- "freeform": false,
13651
- "absolute_index": null,
13652
- "parent_question_id": null,
13653
- "key": null
13092
+ "key": "how_focused",
13093
+ "_links": {
13094
+ "self": {
13095
+ "href": "http://localhost:3000/api/questions/29"
13096
+ }
13097
+ }
13654
13098
  },
13655
13099
  {
13656
- "id": 109,
13657
- "question_type": "boolean",
13658
- "text": "Do you like poptarts?",
13100
+ "id": 30,
13101
+ "question_type": "multiple",
13102
+ "text": "When did you last check Facebook?",
13659
13103
  "responses": [
13660
- "t",
13661
- "f"
13104
+ "Right now",
13105
+ "In the last 5 minutes",
13106
+ "In the last 15 minutes",
13107
+ "In the last 30 minutes",
13108
+ "In the last hour",
13109
+ "1-2 hours ago",
13110
+ "3-5 hours ago",
13111
+ "6-12 hours ago",
13112
+ "24 hours ago",
13113
+ "Don't use facebook"
13662
13114
  ],
13663
- "freeform": false,
13664
- "absolute_index": null,
13665
- "parent_question_id": null,
13666
- "key": "testingooptarts"
13115
+ "key": "when_did_last_check_facebook",
13116
+ "_links": {
13117
+ "self": {
13118
+ "href": "http://localhost:3000/api/questions/30"
13119
+ }
13120
+ }
13667
13121
  },
13668
13122
  {
13669
- "id": 110,
13670
- "question_type": "boolean",
13671
- "text": "Do you like poptarts?",
13123
+ "id": 31,
13124
+ "question_type": "multiple",
13125
+ "text": "Beyond any work you've already done today, how many additional hours do you expect to work today?",
13672
13126
  "responses": [
13673
- "t",
13674
- "f"
13127
+ "0 (none)",
13128
+ "Less than 1 hour",
13129
+ "1-2 hours",
13130
+ "2-3 hours",
13131
+ "3-4 hours",
13132
+ "4-5 hours",
13133
+ "5-6 hours"
13675
13134
  ],
13676
- "freeform": false,
13677
- "absolute_index": null,
13678
- "parent_question_id": null,
13679
- "key": null
13135
+ "key": "how_many_additional_work_hours",
13136
+ "_links": {
13137
+ "self": {
13138
+ "href": "http://localhost:3000/api/questions/31"
13139
+ }
13140
+ }
13680
13141
  },
13681
13142
  {
13682
- "id": 111,
13143
+ "id": 32,
13683
13144
  "question_type": "boolean",
13684
- "text": "Do you like poptarts?",
13145
+ "text": "If you could, and it had no negative consequences, would you jump forward in time 24 hours?",
13685
13146
  "responses": [
13686
13147
  "t",
13687
13148
  "f"
13688
13149
  ],
13689
- "freeform": false,
13690
- "absolute_index": null,
13691
- "parent_question_id": null,
13692
- "key": "testingooptarts"
13150
+ "key": "jump_forward_24_hours",
13151
+ "_links": {
13152
+ "self": {
13153
+ "href": "http://localhost:3000/api/questions/32"
13154
+ }
13155
+ }
13693
13156
  },
13694
13157
  {
13695
- "id": 112,
13158
+ "id": 33,
13696
13159
  "question_type": "boolean",
13697
13160
  "text": "Do you like poptarts?",
13698
13161
  "responses": [
13699
13162
  "t",
13700
13163
  "f"
13701
13164
  ],
13702
- "freeform": true,
13703
- "absolute_index": 10,
13704
- "parent_question_id": 42,
13705
- "key": "poptarts"
13165
+ "key": "poptarts",
13166
+ "_links": {
13167
+ "self": {
13168
+ "href": "http://localhost:3000/api/questions/33"
13169
+ }
13170
+ }
13706
13171
  },
13707
13172
  {
13708
- "id": 113,
13173
+ "id": 34,
13709
13174
  "question_type": "multiple",
13710
13175
  "text": "Do you like poptarts?",
13711
13176
  "responses": [
13712
13177
  "Yes",
13713
13178
  "No"
13714
13179
  ],
13715
- "freeform": false,
13716
- "absolute_index": null,
13717
- "parent_question_id": null,
13718
- "key": null
13180
+ "key": null,
13181
+ "_links": {
13182
+ "self": {
13183
+ "href": "http://localhost:3000/api/questions/34"
13184
+ }
13185
+ }
13719
13186
  },
13720
13187
  {
13721
- "id": 114,
13188
+ "id": 35,
13722
13189
  "question_type": "range",
13723
13190
  "text": "Do you like poptarts?",
13724
13191
  "responses": [
13725
13192
  "0",
13726
13193
  "10"
13727
13194
  ],
13728
- "freeform": false,
13729
- "absolute_index": null,
13730
- "parent_question_id": null,
13731
- "key": null
13195
+ "key": null,
13196
+ "_links": {
13197
+ "self": {
13198
+ "href": "http://localhost:3000/api/questions/35"
13199
+ }
13200
+ }
13732
13201
  },
13733
13202
  {
13734
- "id": 115,
13203
+ "id": 36,
13735
13204
  "question_type": "boolean",
13736
13205
  "text": "Do you like poptarts?",
13737
13206
  "responses": [
13738
13207
  "t",
13739
13208
  "f"
13740
13209
  ],
13741
- "freeform": false,
13742
- "absolute_index": null,
13743
- "parent_question_id": null,
13744
- "key": null
13210
+ "key": "poptarts",
13211
+ "_links": {
13212
+ "self": {
13213
+ "href": "http://localhost:3000/api/questions/36"
13214
+ }
13215
+ }
13745
13216
  },
13746
13217
  {
13747
- "id": 116,
13218
+ "id": 37,
13748
13219
  "question_type": "boolean",
13749
13220
  "text": "Do you like poptarts?",
13750
13221
  "responses": [
13751
13222
  "t",
13752
13223
  "f"
13753
13224
  ],
13754
- "freeform": false,
13755
- "absolute_index": null,
13756
- "parent_question_id": null,
13757
- "key": "testingooptarts"
13225
+ "key": "poptarts",
13226
+ "_links": {
13227
+ "self": {
13228
+ "href": "http://localhost:3000/api/questions/37"
13229
+ }
13230
+ }
13758
13231
  },
13759
13232
  {
13760
- "id": 117,
13233
+ "id": 38,
13761
13234
  "question_type": "boolean",
13762
13235
  "text": "Do you like poptarts?",
13763
13236
  "responses": [
13764
13237
  "t",
13765
13238
  "f"
13766
13239
  ],
13767
- "freeform": true,
13768
- "absolute_index": 10,
13769
- "parent_question_id": 42,
13770
- "key": "poptarts"
13240
+ "key": null,
13241
+ "_links": {
13242
+ "self": {
13243
+ "href": "http://localhost:3000/api/questions/38"
13244
+ }
13245
+ }
13771
13246
  },
13772
13247
  {
13773
- "id": 118,
13774
- "question_type": "multiple",
13248
+ "id": 39,
13249
+ "question_type": "boolean",
13775
13250
  "text": "Do you like poptarts?",
13776
13251
  "responses": [
13777
- "Yes",
13778
- "No"
13252
+ "t",
13253
+ "f"
13779
13254
  ],
13780
- "freeform": false,
13781
- "absolute_index": null,
13782
- "parent_question_id": null,
13783
- "key": null
13255
+ "key": null,
13256
+ "_links": {
13257
+ "self": {
13258
+ "href": "http://localhost:3000/api/questions/39"
13259
+ }
13260
+ }
13784
13261
  },
13785
13262
  {
13786
- "id": 119,
13787
- "question_type": "range",
13263
+ "id": 40,
13264
+ "question_type": "boolean",
13788
13265
  "text": "Do you like poptarts?",
13789
13266
  "responses": [
13790
- "0",
13791
- "10"
13267
+ "t",
13268
+ "f"
13792
13269
  ],
13793
- "freeform": false,
13794
- "absolute_index": null,
13795
- "parent_question_id": null,
13796
- "key": null
13270
+ "key": null,
13271
+ "_links": {
13272
+ "self": {
13273
+ "href": "http://localhost:3000/api/questions/40"
13274
+ }
13275
+ }
13797
13276
  },
13798
13277
  {
13799
- "id": 120,
13278
+ "id": 41,
13800
13279
  "question_type": "boolean",
13801
13280
  "text": "Do you like poptarts?",
13802
13281
  "responses": [
13803
13282
  "t",
13804
13283
  "f"
13805
13284
  ],
13806
- "freeform": false,
13807
- "absolute_index": null,
13808
- "parent_question_id": null,
13809
- "key": null
13285
+ "key": null,
13286
+ "_links": {
13287
+ "self": {
13288
+ "href": "http://localhost:3000/api/questions/41"
13289
+ }
13290
+ }
13810
13291
  },
13811
13292
  {
13812
- "id": 121,
13293
+ "id": 42,
13813
13294
  "question_type": "boolean",
13814
13295
  "text": "Do you like poptarts?",
13815
13296
  "responses": [
13816
13297
  "t",
13817
13298
  "f"
13818
13299
  ],
13819
- "freeform": false,
13820
- "absolute_index": null,
13821
- "parent_question_id": null,
13822
- "key": "testingooptarts"
13300
+ "key": null,
13301
+ "_links": {
13302
+ "self": {
13303
+ "href": "http://localhost:3000/api/questions/42"
13304
+ }
13305
+ }
13823
13306
  },
13824
13307
  {
13825
- "id": 122,
13308
+ "id": 43,
13826
13309
  "question_type": "boolean",
13827
13310
  "text": "Do you like poptarts?",
13828
13311
  "responses": [
13829
13312
  "t",
13830
13313
  "f"
13831
13314
  ],
13832
- "freeform": true,
13833
- "absolute_index": 10,
13834
- "parent_question_id": 42,
13835
- "key": "poptarts"
13315
+ "key": null,
13316
+ "_links": {
13317
+ "self": {
13318
+ "href": "http://localhost:3000/api/questions/43"
13319
+ }
13320
+ }
13836
13321
  },
13837
13322
  {
13838
- "id": 123,
13839
- "question_type": "multiple",
13323
+ "id": 44,
13324
+ "question_type": "boolean",
13840
13325
  "text": "Do you like poptarts?",
13841
13326
  "responses": [
13842
- "Yes",
13843
- "No"
13327
+ "t",
13328
+ "f"
13329
+ ],
13330
+ "key": null,
13331
+ "_links": {
13332
+ "self": {
13333
+ "href": "http://localhost:3000/api/questions/44"
13334
+ }
13335
+ }
13336
+ },
13337
+ {
13338
+ "id": 45,
13339
+ "question_type": "boolean",
13340
+ "text": "Do you like poptarts?",
13341
+ "responses": [
13342
+ "t",
13343
+ "f"
13844
13344
  ],
13845
- "freeform": false,
13846
- "absolute_index": null,
13847
- "parent_question_id": null,
13848
- "key": null
13345
+ "key": null,
13346
+ "_links": {
13347
+ "self": {
13348
+ "href": "http://localhost:3000/api/questions/45"
13349
+ }
13350
+ }
13351
+ }
13352
+ ]
13353
+ http_version:
13354
+ recorded_at: Sat, 17 Jan 2015 13:48:57 GMT
13355
+ - request:
13356
+ method: post
13357
+ uri: http://localhost:3000/api/surveys/46/survey_questions
13358
+ body:
13359
+ encoding: UTF-8
13360
+ string: '{"survey_question":{"question_id":57,"responses":null}}'
13361
+ headers:
13362
+ User-Agent:
13363
+ - Faraday v0.9.0
13364
+ Content-Type:
13365
+ - application/json
13366
+ Api-Token:
13367
+ - testing
13368
+ User-Token:
13369
+ - 54b972c03f871298aaf2c307109dc3e5cf180616401ab4ed8c877911c8bb1fca
13370
+ Service-User-Id:
13371
+ - 13e959f77663385b3c513a36a4d857e3b238651c163fa1780d94b6493731d87b
13372
+ Accept-Encoding:
13373
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13374
+ Accept:
13375
+ - "*/*"
13376
+ response:
13377
+ status:
13378
+ code: 201
13379
+ message: 'Created '
13380
+ headers:
13381
+ X-Frame-Options:
13382
+ - SAMEORIGIN
13383
+ X-Xss-Protection:
13384
+ - 1; mode=block
13385
+ X-Content-Type-Options:
13386
+ - nosniff
13387
+ X-Ua-Compatible:
13388
+ - chrome=1
13389
+ Content-Type:
13390
+ - application/json; charset=utf-8
13391
+ Etag:
13392
+ - '"22a423c7ecbcae20e95bd413e94705fe"'
13393
+ Cache-Control:
13394
+ - max-age=0, private, must-revalidate
13395
+ X-Request-Id:
13396
+ - 815683aa-ac4c-447e-b395-e0218f13438b
13397
+ X-Runtime:
13398
+ - '0.024926'
13399
+ Server:
13400
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13401
+ Date:
13402
+ - Sat, 17 Jan 2015 14:02:39 GMT
13403
+ Content-Length:
13404
+ - '532'
13405
+ Connection:
13406
+ - Keep-Alive
13407
+ body:
13408
+ encoding: UTF-8
13409
+ string: |-
13410
+ {
13411
+ "id": 10,
13412
+ "text": "Where are you?",
13413
+ "question_type": "multiple",
13414
+ "responses": [
13415
+ "At Home",
13416
+ "At Work",
13417
+ "In a car",
13418
+ "Other"
13419
+ ],
13420
+ "answer": null,
13421
+ "_links": {
13422
+ "self": {
13423
+ "href": "http://localhost:3000/api/surveys/46/survey_questions/10"
13424
+ },
13425
+ "put": {
13426
+ "href": "http://localhost:3000/api/surveys/46/survey_questions/10"
13427
+ },
13428
+ "survey": {
13429
+ "href": "http://localhost:3000/api/surveys/46"
13430
+ }
13431
+ },
13432
+ "created_at": "2015-01-17T14:02:39.176Z",
13433
+ "key": null,
13434
+ "question_id": 57
13435
+ }
13436
+ http_version:
13437
+ recorded_at: Sat, 17 Jan 2015 14:02:39 GMT
13438
+ - request:
13439
+ method: put
13440
+ uri: http://localhost:3000/api/surveys/46/survey_questions/10
13441
+ body:
13442
+ encoding: UTF-8
13443
+ string: '{"id":10,"survey_question":{"answer":"At Home"}}'
13444
+ headers:
13445
+ User-Agent:
13446
+ - Faraday v0.9.0
13447
+ Content-Type:
13448
+ - application/json
13449
+ Api-Token:
13450
+ - testing
13451
+ User-Token:
13452
+ - 54b972c03f871298aaf2c307109dc3e5cf180616401ab4ed8c877911c8bb1fca
13453
+ Service-User-Id:
13454
+ - 13e959f77663385b3c513a36a4d857e3b238651c163fa1780d94b6493731d87b
13455
+ Accept-Encoding:
13456
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13457
+ Accept:
13458
+ - "*/*"
13459
+ response:
13460
+ status:
13461
+ code: 204
13462
+ message: 'No Content '
13463
+ headers:
13464
+ X-Frame-Options:
13465
+ - SAMEORIGIN
13466
+ X-Xss-Protection:
13467
+ - 1; mode=block
13468
+ X-Content-Type-Options:
13469
+ - nosniff
13470
+ X-Ua-Compatible:
13471
+ - chrome=1
13472
+ Cache-Control:
13473
+ - no-cache
13474
+ X-Request-Id:
13475
+ - e75b216a-0a06-4a1b-b533-b9cf4fd6b823
13476
+ X-Runtime:
13477
+ - '0.012840'
13478
+ Server:
13479
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13480
+ Date:
13481
+ - Sat, 17 Jan 2015 14:02:39 GMT
13482
+ Connection:
13483
+ - Keep-Alive
13484
+ body:
13485
+ encoding: UTF-8
13486
+ string: ''
13487
+ http_version:
13488
+ recorded_at: Sat, 17 Jan 2015 14:02:39 GMT
13489
+ - request:
13490
+ method: post
13491
+ uri: http://localhost:3000/api/surveys/50/survey_questions
13492
+ body:
13493
+ encoding: UTF-8
13494
+ string: '{"survey_question":{"question_id":59,"responses":null}}'
13495
+ headers:
13496
+ User-Agent:
13497
+ - Faraday v0.9.0
13498
+ Content-Type:
13499
+ - application/json
13500
+ Api-Token:
13501
+ - testing
13502
+ User-Token:
13503
+ - c4b263f9339b77c5ba2b822d4a74b0f238c1b00a7a76f32ed92f6103607f0a25
13504
+ Service-User-Id:
13505
+ - f4f17e92bc2ac4a2be3fa4d3d3fdbb2332fd6363bf0ba76132e4401565445f8e
13506
+ Accept-Encoding:
13507
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13508
+ Accept:
13509
+ - "*/*"
13510
+ response:
13511
+ status:
13512
+ code: 201
13513
+ message: 'Created '
13514
+ headers:
13515
+ X-Frame-Options:
13516
+ - SAMEORIGIN
13517
+ X-Xss-Protection:
13518
+ - 1; mode=block
13519
+ X-Content-Type-Options:
13520
+ - nosniff
13521
+ X-Ua-Compatible:
13522
+ - chrome=1
13523
+ Content-Type:
13524
+ - application/json; charset=utf-8
13525
+ Etag:
13526
+ - '"1e9e7930c2ce411251ee20d1718ffeda"'
13527
+ Cache-Control:
13528
+ - max-age=0, private, must-revalidate
13529
+ X-Request-Id:
13530
+ - bdf9f8ed-a7a3-4692-9a70-7a36980d809f
13531
+ X-Runtime:
13532
+ - '0.015191'
13533
+ Server:
13534
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13535
+ Date:
13536
+ - Sat, 17 Jan 2015 14:02:56 GMT
13537
+ Content-Length:
13538
+ - '532'
13539
+ Connection:
13540
+ - Keep-Alive
13541
+ body:
13542
+ encoding: UTF-8
13543
+ string: |-
13544
+ {
13545
+ "id": 12,
13546
+ "text": "Where are you?",
13547
+ "question_type": "multiple",
13548
+ "responses": [
13549
+ "At Home",
13550
+ "At Work",
13551
+ "In a car",
13552
+ "Other"
13553
+ ],
13554
+ "answer": null,
13555
+ "_links": {
13556
+ "self": {
13557
+ "href": "http://localhost:3000/api/surveys/50/survey_questions/12"
13558
+ },
13559
+ "put": {
13560
+ "href": "http://localhost:3000/api/surveys/50/survey_questions/12"
13561
+ },
13562
+ "survey": {
13563
+ "href": "http://localhost:3000/api/surveys/50"
13564
+ }
13565
+ },
13566
+ "created_at": "2015-01-17T14:02:56.382Z",
13567
+ "key": null,
13568
+ "question_id": 59
13569
+ }
13570
+ http_version:
13571
+ recorded_at: Sat, 17 Jan 2015 14:02:56 GMT
13572
+ - request:
13573
+ method: put
13574
+ uri: http://localhost:3000/api/surveys/50/survey_questions/12
13575
+ body:
13576
+ encoding: UTF-8
13577
+ string: '{"id":12,"survey_question":{"answer":"At Home"}}'
13578
+ headers:
13579
+ User-Agent:
13580
+ - Faraday v0.9.0
13581
+ Content-Type:
13582
+ - application/json
13583
+ Api-Token:
13584
+ - testing
13585
+ User-Token:
13586
+ - c4b263f9339b77c5ba2b822d4a74b0f238c1b00a7a76f32ed92f6103607f0a25
13587
+ Service-User-Id:
13588
+ - f4f17e92bc2ac4a2be3fa4d3d3fdbb2332fd6363bf0ba76132e4401565445f8e
13589
+ Accept-Encoding:
13590
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13591
+ Accept:
13592
+ - "*/*"
13593
+ response:
13594
+ status:
13595
+ code: 204
13596
+ message: 'No Content '
13597
+ headers:
13598
+ X-Frame-Options:
13599
+ - SAMEORIGIN
13600
+ X-Xss-Protection:
13601
+ - 1; mode=block
13602
+ X-Content-Type-Options:
13603
+ - nosniff
13604
+ X-Ua-Compatible:
13605
+ - chrome=1
13606
+ Cache-Control:
13607
+ - no-cache
13608
+ X-Request-Id:
13609
+ - 04c84fd4-94f9-474c-9b1a-effcd59b889c
13610
+ X-Runtime:
13611
+ - '0.020325'
13612
+ Server:
13613
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13614
+ Date:
13615
+ - Sat, 17 Jan 2015 14:02:56 GMT
13616
+ Connection:
13617
+ - Keep-Alive
13618
+ body:
13619
+ encoding: UTF-8
13620
+ string: ''
13621
+ http_version:
13622
+ recorded_at: Sat, 17 Jan 2015 14:02:56 GMT
13623
+ - request:
13624
+ method: get
13625
+ uri: http://localhost:3000/api/surveys/50
13626
+ body:
13627
+ encoding: US-ASCII
13628
+ string: ''
13629
+ headers:
13630
+ User-Agent:
13631
+ - Faraday v0.9.0
13632
+ Content-Type:
13633
+ - application/json
13634
+ Api-Token:
13635
+ - testing
13636
+ User-Token:
13637
+ - c4b263f9339b77c5ba2b822d4a74b0f238c1b00a7a76f32ed92f6103607f0a25
13638
+ Service-User-Id:
13639
+ - f4f17e92bc2ac4a2be3fa4d3d3fdbb2332fd6363bf0ba76132e4401565445f8e
13640
+ Accept-Encoding:
13641
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13642
+ Accept:
13643
+ - "*/*"
13644
+ response:
13645
+ status:
13646
+ code: 200
13647
+ message: 'OK '
13648
+ headers:
13649
+ X-Frame-Options:
13650
+ - SAMEORIGIN
13651
+ X-Xss-Protection:
13652
+ - 1; mode=block
13653
+ X-Content-Type-Options:
13654
+ - nosniff
13655
+ X-Ua-Compatible:
13656
+ - chrome=1
13657
+ Content-Type:
13658
+ - application/json; charset=utf-8
13659
+ Etag:
13660
+ - '"7880ccb9d3ac7082d07b41fb92827fa8"'
13661
+ Cache-Control:
13662
+ - max-age=0, private, must-revalidate
13663
+ X-Request-Id:
13664
+ - 3909d942-0dc0-41cb-afca-b53bb0beea9d
13665
+ X-Runtime:
13666
+ - '0.018390'
13667
+ Server:
13668
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13669
+ Date:
13670
+ - Sat, 17 Jan 2015 14:02:56 GMT
13671
+ Content-Length:
13672
+ - '1112'
13673
+ Connection:
13674
+ - Keep-Alive
13675
+ body:
13676
+ encoding: UTF-8
13677
+ string: |-
13678
+ {
13679
+ "id": 50,
13680
+ "service_user_id": "f4f17e92bc2ac4a2be3fa4d3d3fdbb2332fd6363bf0ba76132e4401565445f8e",
13681
+ "_links": {
13682
+ "self": {
13683
+ "href": "http://localhost:3000/api/surveys/50"
13684
+ },
13685
+ "survey_questions": {
13686
+ "post": {
13687
+ "href": "http://localhost:3000/api/surveys/50/survey_questions"
13688
+ },
13689
+ "put": {
13690
+ "href": "http://localhost:3000/api/surveys/50/survey_questions"
13691
+ }
13692
+ }
13849
13693
  },
13850
- {
13851
- "id": 124,
13852
- "question_type": "range",
13853
- "text": "Do you like poptarts?",
13854
- "responses": [
13855
- "0",
13856
- "10"
13857
- ],
13858
- "freeform": false,
13859
- "absolute_index": null,
13860
- "parent_question_id": null,
13861
- "key": null
13862
- }
13863
- ]
13694
+ "completed": true,
13695
+ "survey_questions": [
13696
+ {
13697
+ "id": 12,
13698
+ "text": "Where are you?",
13699
+ "question_type": "multiple",
13700
+ "responses": [
13701
+ "At Home",
13702
+ "At Work",
13703
+ "In a car",
13704
+ "Other"
13705
+ ],
13706
+ "answer": "At Home",
13707
+ "_links": {
13708
+ "self": {
13709
+ "href": "http://localhost:3000/api/surveys/50/survey_questions/12"
13710
+ },
13711
+ "put": {
13712
+ "href": "http://localhost:3000/api/surveys/50/survey_questions/12"
13713
+ },
13714
+ "survey": {
13715
+ "href": "http://localhost:3000/api/surveys/50"
13716
+ }
13717
+ },
13718
+ "created_at": "2015-01-17T14:02:56.382Z",
13719
+ "key": null,
13720
+ "question_id": 59
13721
+ }
13722
+ ]
13723
+ }
13864
13724
  http_version:
13865
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
13725
+ recorded_at: Sat, 17 Jan 2015 14:02:56 GMT
13866
13726
  - request:
13867
13727
  method: post
13868
- uri: http://localhost:3000/api/users
13728
+ uri: http://localhost:3000/api/user
13869
13729
  body:
13870
13730
  encoding: UTF-8
13871
13731
  string: "{}"
@@ -13877,9 +13737,9 @@ http_interactions:
13877
13737
  Api-Token:
13878
13738
  - testing
13879
13739
  User-Token:
13880
- - a64adb15025af2fc240b897d43212ab50348e9ac78c9b52e07b20570804ced9f
13740
+ - 23d9bc5844f6112732f52e44bf1961b5ae4fb3dd709e8d3640599c5bad088bdc
13881
13741
  Service-User-Id:
13882
- - 0a589c1df5abb96b0c87bd492ce6e63860344a4f3a6b46baa4481fdc4b203bc6
13742
+ - 4c56b1623f7c0f2096d19c87b721d06b1d224e8474b97933fb40e553ecc842c4
13883
13743
  Accept-Encoding:
13884
13744
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13885
13745
  Accept:
@@ -13900,41 +13760,41 @@ http_interactions:
13900
13760
  Content-Type:
13901
13761
  - application/json; charset=utf-8
13902
13762
  Etag:
13903
- - '"f1ea635ec017566cc82565fc17a17f9f"'
13763
+ - '"ccdf1c53d55f6c8480a1894ba79cbe66"'
13904
13764
  Cache-Control:
13905
13765
  - max-age=0, private, must-revalidate
13906
13766
  X-Request-Id:
13907
- - f8faa078-d8ad-442a-b36d-0f49bfedef9d
13767
+ - d131cfc2-448c-4158-8863-57f6e13e9dd3
13908
13768
  X-Runtime:
13909
- - '0.005908'
13769
+ - '0.013134'
13910
13770
  Server:
13911
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
13771
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13912
13772
  Date:
13913
- - Sat, 18 Oct 2014 17:30:43 GMT
13773
+ - Sat, 17 Jan 2015 14:05:21 GMT
13914
13774
  Content-Length:
13915
- - '261'
13775
+ - '256'
13916
13776
  Connection:
13917
13777
  - Keep-Alive
13918
13778
  body:
13919
13779
  encoding: UTF-8
13920
13780
  string: |-
13921
13781
  {
13922
- "service_user_id": "8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471",
13782
+ "service_user_id": "a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597",
13923
13783
  "_links": {
13924
13784
  "self": {
13925
- "href": "http://localhost:3000/api/users/147"
13785
+ "href": "http://localhost:3000/api/user"
13926
13786
  }
13927
13787
  },
13928
- "token": "cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7"
13788
+ "token": "56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3"
13929
13789
  }
13930
13790
  http_version:
13931
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
13791
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
13932
13792
  - request:
13933
13793
  method: post
13934
13794
  uri: http://localhost:3000/api/surveys
13935
13795
  body:
13936
13796
  encoding: UTF-8
13937
- string: '{"survey":{"service_user_id":"8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471"}}'
13797
+ string: "{}"
13938
13798
  headers:
13939
13799
  User-Agent:
13940
13800
  - Faraday v0.9.0
@@ -13943,9 +13803,9 @@ http_interactions:
13943
13803
  Api-Token:
13944
13804
  - testing
13945
13805
  User-Token:
13946
- - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
13806
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
13947
13807
  Service-User-Id:
13948
- - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
13808
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
13949
13809
  Accept-Encoding:
13950
13810
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13951
13811
  Accept:
@@ -13966,53 +13826,54 @@ http_interactions:
13966
13826
  Content-Type:
13967
13827
  - application/json; charset=utf-8
13968
13828
  Etag:
13969
- - '"fbb3577b28d11d618bb36a492a9d23b5"'
13829
+ - '"6ce7a23758648a6f47bba081faee772a"'
13970
13830
  Cache-Control:
13971
13831
  - max-age=0, private, must-revalidate
13972
13832
  X-Request-Id:
13973
- - b9e4ecc5-d1e6-44b6-a7da-0263c0f19607
13833
+ - fe863043-2855-49f7-8f4a-762dfa0bc938
13974
13834
  X-Runtime:
13975
- - '0.019090'
13835
+ - '0.018040'
13976
13836
  Server:
13977
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
13837
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13978
13838
  Date:
13979
- - Sat, 18 Oct 2014 17:30:43 GMT
13839
+ - Sat, 17 Jan 2015 14:05:21 GMT
13980
13840
  Content-Length:
13981
- - '476'
13841
+ - '471'
13982
13842
  Connection:
13983
13843
  - Keep-Alive
13984
13844
  body:
13985
13845
  encoding: UTF-8
13986
13846
  string: |-
13987
13847
  {
13988
- "id": 182,
13989
- "service_user_id": "8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471",
13848
+ "id": 54,
13849
+ "service_user_id": "a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597",
13990
13850
  "_links": {
13991
13851
  "self": {
13992
- "href": "http://localhost:3000/api/surveys/182"
13852
+ "href": "http://localhost:3000/api/surveys/54"
13993
13853
  },
13994
13854
  "survey_questions": {
13995
13855
  "post": {
13996
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
13856
+ "href": "http://localhost:3000/api/surveys/54/survey_questions"
13997
13857
  },
13998
13858
  "put": {
13999
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
13859
+ "href": "http://localhost:3000/api/surveys/54/survey_questions"
14000
13860
  }
14001
13861
  }
14002
13862
  },
14003
- "completed": false,
13863
+ "completed": true,
14004
13864
  "survey_questions": [
14005
13865
 
14006
13866
  ]
14007
13867
  }
14008
13868
  http_version:
14009
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
13869
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
14010
13870
  - request:
14011
13871
  method: post
14012
- uri: http://localhost:3000/api/surveys/182/survey_questions
13872
+ uri: http://localhost:3000/api/questions
14013
13873
  body:
14014
13874
  encoding: UTF-8
14015
- string: '{"survey_question":{"question_id":25}}'
13875
+ string: '{"question":{"question_type":"multiple","responses":["At Home","At
13876
+ Work","In a car","Other"],"text":"Where are you?","key":null}}'
14016
13877
  headers:
14017
13878
  User-Agent:
14018
13879
  - Faraday v0.9.0
@@ -14021,9 +13882,9 @@ http_interactions:
14021
13882
  Api-Token:
14022
13883
  - testing
14023
13884
  User-Token:
14024
- - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
13885
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
14025
13886
  Service-User-Id:
14026
- - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
13887
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
14027
13888
  Accept-Encoding:
14028
13889
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14029
13890
  Accept:
@@ -14044,28 +13905,102 @@ http_interactions:
14044
13905
  Content-Type:
14045
13906
  - application/json; charset=utf-8
14046
13907
  Etag:
14047
- - '"5242ab3d8954c48021cc19dcfcc728db"'
13908
+ - '"f2eaf881d847d399ef08bc2c2b089ee3"'
14048
13909
  Cache-Control:
14049
13910
  - max-age=0, private, must-revalidate
14050
13911
  X-Request-Id:
14051
- - 0c6717c6-85a6-419c-b6b2-8b6121ecc3bf
13912
+ - 9c8d4a45-156d-441b-894f-34f86fdf1c6f
14052
13913
  X-Runtime:
14053
- - '0.023080'
13914
+ - '0.010166'
14054
13915
  Server:
14055
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
13916
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
14056
13917
  Date:
14057
- - Sat, 18 Oct 2014 17:30:43 GMT
13918
+ - Sat, 17 Jan 2015 14:05:21 GMT
14058
13919
  Content-Length:
14059
- - '605'
13920
+ - '262'
14060
13921
  Connection:
14061
13922
  - Keep-Alive
14062
13923
  body:
14063
13924
  encoding: UTF-8
14064
13925
  string: |-
14065
13926
  {
14066
- "id": 261,
13927
+ "id": 61,
13928
+ "question_type": "multiple",
14067
13929
  "text": "Where are you?",
14068
- "type": "multiple",
13930
+ "responses": [
13931
+ "At Home",
13932
+ "At Work",
13933
+ "In a car",
13934
+ "Other"
13935
+ ],
13936
+ "key": null,
13937
+ "_links": {
13938
+ "self": {
13939
+ "href": "http://localhost:3000/api/questions/61"
13940
+ }
13941
+ }
13942
+ }
13943
+ http_version:
13944
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
13945
+ - request:
13946
+ method: post
13947
+ uri: http://localhost:3000/api/surveys/54/survey_questions
13948
+ body:
13949
+ encoding: UTF-8
13950
+ string: '{"survey_question":{"question_id":61,"responses":null}}'
13951
+ headers:
13952
+ User-Agent:
13953
+ - Faraday v0.9.0
13954
+ Content-Type:
13955
+ - application/json
13956
+ Api-Token:
13957
+ - testing
13958
+ User-Token:
13959
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
13960
+ Service-User-Id:
13961
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
13962
+ Accept-Encoding:
13963
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
13964
+ Accept:
13965
+ - "*/*"
13966
+ response:
13967
+ status:
13968
+ code: 201
13969
+ message: 'Created '
13970
+ headers:
13971
+ X-Frame-Options:
13972
+ - SAMEORIGIN
13973
+ X-Xss-Protection:
13974
+ - 1; mode=block
13975
+ X-Content-Type-Options:
13976
+ - nosniff
13977
+ X-Ua-Compatible:
13978
+ - chrome=1
13979
+ Content-Type:
13980
+ - application/json; charset=utf-8
13981
+ Etag:
13982
+ - '"0f5fbb5abb031443f045446bc9c5ddbf"'
13983
+ Cache-Control:
13984
+ - max-age=0, private, must-revalidate
13985
+ X-Request-Id:
13986
+ - b632f33f-ad9e-4b86-aa4d-215d8ee26996
13987
+ X-Runtime:
13988
+ - '0.038362'
13989
+ Server:
13990
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
13991
+ Date:
13992
+ - Sat, 17 Jan 2015 14:05:21 GMT
13993
+ Content-Length:
13994
+ - '532'
13995
+ Connection:
13996
+ - Keep-Alive
13997
+ body:
13998
+ encoding: UTF-8
13999
+ string: |-
14000
+ {
14001
+ "id": 14,
14002
+ "text": "Where are you?",
14003
+ "question_type": "multiple",
14069
14004
  "responses": [
14070
14005
  "At Home",
14071
14006
  "At Work",
@@ -14073,31 +14008,29 @@ http_interactions:
14073
14008
  "Other"
14074
14009
  ],
14075
14010
  "answer": null,
14076
- "freeform": true,
14077
14011
  "_links": {
14078
14012
  "self": {
14079
- "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
14080
- },
14081
- "post": {
14082
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
14013
+ "href": "http://localhost:3000/api/surveys/54/survey_questions/14"
14083
14014
  },
14084
14015
  "put": {
14085
- "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
14016
+ "href": "http://localhost:3000/api/surveys/54/survey_questions/14"
14086
14017
  },
14087
14018
  "survey": {
14088
- "href": "http://localhost:3000/api/surveys/182"
14019
+ "href": "http://localhost:3000/api/surveys/54"
14089
14020
  }
14090
14021
  },
14091
- "created_at": "2014-10-18T17:30:43.405Z"
14022
+ "created_at": "2015-01-17T14:05:21.302Z",
14023
+ "key": null,
14024
+ "question_id": 61
14092
14025
  }
14093
14026
  http_version:
14094
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
14027
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
14095
14028
  - request:
14096
14029
  method: put
14097
- uri: http://localhost:3000/api/surveys/182/survey_questions/261
14030
+ uri: http://localhost:3000/api/surveys/54/survey_questions/14
14098
14031
  body:
14099
14032
  encoding: UTF-8
14100
- string: '{"id":261,"survey_question":{"answer":"At Home"}}'
14033
+ string: '{"id":14,"survey_question":{"answer":"At Home"}}'
14101
14034
  headers:
14102
14035
  User-Agent:
14103
14036
  - Faraday v0.9.0
@@ -14106,9 +14039,9 @@ http_interactions:
14106
14039
  Api-Token:
14107
14040
  - testing
14108
14041
  User-Token:
14109
- - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
14042
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
14110
14043
  Service-User-Id:
14111
- - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
14044
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
14112
14045
  Accept-Encoding:
14113
14046
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14114
14047
  Accept:
@@ -14129,23 +14062,23 @@ http_interactions:
14129
14062
  Cache-Control:
14130
14063
  - no-cache
14131
14064
  X-Request-Id:
14132
- - 6d8a2c39-8583-48f0-8cf4-fe2ebc4e1384
14065
+ - 1eacfcef-132d-4a4d-a883-5bfe9a0252d3
14133
14066
  X-Runtime:
14134
- - '0.010215'
14067
+ - '0.015084'
14135
14068
  Server:
14136
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
14069
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
14137
14070
  Date:
14138
- - Sat, 18 Oct 2014 17:30:43 GMT
14071
+ - Sat, 17 Jan 2015 14:05:21 GMT
14139
14072
  Connection:
14140
14073
  - Keep-Alive
14141
14074
  body:
14142
14075
  encoding: UTF-8
14143
14076
  string: ''
14144
14077
  http_version:
14145
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
14078
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
14146
14079
  - request:
14147
14080
  method: get
14148
- uri: http://localhost:3000/api/surveys/182
14081
+ uri: http://localhost:3000/api/surveys/54
14149
14082
  body:
14150
14083
  encoding: US-ASCII
14151
14084
  string: ''
@@ -14157,9 +14090,9 @@ http_interactions:
14157
14090
  Api-Token:
14158
14091
  - testing
14159
14092
  User-Token:
14160
- - cd13490902b4944acf6af4d6e8505c8e44b68e841dbfca133523f68b941587b7
14093
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
14161
14094
  Service-User-Id:
14162
- - 8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471
14095
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
14163
14096
  Accept-Encoding:
14164
14097
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14165
14098
  Accept:
@@ -14180,46 +14113,46 @@ http_interactions:
14180
14113
  Content-Type:
14181
14114
  - application/json; charset=utf-8
14182
14115
  Etag:
14183
- - '"21a425e42a02d27f05c9e40208818d4a"'
14116
+ - '"987727f96be7696e6da7a7ee850e76a2"'
14184
14117
  Cache-Control:
14185
14118
  - max-age=0, private, must-revalidate
14186
14119
  X-Request-Id:
14187
- - 6228b7db-8d94-4ef8-8c45-9c6a1fd2a85a
14120
+ - cd41a3b6-12e7-48ab-bbc0-44d8239486f6
14188
14121
  X-Runtime:
14189
- - '0.013101'
14122
+ - '0.019284'
14190
14123
  Server:
14191
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
14124
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
14192
14125
  Date:
14193
- - Sat, 18 Oct 2014 17:30:43 GMT
14126
+ - Sat, 17 Jan 2015 14:05:21 GMT
14194
14127
  Content-Length:
14195
- - '1198'
14128
+ - '1112'
14196
14129
  Connection:
14197
14130
  - Keep-Alive
14198
14131
  body:
14199
14132
  encoding: UTF-8
14200
14133
  string: |-
14201
14134
  {
14202
- "id": 182,
14203
- "service_user_id": "8104645e99aeda86d54dd596af7d3d91ed7909493bcf2e0e6291270d4303a471",
14135
+ "id": 54,
14136
+ "service_user_id": "a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597",
14204
14137
  "_links": {
14205
14138
  "self": {
14206
- "href": "http://localhost:3000/api/surveys/182"
14139
+ "href": "http://localhost:3000/api/surveys/54"
14207
14140
  },
14208
14141
  "survey_questions": {
14209
14142
  "post": {
14210
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
14143
+ "href": "http://localhost:3000/api/surveys/54/survey_questions"
14211
14144
  },
14212
14145
  "put": {
14213
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
14146
+ "href": "http://localhost:3000/api/surveys/54/survey_questions"
14214
14147
  }
14215
14148
  }
14216
14149
  },
14217
- "completed": false,
14150
+ "completed": true,
14218
14151
  "survey_questions": [
14219
14152
  {
14220
- "id": 261,
14153
+ "id": 14,
14221
14154
  "text": "Where are you?",
14222
- "type": "multiple",
14155
+ "question_type": "multiple",
14223
14156
  "responses": [
14224
14157
  "At Home",
14225
14158
  "At Work",
@@ -14227,25 +14160,23 @@ http_interactions:
14227
14160
  "Other"
14228
14161
  ],
14229
14162
  "answer": "At Home",
14230
- "freeform": true,
14231
14163
  "_links": {
14232
14164
  "self": {
14233
- "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
14234
- },
14235
- "post": {
14236
- "href": "http://localhost:3000/api/surveys/182/survey_questions"
14165
+ "href": "http://localhost:3000/api/surveys/54/survey_questions/14"
14237
14166
  },
14238
14167
  "put": {
14239
- "href": "http://localhost:3000/api/surveys/182/survey_questions/261"
14168
+ "href": "http://localhost:3000/api/surveys/54/survey_questions/14"
14240
14169
  },
14241
14170
  "survey": {
14242
- "href": "http://localhost:3000/api/surveys/182"
14171
+ "href": "http://localhost:3000/api/surveys/54"
14243
14172
  }
14244
14173
  },
14245
- "created_at": "2014-10-18T17:30:43.405Z"
14174
+ "created_at": "2015-01-17T14:05:21.302Z",
14175
+ "key": null,
14176
+ "question_id": 61
14246
14177
  }
14247
14178
  ]
14248
14179
  }
14249
14180
  http_version:
14250
- recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
14251
- recorded_with: VCR 2.6.0
14181
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
14182
+ recorded_with: VCR 2.9.3