poptart 0.0.13 → 0.0.14

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.
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,179 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/json
14
+ Api-Token:
15
+ - testing
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: 'OK '
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ua-Compatible:
32
+ - chrome=1
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Etag:
36
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 224142bb-7247-4576-8e38-373a6491db44
41
+ X-Runtime:
42
+ - '0.006127'
43
+ Server:
44
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
45
+ Date:
46
+ - Sun, 25 Jan 2015 13:37:39 GMT
47
+ Content-Length:
48
+ - '1469'
49
+ Connection:
50
+ - Keep-Alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |-
54
+ {
55
+ "_links": [
56
+ {
57
+ "href": "http://localhost:3000/",
58
+ "rel": "self",
59
+ "method": "GET"
60
+ },
61
+ {
62
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
63
+ "rel": "surveys",
64
+ "method": "GET"
65
+ },
66
+ {
67
+ "href": "http://localhost:3000/api/surveys",
68
+ "rel": "surveys",
69
+ "method": "POST"
70
+ },
71
+ {
72
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
73
+ "rel": "users",
74
+ "method": "GET"
75
+ },
76
+ {
77
+ "href": "http://localhost:3000/api/user",
78
+ "rel": "users",
79
+ "method": "POST"
80
+ },
81
+ {
82
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
83
+ "rel": "questions",
84
+ "method": "GET"
85
+ },
86
+ {
87
+ "href": "http://localhost:3000/api/questions",
88
+ "rel": "questions",
89
+ "method": "POST"
90
+ },
91
+ {
92
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
93
+ "rel": "survey-questions",
94
+ "method": "GET"
95
+ },
96
+ {
97
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
98
+ "rel": "survey-questions",
99
+ "method": "POST"
100
+ },
101
+ {
102
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
103
+ "rel": "survey-questions",
104
+ "method": "PUT"
105
+ },
106
+ {
107
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
108
+ "rel": "survey-questions-by-query",
109
+ "method": "GET"
110
+ }
111
+ ]
112
+ }
113
+ http_version:
114
+ recorded_at: Sun, 25 Jan 2015 13:37:39 GMT
115
+ - request:
116
+ method: post
117
+ uri: http://localhost:3000/api/user
118
+ body:
119
+ encoding: UTF-8
120
+ string: "{}"
121
+ headers:
122
+ User-Agent:
123
+ - Faraday v0.9.0
124
+ Content-Type:
125
+ - application/json
126
+ Api-Token:
127
+ - testing
128
+ Accept-Encoding:
129
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
130
+ Accept:
131
+ - "*/*"
132
+ response:
133
+ status:
134
+ code: 201
135
+ message: 'Created '
136
+ headers:
137
+ X-Frame-Options:
138
+ - SAMEORIGIN
139
+ X-Xss-Protection:
140
+ - 1; mode=block
141
+ X-Content-Type-Options:
142
+ - nosniff
143
+ X-Ua-Compatible:
144
+ - chrome=1
145
+ Content-Type:
146
+ - application/json; charset=utf-8
147
+ Etag:
148
+ - '"8b035d9deedc38add24b298417e4ada0"'
149
+ Cache-Control:
150
+ - max-age=0, private, must-revalidate
151
+ X-Request-Id:
152
+ - 2e3699b7-1cac-4023-a01c-f7a483bf0600
153
+ X-Runtime:
154
+ - '0.008520'
155
+ Server:
156
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
157
+ Date:
158
+ - Sun, 25 Jan 2015 13:37:39 GMT
159
+ Content-Length:
160
+ - '292'
161
+ Connection:
162
+ - Keep-Alive
163
+ body:
164
+ encoding: UTF-8
165
+ string: |-
166
+ {
167
+ "service_user_id": "c20ea857f90b281eb1b19c6ec9d0012bd4bed705f9b16711d9ed5bd0d3cd52b5",
168
+ "_links": [
169
+ {
170
+ "href": "http://localhost:3000/api/user",
171
+ "rel": "self",
172
+ "method": "GET"
173
+ }
174
+ ],
175
+ "token": "31c9f428651e64eb0c6bb7524fc7a7cfa3a0e8d8cdc4c0f6cb8b796c469adf75"
176
+ }
177
+ http_version:
178
+ recorded_at: Sun, 25 Jan 2015 13:37:39 GMT
179
+ recorded_with: VCR 2.9.3
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: post
5
- uri: http://localhost:3000/api/users/
4
+ method: get
5
+ uri: http://localhost:3000/
6
6
  body:
7
- encoding: UTF-8
8
- string: "{}"
7
+ encoding: US-ASCII
8
+ string: ''
9
9
  headers:
10
10
  User-Agent:
11
11
  - Faraday v0.9.0
@@ -19,8 +19,8 @@ http_interactions:
19
19
  - "*/*"
20
20
  response:
21
21
  status:
22
- code: 201
23
- message: 'Created '
22
+ code: 200
23
+ message: 'OK '
24
24
  headers:
25
25
  X-Frame-Options:
26
26
  - SAMEORIGIN
@@ -33,42 +33,51 @@ http_interactions:
33
33
  Content-Type:
34
34
  - application/json; charset=utf-8
35
35
  Etag:
36
- - '"903006ae2ce12ab6070ee76670a487bb"'
36
+ - '"cd727c0ba392005a102fbf8dc32be000"'
37
37
  Cache-Control:
38
38
  - max-age=0, private, must-revalidate
39
39
  X-Request-Id:
40
- - 5bcdbb1e-8c13-46f0-aab2-482c64577c0e
40
+ - 12010c2d-c474-45d0-975e-ca27601110fc
41
41
  X-Runtime:
42
- - '0.006907'
42
+ - '0.008912'
43
43
  Server:
44
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
44
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
45
45
  Date:
46
- - Sat, 20 Sep 2014 14:14:34 GMT
46
+ - Sat, 03 Jan 2015 19:10:40 GMT
47
47
  Content-Length:
48
- - '272'
48
+ - '479'
49
49
  Connection:
50
50
  - Keep-Alive
51
51
  body:
52
52
  encoding: UTF-8
53
53
  string: |-
54
54
  {
55
- "id": 13,
56
- "service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
57
55
  "_links": {
58
56
  "self": {
59
- "href": "http://localhost:3000/api/users/13"
57
+ "href": "http://localhost:3000/"
58
+ },
59
+ "surveys": {
60
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}"
61
+ },
62
+ "users": {
63
+ "href": "http://localhost:3000/api/user{/id}{?query*}"
64
+ },
65
+ "questions": {
66
+ "href": "http://localhost:3000/api/questions{/id}{?query*}"
67
+ },
68
+ "survey_questions": {
69
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}"
60
70
  }
61
- },
62
- "token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
71
+ }
63
72
  }
64
73
  http_version:
65
- recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
74
+ recorded_at: Sat, 03 Jan 2015 19:10:40 GMT
66
75
  - request:
67
- method: get
68
- uri: http://localhost:3000/
76
+ method: post
77
+ uri: http://localhost:3000/api/user
69
78
  body:
70
- encoding: US-ASCII
71
- string: ''
79
+ encoding: UTF-8
80
+ string: "{}"
72
81
  headers:
73
82
  User-Agent:
74
83
  - Faraday v0.9.0
@@ -82,8 +91,8 @@ http_interactions:
82
91
  - "*/*"
83
92
  response:
84
93
  status:
85
- code: 200
86
- message: 'OK '
94
+ code: 201
95
+ message: 'Created '
87
96
  headers:
88
97
  X-Frame-Options:
89
98
  - SAMEORIGIN
@@ -96,51 +105,43 @@ http_interactions:
96
105
  Content-Type:
97
106
  - application/json; charset=utf-8
98
107
  Etag:
99
- - '"2aa11a1ab77b139e58f765299f923a01"'
108
+ - '"8b035d9deedc38add24b298417e4ada0"'
100
109
  Cache-Control:
101
110
  - max-age=0, private, must-revalidate
102
111
  X-Request-Id:
103
- - 3d9d0667-75a4-4108-a1dd-26aa65ae4fee
112
+ - 264336a8-ef07-494f-a895-8410730faa84
104
113
  X-Runtime:
105
- - '0.004854'
114
+ - '0.006582'
106
115
  Server:
107
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
116
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
108
117
  Date:
109
- - Sat, 18 Oct 2014 17:23:04 GMT
118
+ - Sun, 25 Jan 2015 13:37:39 GMT
110
119
  Content-Length:
111
- - '469'
120
+ - '292'
112
121
  Connection:
113
122
  - Keep-Alive
114
123
  body:
115
124
  encoding: UTF-8
116
125
  string: |-
117
126
  {
118
- "_links": {
119
- "self": {
120
- "href": "http://localhost:3000/"
121
- },
122
- "surveys": {
123
- "href": "http://localhost:3000/api/surveys{/id}{?query*}"
124
- },
125
- "users": {
126
- "href": "http://localhost:3000/api/users{/id}{?query*}"
127
- },
128
- "questions": {
129
- "href": "http://localhost:3000/api/questions{/id}{?query*}"
130
- },
131
- "survey_questions": {
132
- "href": "http://localhost:3000/api/questions{/question_id}/survey_questions{?query*}"
127
+ "service_user_id": "c20ea857f90b281eb1b19c6ec9d0012bd4bed705f9b16711d9ed5bd0d3cd52b5",
128
+ "_links": [
129
+ {
130
+ "href": "http://localhost:3000/api/user",
131
+ "rel": "self",
132
+ "method": "GET"
133
133
  }
134
- }
134
+ ],
135
+ "token": "31c9f428651e64eb0c6bb7524fc7a7cfa3a0e8d8cdc4c0f6cb8b796c469adf75"
135
136
  }
136
137
  http_version:
137
- recorded_at: Sat, 18 Oct 2014 17:23:04 GMT
138
+ recorded_at: Sun, 25 Jan 2015 13:37:39 GMT
138
139
  - request:
139
- method: post
140
- uri: http://localhost:3000/api/users
140
+ method: get
141
+ uri: http://localhost:3000/api/user
141
142
  body:
142
- encoding: UTF-8
143
- string: "{}"
143
+ encoding: US-ASCII
144
+ string: ''
144
145
  headers:
145
146
  User-Agent:
146
147
  - Faraday v0.9.0
@@ -149,17 +150,17 @@ http_interactions:
149
150
  Api-Token:
150
151
  - testing
151
152
  User-Token:
152
- - 440198e9b51b97a8d9d9a4466f5fc014f32b961ad0f2b5423c94070ef5fb5d4c
153
+ - 31c9f428651e64eb0c6bb7524fc7a7cfa3a0e8d8cdc4c0f6cb8b796c469adf75
153
154
  Service-User-Id:
154
- - 9ca365303eaa6b3b8d5588ea43d7d55de8a571918e30278cceaba70ed416bc00
155
+ - c20ea857f90b281eb1b19c6ec9d0012bd4bed705f9b16711d9ed5bd0d3cd52b5
155
156
  Accept-Encoding:
156
157
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
157
158
  Accept:
158
159
  - "*/*"
159
160
  response:
160
161
  status:
161
- code: 201
162
- message: 'Created '
162
+ code: 200
163
+ message: 'OK '
163
164
  headers:
164
165
  X-Frame-Options:
165
166
  - SAMEORIGIN
@@ -172,33 +173,35 @@ http_interactions:
172
173
  Content-Type:
173
174
  - application/json; charset=utf-8
174
175
  Etag:
175
- - '"de524230fc03846624c6b07bdfb110c2"'
176
+ - '"8b035d9deedc38add24b298417e4ada0"'
176
177
  Cache-Control:
177
178
  - max-age=0, private, must-revalidate
178
179
  X-Request-Id:
179
- - 08c1d1c8-632b-4d10-b6cc-3567546f27f1
180
+ - 7c4ade70-1f4e-468c-9690-1426a6dd9efb
180
181
  X-Runtime:
181
- - '0.009305'
182
+ - '0.007437'
182
183
  Server:
183
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
184
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
184
185
  Date:
185
- - Sat, 18 Oct 2014 17:31:13 GMT
186
+ - Sun, 25 Jan 2015 13:37:39 GMT
186
187
  Content-Length:
187
- - '261'
188
+ - '292'
188
189
  Connection:
189
190
  - Keep-Alive
190
191
  body:
191
192
  encoding: UTF-8
192
193
  string: |-
193
194
  {
194
- "service_user_id": "b98f19d9fc82b2d6ee9845a3844454b98a9f5b47a2b16dd48e768d18167c8133",
195
- "_links": {
196
- "self": {
197
- "href": "http://localhost:3000/api/users/156"
195
+ "service_user_id": "c20ea857f90b281eb1b19c6ec9d0012bd4bed705f9b16711d9ed5bd0d3cd52b5",
196
+ "_links": [
197
+ {
198
+ "href": "http://localhost:3000/api/user",
199
+ "rel": "self",
200
+ "method": "GET"
198
201
  }
199
- },
200
- "token": "2d1af3825c28236b06e594daf2fcfec5edd7aed545beb06ea81becc246598385"
202
+ ],
203
+ "token": "31c9f428651e64eb0c6bb7524fc7a7cfa3a0e8d8cdc4c0f6cb8b796c469adf75"
201
204
  }
202
205
  http_version:
203
- recorded_at: Sat, 18 Oct 2014 17:31:13 GMT
204
- recorded_with: VCR 2.6.0
206
+ recorded_at: Sun, 25 Jan 2015 13:37:39 GMT
207
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,186 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3000/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/json
14
+ Api-Token:
15
+ - testing
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ Accept:
19
+ - "*/*"
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: 'OK '
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Ua-Compatible:
32
+ - chrome=1
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Etag:
36
+ - '"3a543c1faf13608a2dcffc78fccf95fd"'
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - c6203d4d-c29b-47f4-ad8c-a1e27cee085b
41
+ X-Runtime:
42
+ - '0.068678'
43
+ Server:
44
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
45
+ Date:
46
+ - Sun, 25 Jan 2015 13:35:18 GMT
47
+ Content-Length:
48
+ - '1469'
49
+ Connection:
50
+ - Keep-Alive
51
+ body:
52
+ encoding: UTF-8
53
+ string: |-
54
+ {
55
+ "_links": [
56
+ {
57
+ "href": "http://localhost:3000/",
58
+ "rel": "self",
59
+ "method": "GET"
60
+ },
61
+ {
62
+ "href": "http://localhost:3000/api/surveys{/id}{?query*}",
63
+ "rel": "surveys",
64
+ "method": "GET"
65
+ },
66
+ {
67
+ "href": "http://localhost:3000/api/surveys",
68
+ "rel": "surveys",
69
+ "method": "POST"
70
+ },
71
+ {
72
+ "href": "http://localhost:3000/api/user{/id}{?query*}",
73
+ "rel": "users",
74
+ "method": "GET"
75
+ },
76
+ {
77
+ "href": "http://localhost:3000/api/user",
78
+ "rel": "users",
79
+ "method": "POST"
80
+ },
81
+ {
82
+ "href": "http://localhost:3000/api/questions{/id}{?query*}",
83
+ "rel": "questions",
84
+ "method": "GET"
85
+ },
86
+ {
87
+ "href": "http://localhost:3000/api/questions",
88
+ "rel": "questions",
89
+ "method": "POST"
90
+ },
91
+ {
92
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}{?query*}",
93
+ "rel": "survey-questions",
94
+ "method": "GET"
95
+ },
96
+ {
97
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions",
98
+ "rel": "survey-questions",
99
+ "method": "POST"
100
+ },
101
+ {
102
+ "href": "http://localhost:3000/api/questions/surveys/{survey_id}/survey_questions{/id}",
103
+ "rel": "survey-questions",
104
+ "method": "PUT"
105
+ },
106
+ {
107
+ "href": "http://localhost:3000/api/questions/survey_questions{?query*}",
108
+ "rel": "survey-questions-by-query",
109
+ "method": "GET"
110
+ }
111
+ ]
112
+ }
113
+ http_version:
114
+ recorded_at: Sun, 25 Jan 2015 13:35:18 GMT
115
+ - request:
116
+ method: post
117
+ uri: http://localhost:3000/api/questions
118
+ body:
119
+ encoding: UTF-8
120
+ string: '{"question":{"question_type":"boolean","responses":[true,false],"text":"Do
121
+ you like poptarts?","key":"poptarts"}}'
122
+ headers:
123
+ User-Agent:
124
+ - Faraday v0.9.0
125
+ Content-Type:
126
+ - application/json
127
+ Api-Token:
128
+ - testing
129
+ Accept-Encoding:
130
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
131
+ Accept:
132
+ - "*/*"
133
+ response:
134
+ status:
135
+ code: 201
136
+ message: 'Created '
137
+ headers:
138
+ X-Frame-Options:
139
+ - SAMEORIGIN
140
+ X-Xss-Protection:
141
+ - 1; mode=block
142
+ X-Content-Type-Options:
143
+ - nosniff
144
+ X-Ua-Compatible:
145
+ - chrome=1
146
+ Content-Type:
147
+ - application/json; charset=utf-8
148
+ Etag:
149
+ - '"49c89253cd49f6f1a2afca94fa524df9"'
150
+ Cache-Control:
151
+ - max-age=0, private, must-revalidate
152
+ X-Request-Id:
153
+ - a8b92fa6-055e-45c3-8689-5ba6dc70b808
154
+ X-Runtime:
155
+ - '0.023817'
156
+ Server:
157
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
158
+ Date:
159
+ - Sun, 25 Jan 2015 13:35:18 GMT
160
+ Content-Length:
161
+ - '272'
162
+ Connection:
163
+ - Keep-Alive
164
+ body:
165
+ encoding: UTF-8
166
+ string: |-
167
+ {
168
+ "id": 79,
169
+ "question_type": "boolean",
170
+ "text": "Do you like poptarts?",
171
+ "responses": [
172
+ true,
173
+ false
174
+ ],
175
+ "key": "poptarts",
176
+ "_links": [
177
+ {
178
+ "rel": "self",
179
+ "href": "http://localhost:3000/api/questions/79",
180
+ "method": "GET"
181
+ }
182
+ ]
183
+ }
184
+ http_version:
185
+ recorded_at: Sun, 25 Jan 2015 13:35:18 GMT
186
+ recorded_with: VCR 2.9.3