poptart 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +28 -4
- data/lib/poptart/boolean_question.rb +14 -0
- data/lib/poptart/multiple_response_question.rb +9 -0
- data/lib/poptart/question.rb +14 -1
- data/lib/poptart/range_question.rb +9 -0
- data/lib/poptart/survey.rb +3 -1
- data/lib/poptart/user.rb +0 -5
- data/lib/poptart.rb +3 -0
- data/lib/version.rb +1 -1
- data/spec/requests/answering_survey_questions_spec.rb +2 -6
- data/spec/requests/answers_spec.rb +24 -0
- data/spec/requests/creating_questions_spec.rb +29 -0
- data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +381 -154
- data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +528 -329
- data/spec/vcr/creating/quesitons_returns_boolean_question.yml +207 -0
- data/spec/vcr/creating/quesitons_returns_multiple_question.yml +207 -0
- data/spec/vcr/creating/quesitons_returns_range_question.yml +206 -0
- data/spec/vcr/retrieving/answers_returns_answers.yml +1073 -0
- data/spec/vcr/retrieving/responses_returns_responses.yml +1198 -0
- metadata +19 -2
@@ -7021,6 +7021,315 @@ http_interactions:
|
|
7021
7021
|
}
|
7022
7022
|
http_version:
|
7023
7023
|
recorded_at: Sun, 21 Sep 2014 20:27:15 GMT
|
7024
|
+
- request:
|
7025
|
+
method: post
|
7026
|
+
uri: http://localhost:3000//api/surveys/86/survey_questions/
|
7027
|
+
body:
|
7028
|
+
encoding: UTF-8
|
7029
|
+
string: '{"survey_question":{"question_id":25}}'
|
7030
|
+
headers:
|
7031
|
+
User-Agent:
|
7032
|
+
- Faraday v0.9.0
|
7033
|
+
Content-Type:
|
7034
|
+
- application/json
|
7035
|
+
Api-Token:
|
7036
|
+
- testing
|
7037
|
+
Accept-Encoding:
|
7038
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
7039
|
+
Accept:
|
7040
|
+
- "*/*"
|
7041
|
+
response:
|
7042
|
+
status:
|
7043
|
+
code: 201
|
7044
|
+
message: 'Created '
|
7045
|
+
headers:
|
7046
|
+
X-Frame-Options:
|
7047
|
+
- SAMEORIGIN
|
7048
|
+
X-Xss-Protection:
|
7049
|
+
- 1; mode=block
|
7050
|
+
X-Content-Type-Options:
|
7051
|
+
- nosniff
|
7052
|
+
X-Ua-Compatible:
|
7053
|
+
- chrome=1
|
7054
|
+
Content-Type:
|
7055
|
+
- application/json; charset=utf-8
|
7056
|
+
Etag:
|
7057
|
+
- '"74b50adb92c0a142ae7e24901464325b"'
|
7058
|
+
Cache-Control:
|
7059
|
+
- max-age=0, private, must-revalidate
|
7060
|
+
X-Request-Id:
|
7061
|
+
- 9e12faa6-551c-4530-82a5-182dc593b52e
|
7062
|
+
X-Runtime:
|
7063
|
+
- '0.009521'
|
7064
|
+
Server:
|
7065
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7066
|
+
Date:
|
7067
|
+
- Sun, 21 Sep 2014 20:28:01 GMT
|
7068
|
+
Content-Length:
|
7069
|
+
- '184'
|
7070
|
+
Connection:
|
7071
|
+
- Keep-Alive
|
7072
|
+
body:
|
7073
|
+
encoding: UTF-8
|
7074
|
+
string: |-
|
7075
|
+
{
|
7076
|
+
"id": 274,
|
7077
|
+
"survey_id": 86,
|
7078
|
+
"question_id": 25,
|
7079
|
+
"order_index": null,
|
7080
|
+
"answer": null,
|
7081
|
+
"created_at": "2014-09-21T20:28:01.949Z",
|
7082
|
+
"updated_at": "2014-09-21T20:28:01.949Z"
|
7083
|
+
}
|
7084
|
+
http_version:
|
7085
|
+
recorded_at: Sun, 21 Sep 2014 20:28:01 GMT
|
7086
|
+
- request:
|
7087
|
+
method: get
|
7088
|
+
uri: http://localhost:3000/api/surveys/86
|
7089
|
+
body:
|
7090
|
+
encoding: US-ASCII
|
7091
|
+
string: ''
|
7092
|
+
headers:
|
7093
|
+
User-Agent:
|
7094
|
+
- Faraday v0.9.0
|
7095
|
+
Content-Type:
|
7096
|
+
- application/json
|
7097
|
+
Api-Token:
|
7098
|
+
- testing
|
7099
|
+
Accept-Encoding:
|
7100
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
7101
|
+
Accept:
|
7102
|
+
- "*/*"
|
7103
|
+
response:
|
7104
|
+
status:
|
7105
|
+
code: 200
|
7106
|
+
message: 'OK '
|
7107
|
+
headers:
|
7108
|
+
X-Frame-Options:
|
7109
|
+
- SAMEORIGIN
|
7110
|
+
X-Xss-Protection:
|
7111
|
+
- 1; mode=block
|
7112
|
+
X-Content-Type-Options:
|
7113
|
+
- nosniff
|
7114
|
+
X-Ua-Compatible:
|
7115
|
+
- chrome=1
|
7116
|
+
Content-Type:
|
7117
|
+
- application/json; charset=utf-8
|
7118
|
+
Etag:
|
7119
|
+
- '"8b4f82eba1438597db1f7510c051bdf4"'
|
7120
|
+
Cache-Control:
|
7121
|
+
- max-age=0, private, must-revalidate
|
7122
|
+
X-Request-Id:
|
7123
|
+
- 46bdef44-4668-46d4-af05-22567a593001
|
7124
|
+
X-Runtime:
|
7125
|
+
- '0.009840'
|
7126
|
+
Server:
|
7127
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7128
|
+
Date:
|
7129
|
+
- Sun, 21 Sep 2014 20:28:01 GMT
|
7130
|
+
Content-Length:
|
7131
|
+
- '1032'
|
7132
|
+
Connection:
|
7133
|
+
- Keep-Alive
|
7134
|
+
body:
|
7135
|
+
encoding: UTF-8
|
7136
|
+
string: |-
|
7137
|
+
{
|
7138
|
+
"id": 86,
|
7139
|
+
"service_user_id": "e81f9df2f19ac3d0e4634061bff685bbb732abb269049eafdd4fa9ae7c836c6b",
|
7140
|
+
"_links": {
|
7141
|
+
"self": {
|
7142
|
+
"href": "http://localhost:3000/api/surveys/86"
|
7143
|
+
},
|
7144
|
+
"survey_questions": {
|
7145
|
+
"post": {
|
7146
|
+
"href": "/api/surveys/86/survey_questions"
|
7147
|
+
},
|
7148
|
+
"put": {
|
7149
|
+
"href": "/api/surveys/86/survey_questions"
|
7150
|
+
}
|
7151
|
+
}
|
7152
|
+
},
|
7153
|
+
"completed": false,
|
7154
|
+
"survey_questions": [
|
7155
|
+
{
|
7156
|
+
"id": 274,
|
7157
|
+
"text": "Where are you?",
|
7158
|
+
"type": "multiple",
|
7159
|
+
"responses": [
|
7160
|
+
"At Home",
|
7161
|
+
"At Work",
|
7162
|
+
"In a car",
|
7163
|
+
"Other"
|
7164
|
+
],
|
7165
|
+
"answer": null,
|
7166
|
+
"freeform": true,
|
7167
|
+
"_links": {
|
7168
|
+
"self": {
|
7169
|
+
"href": "/api/surveys/86/survey_questions/274"
|
7170
|
+
},
|
7171
|
+
"post": {
|
7172
|
+
"href": "http://localhost:3000/api/surveys/86/survey_questions"
|
7173
|
+
},
|
7174
|
+
"put": {
|
7175
|
+
"href": "/api/surveys/86/survey_questions/274"
|
7176
|
+
},
|
7177
|
+
"survey": {
|
7178
|
+
"href": "/api/surveys/86"
|
7179
|
+
}
|
7180
|
+
}
|
7181
|
+
}
|
7182
|
+
]
|
7183
|
+
}
|
7184
|
+
http_version:
|
7185
|
+
recorded_at: Sun, 21 Sep 2014 20:28:01 GMT
|
7186
|
+
- request:
|
7187
|
+
method: put
|
7188
|
+
uri: http://localhost:3000//api/surveys/86/survey_questions/274/
|
7189
|
+
body:
|
7190
|
+
encoding: UTF-8
|
7191
|
+
string: '{"id":274,"survey_question":{"answer":"At Home"}}'
|
7192
|
+
headers:
|
7193
|
+
User-Agent:
|
7194
|
+
- Faraday v0.9.0
|
7195
|
+
Content-Type:
|
7196
|
+
- application/json
|
7197
|
+
Api-Token:
|
7198
|
+
- testing
|
7199
|
+
Accept-Encoding:
|
7200
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
7201
|
+
Accept:
|
7202
|
+
- "*/*"
|
7203
|
+
response:
|
7204
|
+
status:
|
7205
|
+
code: 204
|
7206
|
+
message: 'No Content '
|
7207
|
+
headers:
|
7208
|
+
X-Frame-Options:
|
7209
|
+
- SAMEORIGIN
|
7210
|
+
X-Xss-Protection:
|
7211
|
+
- 1; mode=block
|
7212
|
+
X-Content-Type-Options:
|
7213
|
+
- nosniff
|
7214
|
+
X-Ua-Compatible:
|
7215
|
+
- chrome=1
|
7216
|
+
Cache-Control:
|
7217
|
+
- no-cache
|
7218
|
+
X-Request-Id:
|
7219
|
+
- e94b4bc7-7f10-46cf-a024-f86c94fc4248
|
7220
|
+
X-Runtime:
|
7221
|
+
- '0.008535'
|
7222
|
+
Server:
|
7223
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7224
|
+
Date:
|
7225
|
+
- Sun, 21 Sep 2014 20:28:01 GMT
|
7226
|
+
Connection:
|
7227
|
+
- Keep-Alive
|
7228
|
+
body:
|
7229
|
+
encoding: UTF-8
|
7230
|
+
string: ''
|
7231
|
+
http_version:
|
7232
|
+
recorded_at: Sun, 21 Sep 2014 20:28:01 GMT
|
7233
|
+
- request:
|
7234
|
+
method: get
|
7235
|
+
uri: http://localhost:3000/api/surveys/86
|
7236
|
+
body:
|
7237
|
+
encoding: US-ASCII
|
7238
|
+
string: ''
|
7239
|
+
headers:
|
7240
|
+
User-Agent:
|
7241
|
+
- Faraday v0.9.0
|
7242
|
+
Content-Type:
|
7243
|
+
- application/json
|
7244
|
+
Api-Token:
|
7245
|
+
- testing
|
7246
|
+
Accept-Encoding:
|
7247
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
7248
|
+
Accept:
|
7249
|
+
- "*/*"
|
7250
|
+
response:
|
7251
|
+
status:
|
7252
|
+
code: 200
|
7253
|
+
message: 'OK '
|
7254
|
+
headers:
|
7255
|
+
X-Frame-Options:
|
7256
|
+
- SAMEORIGIN
|
7257
|
+
X-Xss-Protection:
|
7258
|
+
- 1; mode=block
|
7259
|
+
X-Content-Type-Options:
|
7260
|
+
- nosniff
|
7261
|
+
X-Ua-Compatible:
|
7262
|
+
- chrome=1
|
7263
|
+
Content-Type:
|
7264
|
+
- application/json; charset=utf-8
|
7265
|
+
Etag:
|
7266
|
+
- '"81d2757b954c88017bb526a4698a62bb"'
|
7267
|
+
Cache-Control:
|
7268
|
+
- max-age=0, private, must-revalidate
|
7269
|
+
X-Request-Id:
|
7270
|
+
- ec6c3ca1-aa63-4593-93f4-0df49e389534
|
7271
|
+
X-Runtime:
|
7272
|
+
- '0.012396'
|
7273
|
+
Server:
|
7274
|
+
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7275
|
+
Date:
|
7276
|
+
- Sun, 21 Sep 2014 20:28:02 GMT
|
7277
|
+
Content-Length:
|
7278
|
+
- '1037'
|
7279
|
+
Connection:
|
7280
|
+
- Keep-Alive
|
7281
|
+
body:
|
7282
|
+
encoding: UTF-8
|
7283
|
+
string: |-
|
7284
|
+
{
|
7285
|
+
"id": 86,
|
7286
|
+
"service_user_id": "e81f9df2f19ac3d0e4634061bff685bbb732abb269049eafdd4fa9ae7c836c6b",
|
7287
|
+
"_links": {
|
7288
|
+
"self": {
|
7289
|
+
"href": "http://localhost:3000/api/surveys/86"
|
7290
|
+
},
|
7291
|
+
"survey_questions": {
|
7292
|
+
"post": {
|
7293
|
+
"href": "/api/surveys/86/survey_questions"
|
7294
|
+
},
|
7295
|
+
"put": {
|
7296
|
+
"href": "/api/surveys/86/survey_questions"
|
7297
|
+
}
|
7298
|
+
}
|
7299
|
+
},
|
7300
|
+
"completed": false,
|
7301
|
+
"survey_questions": [
|
7302
|
+
{
|
7303
|
+
"id": 274,
|
7304
|
+
"text": "Where are you?",
|
7305
|
+
"type": "multiple",
|
7306
|
+
"responses": [
|
7307
|
+
"At Home",
|
7308
|
+
"At Work",
|
7309
|
+
"In a car",
|
7310
|
+
"Other"
|
7311
|
+
],
|
7312
|
+
"answer": "At Home",
|
7313
|
+
"freeform": true,
|
7314
|
+
"_links": {
|
7315
|
+
"self": {
|
7316
|
+
"href": "/api/surveys/86/survey_questions/274"
|
7317
|
+
},
|
7318
|
+
"post": {
|
7319
|
+
"href": "http://localhost:3000/api/surveys/86/survey_questions"
|
7320
|
+
},
|
7321
|
+
"put": {
|
7322
|
+
"href": "/api/surveys/86/survey_questions/274"
|
7323
|
+
},
|
7324
|
+
"survey": {
|
7325
|
+
"href": "/api/surveys/86"
|
7326
|
+
}
|
7327
|
+
}
|
7328
|
+
}
|
7329
|
+
]
|
7330
|
+
}
|
7331
|
+
http_version:
|
7332
|
+
recorded_at: Sun, 21 Sep 2014 20:28:02 GMT
|
7024
7333
|
- request:
|
7025
7334
|
method: get
|
7026
7335
|
uri: http://localhost:3000/api/questions/
|
@@ -7058,13 +7367,13 @@ http_interactions:
|
|
7058
7367
|
Cache-Control:
|
7059
7368
|
- max-age=0, private, must-revalidate
|
7060
7369
|
X-Request-Id:
|
7061
|
-
-
|
7370
|
+
- d59c6dad-3a49-4659-8c12-c7d175b3af08
|
7062
7371
|
X-Runtime:
|
7063
|
-
- '0.
|
7372
|
+
- '0.011037'
|
7064
7373
|
Server:
|
7065
7374
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7066
7375
|
Date:
|
7067
|
-
-
|
7376
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7068
7377
|
Content-Length:
|
7069
7378
|
- '7773'
|
7070
7379
|
Connection:
|
@@ -7439,7 +7748,7 @@ http_interactions:
|
|
7439
7748
|
}
|
7440
7749
|
]
|
7441
7750
|
http_version:
|
7442
|
-
recorded_at:
|
7751
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7443
7752
|
- request:
|
7444
7753
|
method: post
|
7445
7754
|
uri: http://localhost:3000/api/users/
|
@@ -7473,17 +7782,17 @@ http_interactions:
|
|
7473
7782
|
Content-Type:
|
7474
7783
|
- application/json; charset=utf-8
|
7475
7784
|
Etag:
|
7476
|
-
- '"
|
7785
|
+
- '"40f582ac0676a79fe4a930ad618a5fad"'
|
7477
7786
|
Cache-Control:
|
7478
7787
|
- max-age=0, private, must-revalidate
|
7479
7788
|
X-Request-Id:
|
7480
|
-
-
|
7789
|
+
- 478a9eb3-9a85-4228-b86b-cb86e8379732
|
7481
7790
|
X-Runtime:
|
7482
|
-
- '0.
|
7791
|
+
- '0.008180'
|
7483
7792
|
Server:
|
7484
7793
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7485
7794
|
Date:
|
7486
|
-
-
|
7795
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7487
7796
|
Content-Length:
|
7488
7797
|
- '260'
|
7489
7798
|
Connection:
|
@@ -7492,22 +7801,22 @@ http_interactions:
|
|
7492
7801
|
encoding: UTF-8
|
7493
7802
|
string: |-
|
7494
7803
|
{
|
7495
|
-
"service_user_id": "
|
7804
|
+
"service_user_id": "6335abccec5f3a3ae12dc8cd33cd8052e812964c76fc2011767c28f966a21afa",
|
7496
7805
|
"_links": {
|
7497
7806
|
"self": {
|
7498
|
-
"href": "http://localhost:3000/api/users/
|
7807
|
+
"href": "http://localhost:3000/api/users/89"
|
7499
7808
|
}
|
7500
7809
|
},
|
7501
|
-
"token": "
|
7810
|
+
"token": "5c05db2e46ebe3db46df7666ced632d1fb0be07582f58f3d71f32e8215612db4"
|
7502
7811
|
}
|
7503
7812
|
http_version:
|
7504
|
-
recorded_at:
|
7813
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7505
7814
|
- request:
|
7506
7815
|
method: post
|
7507
7816
|
uri: http://localhost:3000/api/surveys/
|
7508
7817
|
body:
|
7509
7818
|
encoding: UTF-8
|
7510
|
-
string: '{"survey":{"service_user_id":"
|
7819
|
+
string: '{"survey":{"service_user_id":"6335abccec5f3a3ae12dc8cd33cd8052e812964c76fc2011767c28f966a21afa"}}'
|
7511
7820
|
headers:
|
7512
7821
|
User-Agent:
|
7513
7822
|
- Faraday v0.9.0
|
@@ -7535,17 +7844,17 @@ http_interactions:
|
|
7535
7844
|
Content-Type:
|
7536
7845
|
- application/json; charset=utf-8
|
7537
7846
|
Etag:
|
7538
|
-
- '"
|
7847
|
+
- '"a4269f3e0964b41254205f9648e72b21"'
|
7539
7848
|
Cache-Control:
|
7540
7849
|
- max-age=0, private, must-revalidate
|
7541
7850
|
X-Request-Id:
|
7542
|
-
-
|
7851
|
+
- c0415fe2-a6d6-4921-b4d0-93ec7a0b825a
|
7543
7852
|
X-Runtime:
|
7544
|
-
- '0.
|
7853
|
+
- '0.011549'
|
7545
7854
|
Server:
|
7546
7855
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7547
7856
|
Date:
|
7548
|
-
-
|
7857
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7549
7858
|
Content-Length:
|
7550
7859
|
- '430'
|
7551
7860
|
Connection:
|
@@ -7554,18 +7863,18 @@ http_interactions:
|
|
7554
7863
|
encoding: UTF-8
|
7555
7864
|
string: |-
|
7556
7865
|
{
|
7557
|
-
"id":
|
7558
|
-
"service_user_id": "
|
7866
|
+
"id": 89,
|
7867
|
+
"service_user_id": "6335abccec5f3a3ae12dc8cd33cd8052e812964c76fc2011767c28f966a21afa",
|
7559
7868
|
"_links": {
|
7560
7869
|
"self": {
|
7561
|
-
"href": "http://localhost:3000/api/surveys/
|
7870
|
+
"href": "http://localhost:3000/api/surveys/89"
|
7562
7871
|
},
|
7563
7872
|
"survey_questions": {
|
7564
7873
|
"post": {
|
7565
|
-
"href": "/api/surveys/
|
7874
|
+
"href": "/api/surveys/89/survey_questions"
|
7566
7875
|
},
|
7567
7876
|
"put": {
|
7568
|
-
"href": "/api/surveys/
|
7877
|
+
"href": "/api/surveys/89/survey_questions"
|
7569
7878
|
}
|
7570
7879
|
}
|
7571
7880
|
},
|
@@ -7575,10 +7884,10 @@ http_interactions:
|
|
7575
7884
|
]
|
7576
7885
|
}
|
7577
7886
|
http_version:
|
7578
|
-
recorded_at:
|
7887
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7579
7888
|
- request:
|
7580
7889
|
method: post
|
7581
|
-
uri: http://localhost:3000//api/surveys/
|
7890
|
+
uri: http://localhost:3000//api/surveys/89/survey_questions/
|
7582
7891
|
body:
|
7583
7892
|
encoding: UTF-8
|
7584
7893
|
string: '{"survey_question":{"question_id":25}}'
|
@@ -7609,141 +7918,59 @@ http_interactions:
|
|
7609
7918
|
Content-Type:
|
7610
7919
|
- application/json; charset=utf-8
|
7611
7920
|
Etag:
|
7612
|
-
- '"
|
7921
|
+
- '"45a592961a9cfe4891de1f273856221a"'
|
7613
7922
|
Cache-Control:
|
7614
7923
|
- max-age=0, private, must-revalidate
|
7615
7924
|
X-Request-Id:
|
7616
|
-
-
|
7925
|
+
- 6d6c5804-eca3-499b-9c70-d1ac45866635
|
7617
7926
|
X-Runtime:
|
7618
|
-
- '0.
|
7927
|
+
- '0.012416'
|
7619
7928
|
Server:
|
7620
7929
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7621
7930
|
Date:
|
7622
|
-
-
|
7931
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7623
7932
|
Content-Length:
|
7624
|
-
- '
|
7933
|
+
- '494'
|
7625
7934
|
Connection:
|
7626
7935
|
- Keep-Alive
|
7627
7936
|
body:
|
7628
7937
|
encoding: UTF-8
|
7629
7938
|
string: |-
|
7630
7939
|
{
|
7631
|
-
"id":
|
7632
|
-
"
|
7633
|
-
"
|
7634
|
-
"
|
7940
|
+
"id": 282,
|
7941
|
+
"text": "Where are you?",
|
7942
|
+
"type": "multiple",
|
7943
|
+
"responses": [
|
7944
|
+
"At Home",
|
7945
|
+
"At Work",
|
7946
|
+
"In a car",
|
7947
|
+
"Other"
|
7948
|
+
],
|
7635
7949
|
"answer": null,
|
7636
|
-
"
|
7637
|
-
"updated_at": "2014-09-21T20:28:01.949Z"
|
7638
|
-
}
|
7639
|
-
http_version:
|
7640
|
-
recorded_at: Sun, 21 Sep 2014 20:28:01 GMT
|
7641
|
-
- request:
|
7642
|
-
method: get
|
7643
|
-
uri: http://localhost:3000/api/surveys/86
|
7644
|
-
body:
|
7645
|
-
encoding: US-ASCII
|
7646
|
-
string: ''
|
7647
|
-
headers:
|
7648
|
-
User-Agent:
|
7649
|
-
- Faraday v0.9.0
|
7650
|
-
Content-Type:
|
7651
|
-
- application/json
|
7652
|
-
Api-Token:
|
7653
|
-
- testing
|
7654
|
-
Accept-Encoding:
|
7655
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
7656
|
-
Accept:
|
7657
|
-
- "*/*"
|
7658
|
-
response:
|
7659
|
-
status:
|
7660
|
-
code: 200
|
7661
|
-
message: 'OK '
|
7662
|
-
headers:
|
7663
|
-
X-Frame-Options:
|
7664
|
-
- SAMEORIGIN
|
7665
|
-
X-Xss-Protection:
|
7666
|
-
- 1; mode=block
|
7667
|
-
X-Content-Type-Options:
|
7668
|
-
- nosniff
|
7669
|
-
X-Ua-Compatible:
|
7670
|
-
- chrome=1
|
7671
|
-
Content-Type:
|
7672
|
-
- application/json; charset=utf-8
|
7673
|
-
Etag:
|
7674
|
-
- '"8b4f82eba1438597db1f7510c051bdf4"'
|
7675
|
-
Cache-Control:
|
7676
|
-
- max-age=0, private, must-revalidate
|
7677
|
-
X-Request-Id:
|
7678
|
-
- 46bdef44-4668-46d4-af05-22567a593001
|
7679
|
-
X-Runtime:
|
7680
|
-
- '0.009840'
|
7681
|
-
Server:
|
7682
|
-
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7683
|
-
Date:
|
7684
|
-
- Sun, 21 Sep 2014 20:28:01 GMT
|
7685
|
-
Content-Length:
|
7686
|
-
- '1032'
|
7687
|
-
Connection:
|
7688
|
-
- Keep-Alive
|
7689
|
-
body:
|
7690
|
-
encoding: UTF-8
|
7691
|
-
string: |-
|
7692
|
-
{
|
7693
|
-
"id": 86,
|
7694
|
-
"service_user_id": "e81f9df2f19ac3d0e4634061bff685bbb732abb269049eafdd4fa9ae7c836c6b",
|
7950
|
+
"freeform": true,
|
7695
7951
|
"_links": {
|
7696
7952
|
"self": {
|
7697
|
-
"href": "
|
7953
|
+
"href": "/api/surveys/89/survey_questions/282"
|
7698
7954
|
},
|
7699
|
-
"
|
7700
|
-
"
|
7701
|
-
|
7702
|
-
|
7703
|
-
"
|
7704
|
-
|
7705
|
-
|
7706
|
-
|
7707
|
-
},
|
7708
|
-
"completed": false,
|
7709
|
-
"survey_questions": [
|
7710
|
-
{
|
7711
|
-
"id": 274,
|
7712
|
-
"text": "Where are you?",
|
7713
|
-
"type": "multiple",
|
7714
|
-
"responses": [
|
7715
|
-
"At Home",
|
7716
|
-
"At Work",
|
7717
|
-
"In a car",
|
7718
|
-
"Other"
|
7719
|
-
],
|
7720
|
-
"answer": null,
|
7721
|
-
"freeform": true,
|
7722
|
-
"_links": {
|
7723
|
-
"self": {
|
7724
|
-
"href": "/api/surveys/86/survey_questions/274"
|
7725
|
-
},
|
7726
|
-
"post": {
|
7727
|
-
"href": "http://localhost:3000/api/surveys/86/survey_questions"
|
7728
|
-
},
|
7729
|
-
"put": {
|
7730
|
-
"href": "/api/surveys/86/survey_questions/274"
|
7731
|
-
},
|
7732
|
-
"survey": {
|
7733
|
-
"href": "/api/surveys/86"
|
7734
|
-
}
|
7735
|
-
}
|
7955
|
+
"post": {
|
7956
|
+
"href": "http://localhost:3000/api/surveys/89/survey_questions"
|
7957
|
+
},
|
7958
|
+
"put": {
|
7959
|
+
"href": "/api/surveys/89/survey_questions/282"
|
7960
|
+
},
|
7961
|
+
"survey": {
|
7962
|
+
"href": "/api/surveys/89"
|
7736
7963
|
}
|
7737
|
-
|
7964
|
+
}
|
7738
7965
|
}
|
7739
7966
|
http_version:
|
7740
|
-
recorded_at:
|
7967
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7741
7968
|
- request:
|
7742
7969
|
method: put
|
7743
|
-
uri: http://localhost:3000//api/surveys/
|
7970
|
+
uri: http://localhost:3000//api/surveys/89/survey_questions/282/
|
7744
7971
|
body:
|
7745
7972
|
encoding: UTF-8
|
7746
|
-
string: '{"id":
|
7973
|
+
string: '{"id":282,"survey_question":{"answer":"At Home"}}'
|
7747
7974
|
headers:
|
7748
7975
|
User-Agent:
|
7749
7976
|
- Faraday v0.9.0
|
@@ -7771,23 +7998,23 @@ http_interactions:
|
|
7771
7998
|
Cache-Control:
|
7772
7999
|
- no-cache
|
7773
8000
|
X-Request-Id:
|
7774
|
-
-
|
8001
|
+
- 688063e1-42d1-42e1-bafe-41f7fd0da690
|
7775
8002
|
X-Runtime:
|
7776
|
-
- '0.
|
8003
|
+
- '0.008307'
|
7777
8004
|
Server:
|
7778
8005
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7779
8006
|
Date:
|
7780
|
-
-
|
8007
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7781
8008
|
Connection:
|
7782
8009
|
- Keep-Alive
|
7783
8010
|
body:
|
7784
8011
|
encoding: UTF-8
|
7785
8012
|
string: ''
|
7786
8013
|
http_version:
|
7787
|
-
recorded_at:
|
8014
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7788
8015
|
- request:
|
7789
8016
|
method: get
|
7790
|
-
uri: http://localhost:3000/api/surveys/
|
8017
|
+
uri: http://localhost:3000/api/surveys/89
|
7791
8018
|
body:
|
7792
8019
|
encoding: US-ASCII
|
7793
8020
|
string: ''
|
@@ -7818,17 +8045,17 @@ http_interactions:
|
|
7818
8045
|
Content-Type:
|
7819
8046
|
- application/json; charset=utf-8
|
7820
8047
|
Etag:
|
7821
|
-
- '"
|
8048
|
+
- '"e8d7e1515d5eb0e33109154809c26859"'
|
7822
8049
|
Cache-Control:
|
7823
8050
|
- max-age=0, private, must-revalidate
|
7824
8051
|
X-Request-Id:
|
7825
|
-
-
|
8052
|
+
- effa9a34-db68-45bc-8703-b6075916e796
|
7826
8053
|
X-Runtime:
|
7827
|
-
- '0.
|
8054
|
+
- '0.014200'
|
7828
8055
|
Server:
|
7829
8056
|
- WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
|
7830
8057
|
Date:
|
7831
|
-
-
|
8058
|
+
- Thu, 25 Sep 2014 02:22:48 GMT
|
7832
8059
|
Content-Length:
|
7833
8060
|
- '1037'
|
7834
8061
|
Connection:
|
@@ -7837,25 +8064,25 @@ http_interactions:
|
|
7837
8064
|
encoding: UTF-8
|
7838
8065
|
string: |-
|
7839
8066
|
{
|
7840
|
-
"id":
|
7841
|
-
"service_user_id": "
|
8067
|
+
"id": 89,
|
8068
|
+
"service_user_id": "6335abccec5f3a3ae12dc8cd33cd8052e812964c76fc2011767c28f966a21afa",
|
7842
8069
|
"_links": {
|
7843
8070
|
"self": {
|
7844
|
-
"href": "http://localhost:3000/api/surveys/
|
8071
|
+
"href": "http://localhost:3000/api/surveys/89"
|
7845
8072
|
},
|
7846
8073
|
"survey_questions": {
|
7847
8074
|
"post": {
|
7848
|
-
"href": "/api/surveys/
|
8075
|
+
"href": "/api/surveys/89/survey_questions"
|
7849
8076
|
},
|
7850
8077
|
"put": {
|
7851
|
-
"href": "/api/surveys/
|
8078
|
+
"href": "/api/surveys/89/survey_questions"
|
7852
8079
|
}
|
7853
8080
|
}
|
7854
8081
|
},
|
7855
8082
|
"completed": false,
|
7856
8083
|
"survey_questions": [
|
7857
8084
|
{
|
7858
|
-
"id":
|
8085
|
+
"id": 282,
|
7859
8086
|
"text": "Where are you?",
|
7860
8087
|
"type": "multiple",
|
7861
8088
|
"responses": [
|
@@ -7868,21 +8095,21 @@ http_interactions:
|
|
7868
8095
|
"freeform": true,
|
7869
8096
|
"_links": {
|
7870
8097
|
"self": {
|
7871
|
-
"href": "/api/surveys/
|
8098
|
+
"href": "/api/surveys/89/survey_questions/282"
|
7872
8099
|
},
|
7873
8100
|
"post": {
|
7874
|
-
"href": "http://localhost:3000/api/surveys/
|
8101
|
+
"href": "http://localhost:3000/api/surveys/89/survey_questions"
|
7875
8102
|
},
|
7876
8103
|
"put": {
|
7877
|
-
"href": "/api/surveys/
|
8104
|
+
"href": "/api/surveys/89/survey_questions/282"
|
7878
8105
|
},
|
7879
8106
|
"survey": {
|
7880
|
-
"href": "/api/surveys/
|
8107
|
+
"href": "/api/surveys/89"
|
7881
8108
|
}
|
7882
8109
|
}
|
7883
8110
|
}
|
7884
8111
|
]
|
7885
8112
|
}
|
7886
8113
|
http_version:
|
7887
|
-
recorded_at:
|
8114
|
+
recorded_at: Thu, 25 Sep 2014 02:22:48 GMT
|
7888
8115
|
recorded_with: VCR 2.6.0
|