openstax_exchange 0.0.2 → 0.1.0

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 (18) hide show
  1. data/.gitignore +1 -0
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +3 -1
  4. data/exchange-client.gemspec +1 -0
  5. data/lib/openstax/exchange/exchange.rb +4 -4
  6. data/lib/openstax/exchange/fake_client/fake_client.rb +11 -10
  7. data/lib/openstax/exchange/real_client/real_client.rb +14 -4
  8. data/lib/openstax/exchange/version.rb +1 -1
  9. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/{_create_identifier → _create_identifiers}/success/creates_and_returns_a_new_identifier.yml +27 -20
  10. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/{_create_identifier/success/creates_a_distinct_identifer_per_invokation.yml → _create_identifiers/success/creates_distinct_identifiers_per_invokation.yml} +42 -31
  11. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/duplicate_identifer_resource_trial_triplet/{raises_an_exception.yml → records_the_new_answer.yml} +44 -40
  12. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/invalid_resource_string/raises_an_exception.yml +40 -31
  13. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_identifiers_to_be_saved.yml +70 -55
  14. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_resources_to_be_saved.yml +55 -44
  15. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_trials_to_be_saved.yml +55 -44
  16. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/creates_a_multiple_choice_answer_associated_with_the_given_identifier.yml +41 -32
  17. data/spec/lib/openstax/exchange/shared_examples_for_exchange_client_v1.rb +40 -24
  18. metadata +26 -10
@@ -4,15 +4,17 @@ http_interactions:
4
4
  method: post
5
5
  uri: http://123:abc@localhost:3003/oauth/token
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: grant_type=client_credentials
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.0
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  Accept:
15
- - ! '*/*'
17
+ - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -31,35 +33,40 @@ http_interactions:
31
33
  Content-Type:
32
34
  - application/json; charset=utf-8
33
35
  Etag:
34
- - W/"e82148ecc7398094123885adfdba75c5"
36
+ - W/"8038f39b5672fab098184d08f2f4bd70"
35
37
  X-Request-Id:
36
- - 6b1be560-90d3-43fb-bd3f-d798b7a8e167
38
+ - a1ef40d7-78e2-4857-b8ce-92842c4be3be
37
39
  X-Runtime:
38
- - '0.018834'
40
+ - '0.016318'
39
41
  Connection:
40
42
  - close
41
43
  Server:
42
44
  - thin
43
45
  body:
44
- encoding: US-ASCII
45
- string: ! '{"access_token":"e244b488c23861c57ced25c8dc53fa6335243fafc4f09df2e84d27a4256142d8","token_type":"bearer"}'
46
+ encoding: UTF-8
47
+ string: '{"access_token":"c4b2ebb02eb719e7d5774b611f805a64458a1580ca35915cbee740cadf577b5c","token_type":"bearer","scope":"read
48
+ write","created_at":1430246610}'
46
49
  http_version:
47
- recorded_at: Mon, 12 Jan 2015 21:08:53 GMT
50
+ recorded_at: Tue, 28 Apr 2015 18:43:30 GMT
48
51
  - request:
49
52
  method: post
50
53
  uri: http://localhost:3003/api/identifiers
51
54
  body:
52
- encoding: US-ASCII
55
+ encoding: UTF-8
53
56
  string: ''
54
57
  headers:
55
58
  User-Agent:
56
- - Faraday v0.9.0
59
+ - Faraday v0.9.1
57
60
  Accept:
58
61
  - application/vnd.exchange.openstax.v1
62
+ Content-Type:
63
+ - application/json
59
64
  Authorization:
60
- - Bearer e244b488c23861c57ced25c8dc53fa6335243fafc4f09df2e84d27a4256142d8
65
+ - Bearer c4b2ebb02eb719e7d5774b611f805a64458a1580ca35915cbee740cadf577b5c
61
66
  Content-Length:
62
67
  - '0'
68
+ Accept-Encoding:
69
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
70
  response:
64
71
  status:
65
72
  code: 201
@@ -71,44 +78,46 @@ http_interactions:
71
78
  - 1; mode=block
72
79
  X-Content-Type-Options:
73
80
  - nosniff
81
+ Date:
82
+ - Tue, 28 Apr 2015 18:43:30 GMT
74
83
  Content-Type:
75
84
  - application/json; charset=utf-8
76
85
  Etag:
77
- - W/"f1c4f3ca5efef827df31d6a1a9b9b34b"
86
+ - W/"c0bf68c3e7bf734f44a55906c592d676"
78
87
  Cache-Control:
79
88
  - max-age=0, private, must-revalidate
80
89
  Set-Cookie:
81
- - _exercises_session=WGZYRWhJSVNaY3JySjVGdlMwQmtqQmRVbWZWRmNrdDNJSzNTQ1h0Q1BqNmJGU2xzdFQrbCtHQnBjVUNYbWtMRXRncHhYLzNHR241cjBRTUVDdWJLMUE9PS0tNm50UlRhVmpBeWF1VGJzZGFIdU9DQT09--2c8ce07078730b3eadc71d842efc29034f100b80;
82
- path=/; HttpOnly
83
90
  - request_method=POST; path=/
84
91
  X-Request-Id:
85
- - f1b85a63-4661-4415-9682-223154ee95fe
92
+ - 294c9b50-fc6d-4ecd-aaa6-5acedf48e909
86
93
  X-Runtime:
87
- - '0.045214'
94
+ - '0.054547'
88
95
  Connection:
89
96
  - close
90
97
  Server:
91
98
  - thin
92
99
  body:
93
- encoding: US-ASCII
94
- string: ! '{"identifier":"649c2d0e63a37048191cad69cee18f795873ef19b222aa261d47c5711ece5ad8"}'
100
+ encoding: UTF-8
101
+ string: '{"read":"eab22f0ebf3287a2601060ebf24ac96574618b2d8651ae596ab5b834d1c9b11d","write":"90d7ab96c5d764bc8cf90664b00383234822829d48519cd316a4c1570ff0ae8d"}'
95
102
  http_version:
96
- recorded_at: Mon, 12 Jan 2015 21:08:53 GMT
103
+ recorded_at: Tue, 28 Apr 2015 18:43:30 GMT
97
104
  - request:
98
105
  method: post
99
106
  uri: http://localhost:3003/api/events/platforms/multiple_choices
100
107
  body:
101
108
  encoding: UTF-8
102
- string: ! '{"identifier":"649c2d0e63a37048191cad69cee18f795873ef19b222aa261d47c5711ece5ad8","resource":"http://example.com/exercises/1234","trial":"1","answer":"answer_string"}'
109
+ string: '{"identifier":"90d7ab96c5d764bc8cf90664b00383234822829d48519cd316a4c1570ff0ae8d","resource":"https://example.com/api/exercises/123@1","trial":"1","answer":"answer_string"}'
103
110
  headers:
104
111
  User-Agent:
105
- - Faraday v0.9.0
112
+ - Faraday v0.9.1
106
113
  Accept:
107
114
  - application/vnd.exchange.openstax.v1
108
115
  Authorization:
109
- - Bearer e244b488c23861c57ced25c8dc53fa6335243fafc4f09df2e84d27a4256142d8
116
+ - Bearer c4b2ebb02eb719e7d5774b611f805a64458a1580ca35915cbee740cadf577b5c
110
117
  Content-Type:
111
- - application/x-www-form-urlencoded
118
+ - application/json
119
+ Accept-Encoding:
120
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
112
121
  response:
113
122
  status:
114
123
  code: 422
@@ -120,26 +129,26 @@ http_interactions:
120
129
  - 1; mode=block
121
130
  X-Content-Type-Options:
122
131
  - nosniff
132
+ Date:
133
+ - Tue, 28 Apr 2015 18:43:30 GMT
123
134
  Content-Type:
124
135
  - application/json; charset=utf-8
125
136
  Cache-Control:
126
137
  - no-cache
127
138
  Set-Cookie:
128
- - _exercises_session=cjVRUHV3OEc0L00rWEhQdGl4VDVONkhSbC9Wd0xyelNGVHFLRkxVUjE4d0xKYWdCZnBObTNkRVlRajhNbWYyNDcwK01razNlbHN5OWZVYVlUS2FoekE9PS0tbDh4N0VWTDRUdXhiRnVCeDd2NUlNdz09--0a57cbadaa3ebf05b46c4141001fe664f1ca05ca;
129
- path=/; HttpOnly
130
139
  - request_method=POST; path=/
131
140
  X-Request-Id:
132
- - cf5ec792-42bc-44b4-9716-ff31d9c9d645
141
+ - 46e18282-e846-4403-bc7a-38ba52ecf0c2
133
142
  X-Runtime:
134
- - '0.037583'
143
+ - '0.034391'
135
144
  Connection:
136
145
  - close
137
146
  Server:
138
147
  - thin
139
148
  body:
140
- encoding: US-ASCII
141
- string: ! '[{"code":"blank","data":{"model":{"id":null,"identifier_id":905,"resource_id":null,"trial":"1","due_at":null,"created_at":null,"updated_at":null},"attribute":"resource"},"kind":"activerecord","message":"can''t
149
+ encoding: UTF-8
150
+ string: '[{"code":"blank","data":{"model":{"id":null,"identifier_id":90,"resource_id":null,"trial":"1","due_at":null,"created_at":null,"updated_at":null},"attribute":"resource"},"kind":"activerecord","message":"can''t
142
151
  be blank","offending_inputs":"resource"}]'
143
152
  http_version:
144
- recorded_at: Mon, 12 Jan 2015 21:08:53 GMT
153
+ recorded_at: Tue, 28 Apr 2015 18:43:30 GMT
145
154
  recorded_with: VCR 2.9.3
@@ -4,15 +4,17 @@ http_interactions:
4
4
  method: post
5
5
  uri: http://123:abc@localhost:3003/oauth/token
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: grant_type=client_credentials
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.0
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  Accept:
15
- - ! '*/*'
17
+ - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -31,35 +33,40 @@ http_interactions:
31
33
  Content-Type:
32
34
  - application/json; charset=utf-8
33
35
  Etag:
34
- - W/"82884c9b3008af4ccaf46353aeeef132"
36
+ - W/"d043d549aeb46dddbe4f0922fdabcf9e"
35
37
  X-Request-Id:
36
- - 6f2fc9e1-1fef-4518-93dc-37648900170a
38
+ - b7b73c9c-39bb-4ce2-a92d-f0a62e5d763a
37
39
  X-Runtime:
38
- - '0.015095'
40
+ - '0.015010'
39
41
  Connection:
40
42
  - close
41
43
  Server:
42
44
  - thin
43
45
  body:
44
- encoding: US-ASCII
45
- string: ! '{"access_token":"08b427583d41d73a5672ec0fc8b97871bc0b694d52fc1087209a498fa68a9110","token_type":"bearer"}'
46
+ encoding: UTF-8
47
+ string: '{"access_token":"d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590","token_type":"bearer","scope":"read
48
+ write","created_at":1430246609}'
46
49
  http_version:
47
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
50
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
48
51
  - request:
49
52
  method: post
50
53
  uri: http://localhost:3003/api/identifiers
51
54
  body:
52
- encoding: US-ASCII
55
+ encoding: UTF-8
53
56
  string: ''
54
57
  headers:
55
58
  User-Agent:
56
- - Faraday v0.9.0
59
+ - Faraday v0.9.1
57
60
  Accept:
58
61
  - application/vnd.exchange.openstax.v1
62
+ Content-Type:
63
+ - application/json
59
64
  Authorization:
60
- - Bearer 08b427583d41d73a5672ec0fc8b97871bc0b694d52fc1087209a498fa68a9110
65
+ - Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
61
66
  Content-Length:
62
67
  - '0'
68
+ Accept-Encoding:
69
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
70
  response:
64
71
  status:
65
72
  code: 201
@@ -71,44 +78,48 @@ http_interactions:
71
78
  - 1; mode=block
72
79
  X-Content-Type-Options:
73
80
  - nosniff
81
+ Date:
82
+ - Tue, 28 Apr 2015 18:43:29 GMT
74
83
  Content-Type:
75
84
  - application/json; charset=utf-8
76
85
  Etag:
77
- - W/"cc8e379581092a35e843b81cbfd33d2b"
86
+ - W/"9b5c0073c87020ff48828e35d5efbc52"
78
87
  Cache-Control:
79
88
  - max-age=0, private, must-revalidate
80
89
  Set-Cookie:
81
- - _exercises_session=KzB4Ymw2a3pxSjliRlQ5ZVZFWlQxelBVNW1hVWZiWGowdWN5d296VFplTDUzZjV1QWJyaTdCRGdjMnhIbC9sbnZJQ1RKYkthOXIzRlBGQk1nMDNZRXc9PS0tMGVrK2ZyTjBWU0VjUlU0Ri9YRVE2Zz09--41d9dbc4721df5af04b5f4fa8ba0147184bde304;
82
- path=/; HttpOnly
83
90
  - request_method=POST; path=/
84
91
  X-Request-Id:
85
- - ba6a728a-6ebf-42b8-9f40-c20a90c285ee
92
+ - 6f1d3434-034c-4dd7-99fa-69a4fab224ad
86
93
  X-Runtime:
87
- - '0.042171'
94
+ - '0.056371'
88
95
  Connection:
89
96
  - close
90
97
  Server:
91
98
  - thin
92
99
  body:
93
- encoding: US-ASCII
94
- string: ! '{"identifier":"8619c5b7492c2221a1964a8bd4483ea7c4ec0704f5cfe7c4897e501de5ae755c"}'
100
+ encoding: UTF-8
101
+ string: '{"read":"d6329c4c0f8117452b94e8311f129657703a5d57ef32410e79ab5d27bf13d9f0","write":"bf0dd7361e6dcf036207d544dd29870bac0905a305a477bd22c9fe42c56bb10d"}'
95
102
  http_version:
96
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
103
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
97
104
  - request:
98
105
  method: post
99
106
  uri: http://localhost:3003/api/identifiers
100
107
  body:
101
- encoding: US-ASCII
108
+ encoding: UTF-8
102
109
  string: ''
103
110
  headers:
104
111
  User-Agent:
105
- - Faraday v0.9.0
112
+ - Faraday v0.9.1
106
113
  Accept:
107
114
  - application/vnd.exchange.openstax.v1
115
+ Content-Type:
116
+ - application/json
108
117
  Authorization:
109
- - Bearer 08b427583d41d73a5672ec0fc8b97871bc0b694d52fc1087209a498fa68a9110
118
+ - Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
110
119
  Content-Length:
111
120
  - '0'
121
+ Accept-Encoding:
122
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
112
123
  response:
113
124
  status:
114
125
  code: 201
@@ -120,44 +131,46 @@ http_interactions:
120
131
  - 1; mode=block
121
132
  X-Content-Type-Options:
122
133
  - nosniff
134
+ Date:
135
+ - Tue, 28 Apr 2015 18:43:29 GMT
123
136
  Content-Type:
124
137
  - application/json; charset=utf-8
125
138
  Etag:
126
- - W/"5838958de72eb3a04dae80c5d2a65a4d"
139
+ - W/"96523a59ab40a50cbceef7f17ee852b3"
127
140
  Cache-Control:
128
141
  - max-age=0, private, must-revalidate
129
142
  Set-Cookie:
130
- - _exercises_session=cTh0SUtoaE9qNk9Kd041L1lkamRNSE1mbEE1Wmd4TUVVZEFrTmw0WE4yLzJYU3B1K1lhVHNnY0VMdzZBREpPOExZUkl2eFNBV0V4cU9sRmVtQlM1WlE9PS0teGMrWUo3aGFFT3luTWJwa0UyT1MzQT09--380d39715f335d623df313c6148f6ab3340af9b8;
131
- path=/; HttpOnly
132
143
  - request_method=POST; path=/
133
144
  X-Request-Id:
134
- - 896f939e-0dd4-4f1a-a8f1-8995d382486b
145
+ - 8c537ee9-0cf8-46e8-83a6-6313cf508c8d
135
146
  X-Runtime:
136
- - '0.050707'
147
+ - '0.055481'
137
148
  Connection:
138
149
  - close
139
150
  Server:
140
151
  - thin
141
152
  body:
142
- encoding: US-ASCII
143
- string: ! '{"identifier":"aa9e51faf7833b6956153781c684cc8c35d4dd36d6f614a0bf48556710db5cc0"}'
153
+ encoding: UTF-8
154
+ string: '{"read":"b29d362fe3a8f45ed0b67e80af8a346065839dd5a4f08cb2ad84bedac306d87a","write":"91033f99a101434018fc0da47dda513f4e069f89ce4c6089cb1e2f48e94fd48d"}'
144
155
  http_version:
145
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
156
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
146
157
  - request:
147
158
  method: post
148
159
  uri: http://localhost:3003/api/events/platforms/multiple_choices
149
160
  body:
150
161
  encoding: UTF-8
151
- string: ! '{"identifier":"8619c5b7492c2221a1964a8bd4483ea7c4ec0704f5cfe7c4897e501de5ae755c","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","answer":"answer_string"}'
162
+ string: '{"identifier":"bf0dd7361e6dcf036207d544dd29870bac0905a305a477bd22c9fe42c56bb10d","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","answer":"answer_string"}'
152
163
  headers:
153
164
  User-Agent:
154
- - Faraday v0.9.0
165
+ - Faraday v0.9.1
155
166
  Accept:
156
167
  - application/vnd.exchange.openstax.v1
157
168
  Authorization:
158
- - Bearer 08b427583d41d73a5672ec0fc8b97871bc0b694d52fc1087209a498fa68a9110
169
+ - Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
159
170
  Content-Type:
160
- - application/x-www-form-urlencoded
171
+ - application/json
172
+ Accept-Encoding:
173
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
161
174
  response:
162
175
  status:
163
176
  code: 201
@@ -169,44 +182,46 @@ http_interactions:
169
182
  - 1; mode=block
170
183
  X-Content-Type-Options:
171
184
  - nosniff
185
+ Date:
186
+ - Tue, 28 Apr 2015 18:43:29 GMT
172
187
  Content-Type:
173
188
  - application/json; charset=utf-8
174
189
  Etag:
175
- - W/"ae12b9a761fcb42683b1bd4dee9441af"
190
+ - W/"71dd5e5428dfc907bc81231b49303966"
176
191
  Cache-Control:
177
192
  - max-age=0, private, must-revalidate
178
193
  Set-Cookie:
179
- - _exercises_session=Q01wRDFka2ZDVk8xRW1MaE5ERTk5dWdVWmhrVlFERFY5QTFRS0FQUnRFUW0raUFGOXM3cXdsM3owSW9RQjFWN1N1bm10WVdWSndMMUFiUXlId0dVTEE9PS0tVFh4K0hONllncll4K3ZPaWlEV01mdz09--001bc64a41e72905652fb2e291165f826b98c9e2;
180
- path=/; HttpOnly
181
194
  - request_method=POST; path=/
182
195
  X-Request-Id:
183
- - d7abcb98-3843-43ac-be4c-df8e31e7d2d4
196
+ - 45a0bfe3-e4c0-4a33-a98f-288875568a51
184
197
  X-Runtime:
185
- - '0.075641'
198
+ - '0.075970'
186
199
  Connection:
187
200
  - close
188
201
  Server:
189
202
  - thin
190
203
  body:
191
- encoding: US-ASCII
192
- string: ! '{"identifier":"8619c5b7492c2221a1964a8bd4483ea7c4ec0704f5cfe7c4897e501de5ae755c","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","created_at":"2015-01-12T21:08:52.635Z","answer_type":"multiple-choice","answer":"answer_string"}'
204
+ encoding: UTF-8
205
+ string: '{"identifier":"bf0dd7361e6dcf036207d544dd29870bac0905a305a477bd22c9fe42c56bb10d","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","created_at":"2015-04-28T18:43:29.691Z","answer_type":"multiple-choice","answer":"answer_string"}'
193
206
  http_version:
194
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
207
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
195
208
  - request:
196
209
  method: post
197
210
  uri: http://localhost:3003/api/events/platforms/multiple_choices
198
211
  body:
199
212
  encoding: UTF-8
200
- string: ! '{"identifier":"aa9e51faf7833b6956153781c684cc8c35d4dd36d6f614a0bf48556710db5cc0","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","answer":"answer_string"}'
213
+ string: '{"identifier":"91033f99a101434018fc0da47dda513f4e069f89ce4c6089cb1e2f48e94fd48d","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","answer":"answer_string"}'
201
214
  headers:
202
215
  User-Agent:
203
- - Faraday v0.9.0
216
+ - Faraday v0.9.1
204
217
  Accept:
205
218
  - application/vnd.exchange.openstax.v1
206
219
  Authorization:
207
- - Bearer 08b427583d41d73a5672ec0fc8b97871bc0b694d52fc1087209a498fa68a9110
220
+ - Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
208
221
  Content-Type:
209
- - application/x-www-form-urlencoded
222
+ - application/json
223
+ Accept-Encoding:
224
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
210
225
  response:
211
226
  status:
212
227
  code: 201
@@ -218,27 +233,27 @@ http_interactions:
218
233
  - 1; mode=block
219
234
  X-Content-Type-Options:
220
235
  - nosniff
236
+ Date:
237
+ - Tue, 28 Apr 2015 18:43:29 GMT
221
238
  Content-Type:
222
239
  - application/json; charset=utf-8
223
240
  Etag:
224
- - W/"b5c2bf1e932a083356ff7234261c9400"
241
+ - W/"ff1c0818d9b0f56ade29d6305e5a1b36"
225
242
  Cache-Control:
226
243
  - max-age=0, private, must-revalidate
227
244
  Set-Cookie:
228
- - _exercises_session=M29CMSswL3BCTHRLR3FtQzZnMkNnTUtrY1IrVmNXQ2o3bWg1Znl3bjFnMytxaWczNnNsRVZPNjhiQXZ5am9ldTFDMDdFTVk2R3daYU1HOE5QK3B3ZlE9PS0tcW5Oei9ZSnltSTF0OVV4YStuVDRmUT09--9d1b98d2f867110d4d0cdb0f0b6a0c49b2e72b6a;
229
- path=/; HttpOnly
230
245
  - request_method=POST; path=/
231
246
  X-Request-Id:
232
- - ec3f8534-526d-4fd9-81a1-ac4bbd66b954
247
+ - 3e90bde5-96c5-469b-9e42-67ceed49d971
233
248
  X-Runtime:
234
- - '0.159099'
249
+ - '0.086102'
235
250
  Connection:
236
251
  - close
237
252
  Server:
238
253
  - thin
239
254
  body:
240
- encoding: US-ASCII
241
- string: ! '{"identifier":"aa9e51faf7833b6956153781c684cc8c35d4dd36d6f614a0bf48556710db5cc0","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","created_at":"2015-01-12T21:08:52.794Z","answer_type":"multiple-choice","answer":"answer_string"}'
255
+ encoding: UTF-8
256
+ string: '{"identifier":"91033f99a101434018fc0da47dda513f4e069f89ce4c6089cb1e2f48e94fd48d","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","created_at":"2015-04-28T18:43:29.781Z","answer_type":"multiple-choice","answer":"answer_string"}'
242
257
  http_version:
243
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
258
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
244
259
  recorded_with: VCR 2.9.3
@@ -4,15 +4,17 @@ http_interactions:
4
4
  method: post
5
5
  uri: http://123:abc@localhost:3003/oauth/token
6
6
  body:
7
- encoding: US-ASCII
7
+ encoding: UTF-8
8
8
  string: grant_type=client_credentials
9
9
  headers:
10
10
  User-Agent:
11
- - Faraday v0.9.0
11
+ - Faraday v0.9.1
12
12
  Content-Type:
13
13
  - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
16
  Accept:
15
- - ! '*/*'
17
+ - "*/*"
16
18
  response:
17
19
  status:
18
20
  code: 200
@@ -31,35 +33,40 @@ http_interactions:
31
33
  Content-Type:
32
34
  - application/json; charset=utf-8
33
35
  Etag:
34
- - W/"1db1bd051b10759d8e082f9c4d97f1a2"
36
+ - W/"2d4b390f46a7b4c332ececaa47ecfdce"
35
37
  X-Request-Id:
36
- - b7c271cf-e691-408f-a891-601ae080a091
38
+ - 4d9a35e1-9c09-42c1-b628-978c166e2556
37
39
  X-Runtime:
38
- - '0.032509'
40
+ - '0.016162'
39
41
  Connection:
40
42
  - close
41
43
  Server:
42
44
  - thin
43
45
  body:
44
- encoding: US-ASCII
45
- string: ! '{"access_token":"223e1079d9fc17c0a6c72d3b203a8685fe81e6bb2e5afa242570c1f7d14d58a4","token_type":"bearer"}'
46
+ encoding: UTF-8
47
+ string: '{"access_token":"3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41","token_type":"bearer","scope":"read
48
+ write","created_at":1430246609}'
46
49
  http_version:
47
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
50
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
48
51
  - request:
49
52
  method: post
50
53
  uri: http://localhost:3003/api/identifiers
51
54
  body:
52
- encoding: US-ASCII
55
+ encoding: UTF-8
53
56
  string: ''
54
57
  headers:
55
58
  User-Agent:
56
- - Faraday v0.9.0
59
+ - Faraday v0.9.1
57
60
  Accept:
58
61
  - application/vnd.exchange.openstax.v1
62
+ Content-Type:
63
+ - application/json
59
64
  Authorization:
60
- - Bearer 223e1079d9fc17c0a6c72d3b203a8685fe81e6bb2e5afa242570c1f7d14d58a4
65
+ - Bearer 3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41
61
66
  Content-Length:
62
67
  - '0'
68
+ Accept-Encoding:
69
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
63
70
  response:
64
71
  status:
65
72
  code: 201
@@ -71,44 +78,46 @@ http_interactions:
71
78
  - 1; mode=block
72
79
  X-Content-Type-Options:
73
80
  - nosniff
81
+ Date:
82
+ - Tue, 28 Apr 2015 18:43:29 GMT
74
83
  Content-Type:
75
84
  - application/json; charset=utf-8
76
85
  Etag:
77
- - W/"7c513075a0628876caf5244e0aa179c9"
86
+ - W/"567d02746e49ecbb30c1f909d4769f08"
78
87
  Cache-Control:
79
88
  - max-age=0, private, must-revalidate
80
89
  Set-Cookie:
81
- - _exercises_session=M0Q2Mzc1YkNpdHpKQ2h6cWVEUTR4SXFIUXdNbjR6cS9aSzBORmJkWVc4U1FHK0U3VWQ3bkhKemxJNU1jdXI0ZGNCQzNicU5zYU9acWVJZ2pHUWlwRFE9PS0tQTVPcTAxVkRaVVhQSlRBVEpDTVoyUT09--39d88c2341b105f2c8d188d7da12aeb44d835072;
82
- path=/; HttpOnly
83
90
  - request_method=POST; path=/
84
91
  X-Request-Id:
85
- - db3af164-fc15-49b2-8dee-212b50963600
92
+ - bc3b3439-78f1-4754-b123-8c66332d4d94
86
93
  X-Runtime:
87
- - '0.052918'
94
+ - '0.056143'
88
95
  Connection:
89
96
  - close
90
97
  Server:
91
98
  - thin
92
99
  body:
93
- encoding: US-ASCII
94
- string: ! '{"identifier":"a77551fb068480c38afd1dd8d8fb8e3eac943992a6769d404786e863e00720c4"}'
100
+ encoding: UTF-8
101
+ string: '{"read":"aef74920d61d3d3abc91782053f0e576aedc828398b85d681e65302a24674f4e","write":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b"}'
95
102
  http_version:
96
- recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
103
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
97
104
  - request:
98
105
  method: post
99
106
  uri: http://localhost:3003/api/events/platforms/multiple_choices
100
107
  body:
101
108
  encoding: UTF-8
102
- string: ! '{"identifier":"a77551fb068480c38afd1dd8d8fb8e3eac943992a6769d404786e863e00720c4","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","answer":"answer_string"}'
109
+ string: '{"identifier":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b","resource":"https://exercises-dev1.openstax.org/api/exercises/12@1","trial":"1","answer":"answer_string"}'
103
110
  headers:
104
111
  User-Agent:
105
- - Faraday v0.9.0
112
+ - Faraday v0.9.1
106
113
  Accept:
107
114
  - application/vnd.exchange.openstax.v1
108
115
  Authorization:
109
- - Bearer 223e1079d9fc17c0a6c72d3b203a8685fe81e6bb2e5afa242570c1f7d14d58a4
116
+ - Bearer 3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41
110
117
  Content-Type:
111
- - application/x-www-form-urlencoded
118
+ - application/json
119
+ Accept-Encoding:
120
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
112
121
  response:
113
122
  status:
114
123
  code: 201
@@ -120,44 +129,46 @@ http_interactions:
120
129
  - 1; mode=block
121
130
  X-Content-Type-Options:
122
131
  - nosniff
132
+ Date:
133
+ - Tue, 28 Apr 2015 18:43:29 GMT
123
134
  Content-Type:
124
135
  - application/json; charset=utf-8
125
136
  Etag:
126
- - W/"af5fad75935bb550a629ec0c635ad608"
137
+ - W/"387172353741f400933c15bd0a741c53"
127
138
  Cache-Control:
128
139
  - max-age=0, private, must-revalidate
129
140
  Set-Cookie:
130
- - _exercises_session=WWZqcUdHS3ErZGRsc3F5NjZTWmQyZGx0OXJaTWRXQm1JaXE2c1ZWZEVZQno2TG5QQk16TVY3SS92TEo4T09rZFNsU29uMWRuRHA0eWF2cFhwS0NFdnc9PS0tbzJObitQNGx5czJBRlZoK1JmcThxZz09--3f3618e97901ffdc7bf941e0a4ee3b2d1a27b20e;
131
- path=/; HttpOnly
132
141
  - request_method=POST; path=/
133
142
  X-Request-Id:
134
- - 8fc95cac-5d8b-43b5-ba35-4de0b2342503
143
+ - 9c0556c9-9850-454d-bd89-ce4b6b9684da
135
144
  X-Runtime:
136
- - '0.073550'
145
+ - '0.075983'
137
146
  Connection:
138
147
  - close
139
148
  Server:
140
149
  - thin
141
150
  body:
142
- encoding: US-ASCII
143
- string: ! '{"identifier":"a77551fb068480c38afd1dd8d8fb8e3eac943992a6769d404786e863e00720c4","resource":"http://exercises.openstax.org/exercises/1234","trial":"1","created_at":"2015-01-12T21:08:52.988Z","answer_type":"multiple-choice","answer":"answer_string"}'
151
+ encoding: UTF-8
152
+ string: '{"identifier":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b","resource":"https://exercises-dev1.openstax.org/api/exercises/12@1","trial":"1","created_at":"2015-04-28T18:43:29.954Z","answer_type":"multiple-choice","answer":"answer_string"}'
144
153
  http_version:
145
- recorded_at: Mon, 12 Jan 2015 21:08:53 GMT
154
+ recorded_at: Tue, 28 Apr 2015 18:43:29 GMT
146
155
  - request:
147
156
  method: post
148
157
  uri: http://localhost:3003/api/events/platforms/multiple_choices
149
158
  body:
150
159
  encoding: UTF-8
151
- string: ! '{"identifier":"a77551fb068480c38afd1dd8d8fb8e3eac943992a6769d404786e863e00720c4","resource":"http://exercises.openstax.org/exercises/3456","trial":"1","answer":"answer_string"}'
160
+ string: '{"identifier":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","answer":"answer_string"}'
152
161
  headers:
153
162
  User-Agent:
154
- - Faraday v0.9.0
163
+ - Faraday v0.9.1
155
164
  Accept:
156
165
  - application/vnd.exchange.openstax.v1
157
166
  Authorization:
158
- - Bearer 223e1079d9fc17c0a6c72d3b203a8685fe81e6bb2e5afa242570c1f7d14d58a4
167
+ - Bearer 3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41
159
168
  Content-Type:
160
- - application/x-www-form-urlencoded
169
+ - application/json
170
+ Accept-Encoding:
171
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
161
172
  response:
162
173
  status:
163
174
  code: 201
@@ -169,27 +180,27 @@ http_interactions:
169
180
  - 1; mode=block
170
181
  X-Content-Type-Options:
171
182
  - nosniff
183
+ Date:
184
+ - Tue, 28 Apr 2015 18:43:30 GMT
172
185
  Content-Type:
173
186
  - application/json; charset=utf-8
174
187
  Etag:
175
- - W/"43d957a9436ca80c3a80f25ee5ebd56d"
188
+ - W/"b09de18a2aadfd462ad21290f66b52a7"
176
189
  Cache-Control:
177
190
  - max-age=0, private, must-revalidate
178
191
  Set-Cookie:
179
- - _exercises_session=WXZhTXZ0Vnpxb3VEVHVlcEltaWJSQVQvWGFjVmFvRW9hZGhCQkVyNXJTblE3MVkyZmIxcUFpdSt4V3Mvei9KbHNOT2g4Q2NraEh0czNDdmRhNkdUVHc9PS0tbDFWT3pqdU84U0NLOG1nb1ZoY3VoZz09--b13cdee89189697d1755394ee5bdddd8d19e7f11;
180
- path=/; HttpOnly
181
192
  - request_method=POST; path=/
182
193
  X-Request-Id:
183
- - 82239e96-36ba-4908-8c11-ed84ec764e8e
194
+ - 586b98e2-f871-4b4a-bd47-f7a2747c4f39
184
195
  X-Runtime:
185
- - '0.082626'
196
+ - '0.076974'
186
197
  Connection:
187
198
  - close
188
199
  Server:
189
200
  - thin
190
201
  body:
191
- encoding: US-ASCII
192
- string: ! '{"identifier":"a77551fb068480c38afd1dd8d8fb8e3eac943992a6769d404786e863e00720c4","resource":"http://exercises.openstax.org/exercises/3456","trial":"1","created_at":"2015-01-12T21:08:53.073Z","answer_type":"multiple-choice","answer":"answer_string"}'
202
+ encoding: UTF-8
203
+ string: '{"identifier":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b","resource":"https://exercises-dev1.openstax.org/api/exercises/123@1","trial":"1","created_at":"2015-04-28T18:43:30.035Z","answer_type":"multiple-choice","answer":"answer_string"}'
193
204
  http_version:
194
- recorded_at: Mon, 12 Jan 2015 21:08:53 GMT
205
+ recorded_at: Tue, 28 Apr 2015 18:43:30 GMT
195
206
  recorded_with: VCR 2.9.3