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.
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +3 -1
- data/exchange-client.gemspec +1 -0
- data/lib/openstax/exchange/exchange.rb +4 -4
- data/lib/openstax/exchange/fake_client/fake_client.rb +11 -10
- data/lib/openstax/exchange/real_client/real_client.rb +14 -4
- data/lib/openstax/exchange/version.rb +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- data/spec/lib/openstax/exchange/shared_examples_for_exchange_client_v1.rb +40 -24
- 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:
|
7
|
+
encoding: UTF-8
|
8
8
|
string: grant_type=client_credentials
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
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/"
|
36
|
+
- W/"8038f39b5672fab098184d08f2f4bd70"
|
35
37
|
X-Request-Id:
|
36
|
-
-
|
38
|
+
- a1ef40d7-78e2-4857-b8ce-92842c4be3be
|
37
39
|
X-Runtime:
|
38
|
-
- '0.
|
40
|
+
- '0.016318'
|
39
41
|
Connection:
|
40
42
|
- close
|
41
43
|
Server:
|
42
44
|
- thin
|
43
45
|
body:
|
44
|
-
encoding:
|
45
|
-
string:
|
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:
|
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:
|
55
|
+
encoding: UTF-8
|
53
56
|
string: ''
|
54
57
|
headers:
|
55
58
|
User-Agent:
|
56
|
-
- Faraday v0.9.
|
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
|
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/"
|
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
|
-
-
|
92
|
+
- 294c9b50-fc6d-4ecd-aaa6-5acedf48e909
|
86
93
|
X-Runtime:
|
87
|
-
- '0.
|
94
|
+
- '0.054547'
|
88
95
|
Connection:
|
89
96
|
- close
|
90
97
|
Server:
|
91
98
|
- thin
|
92
99
|
body:
|
93
|
-
encoding:
|
94
|
-
string:
|
100
|
+
encoding: UTF-8
|
101
|
+
string: '{"read":"eab22f0ebf3287a2601060ebf24ac96574618b2d8651ae596ab5b834d1c9b11d","write":"90d7ab96c5d764bc8cf90664b00383234822829d48519cd316a4c1570ff0ae8d"}'
|
95
102
|
http_version:
|
96
|
-
recorded_at:
|
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:
|
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.
|
112
|
+
- Faraday v0.9.1
|
106
113
|
Accept:
|
107
114
|
- application/vnd.exchange.openstax.v1
|
108
115
|
Authorization:
|
109
|
-
- Bearer
|
116
|
+
- Bearer c4b2ebb02eb719e7d5774b611f805a64458a1580ca35915cbee740cadf577b5c
|
110
117
|
Content-Type:
|
111
|
-
- application/
|
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
|
-
-
|
141
|
+
- 46e18282-e846-4403-bc7a-38ba52ecf0c2
|
133
142
|
X-Runtime:
|
134
|
-
- '0.
|
143
|
+
- '0.034391'
|
135
144
|
Connection:
|
136
145
|
- close
|
137
146
|
Server:
|
138
147
|
- thin
|
139
148
|
body:
|
140
|
-
encoding:
|
141
|
-
string:
|
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:
|
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:
|
7
|
+
encoding: UTF-8
|
8
8
|
string: grant_type=client_credentials
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
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/"
|
36
|
+
- W/"d043d549aeb46dddbe4f0922fdabcf9e"
|
35
37
|
X-Request-Id:
|
36
|
-
-
|
38
|
+
- b7b73c9c-39bb-4ce2-a92d-f0a62e5d763a
|
37
39
|
X-Runtime:
|
38
|
-
- '0.
|
40
|
+
- '0.015010'
|
39
41
|
Connection:
|
40
42
|
- close
|
41
43
|
Server:
|
42
44
|
- thin
|
43
45
|
body:
|
44
|
-
encoding:
|
45
|
-
string:
|
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:
|
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:
|
55
|
+
encoding: UTF-8
|
53
56
|
string: ''
|
54
57
|
headers:
|
55
58
|
User-Agent:
|
56
|
-
- Faraday v0.9.
|
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
|
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/"
|
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
|
-
-
|
92
|
+
- 6f1d3434-034c-4dd7-99fa-69a4fab224ad
|
86
93
|
X-Runtime:
|
87
|
-
- '0.
|
94
|
+
- '0.056371'
|
88
95
|
Connection:
|
89
96
|
- close
|
90
97
|
Server:
|
91
98
|
- thin
|
92
99
|
body:
|
93
|
-
encoding:
|
94
|
-
string:
|
100
|
+
encoding: UTF-8
|
101
|
+
string: '{"read":"d6329c4c0f8117452b94e8311f129657703a5d57ef32410e79ab5d27bf13d9f0","write":"bf0dd7361e6dcf036207d544dd29870bac0905a305a477bd22c9fe42c56bb10d"}'
|
95
102
|
http_version:
|
96
|
-
recorded_at:
|
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:
|
108
|
+
encoding: UTF-8
|
102
109
|
string: ''
|
103
110
|
headers:
|
104
111
|
User-Agent:
|
105
|
-
- Faraday v0.9.
|
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
|
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/"
|
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
|
-
-
|
145
|
+
- 8c537ee9-0cf8-46e8-83a6-6313cf508c8d
|
135
146
|
X-Runtime:
|
136
|
-
- '0.
|
147
|
+
- '0.055481'
|
137
148
|
Connection:
|
138
149
|
- close
|
139
150
|
Server:
|
140
151
|
- thin
|
141
152
|
body:
|
142
|
-
encoding:
|
143
|
-
string:
|
153
|
+
encoding: UTF-8
|
154
|
+
string: '{"read":"b29d362fe3a8f45ed0b67e80af8a346065839dd5a4f08cb2ad84bedac306d87a","write":"91033f99a101434018fc0da47dda513f4e069f89ce4c6089cb1e2f48e94fd48d"}'
|
144
155
|
http_version:
|
145
|
-
recorded_at:
|
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:
|
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.
|
165
|
+
- Faraday v0.9.1
|
155
166
|
Accept:
|
156
167
|
- application/vnd.exchange.openstax.v1
|
157
168
|
Authorization:
|
158
|
-
- Bearer
|
169
|
+
- Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
|
159
170
|
Content-Type:
|
160
|
-
- application/
|
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/"
|
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
|
-
-
|
196
|
+
- 45a0bfe3-e4c0-4a33-a98f-288875568a51
|
184
197
|
X-Runtime:
|
185
|
-
- '0.
|
198
|
+
- '0.075970'
|
186
199
|
Connection:
|
187
200
|
- close
|
188
201
|
Server:
|
189
202
|
- thin
|
190
203
|
body:
|
191
|
-
encoding:
|
192
|
-
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:
|
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:
|
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.
|
216
|
+
- Faraday v0.9.1
|
204
217
|
Accept:
|
205
218
|
- application/vnd.exchange.openstax.v1
|
206
219
|
Authorization:
|
207
|
-
- Bearer
|
220
|
+
- Bearer d665ee2b1a7ab3bfb7c53264baa4df38d87f7ad784f123ed2f0e29f600d94590
|
208
221
|
Content-Type:
|
209
|
-
- application/
|
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/"
|
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
|
-
-
|
247
|
+
- 3e90bde5-96c5-469b-9e42-67ceed49d971
|
233
248
|
X-Runtime:
|
234
|
-
- '0.
|
249
|
+
- '0.086102'
|
235
250
|
Connection:
|
236
251
|
- close
|
237
252
|
Server:
|
238
253
|
- thin
|
239
254
|
body:
|
240
|
-
encoding:
|
241
|
-
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:
|
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:
|
7
|
+
encoding: UTF-8
|
8
8
|
string: grant_type=client_credentials
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday v0.9.
|
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/"
|
36
|
+
- W/"2d4b390f46a7b4c332ececaa47ecfdce"
|
35
37
|
X-Request-Id:
|
36
|
-
-
|
38
|
+
- 4d9a35e1-9c09-42c1-b628-978c166e2556
|
37
39
|
X-Runtime:
|
38
|
-
- '0.
|
40
|
+
- '0.016162'
|
39
41
|
Connection:
|
40
42
|
- close
|
41
43
|
Server:
|
42
44
|
- thin
|
43
45
|
body:
|
44
|
-
encoding:
|
45
|
-
string:
|
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:
|
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:
|
55
|
+
encoding: UTF-8
|
53
56
|
string: ''
|
54
57
|
headers:
|
55
58
|
User-Agent:
|
56
|
-
- Faraday v0.9.
|
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
|
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/"
|
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
|
-
-
|
92
|
+
- bc3b3439-78f1-4754-b123-8c66332d4d94
|
86
93
|
X-Runtime:
|
87
|
-
- '0.
|
94
|
+
- '0.056143'
|
88
95
|
Connection:
|
89
96
|
- close
|
90
97
|
Server:
|
91
98
|
- thin
|
92
99
|
body:
|
93
|
-
encoding:
|
94
|
-
string:
|
100
|
+
encoding: UTF-8
|
101
|
+
string: '{"read":"aef74920d61d3d3abc91782053f0e576aedc828398b85d681e65302a24674f4e","write":"23b48be626b8687b403e279ffd8c71a3850449fd04d189f8a41db50012fd5b1b"}'
|
95
102
|
http_version:
|
96
|
-
recorded_at:
|
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:
|
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.
|
112
|
+
- Faraday v0.9.1
|
106
113
|
Accept:
|
107
114
|
- application/vnd.exchange.openstax.v1
|
108
115
|
Authorization:
|
109
|
-
- Bearer
|
116
|
+
- Bearer 3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41
|
110
117
|
Content-Type:
|
111
|
-
- application/
|
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/"
|
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
|
-
-
|
143
|
+
- 9c0556c9-9850-454d-bd89-ce4b6b9684da
|
135
144
|
X-Runtime:
|
136
|
-
- '0.
|
145
|
+
- '0.075983'
|
137
146
|
Connection:
|
138
147
|
- close
|
139
148
|
Server:
|
140
149
|
- thin
|
141
150
|
body:
|
142
|
-
encoding:
|
143
|
-
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:
|
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:
|
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.
|
163
|
+
- Faraday v0.9.1
|
155
164
|
Accept:
|
156
165
|
- application/vnd.exchange.openstax.v1
|
157
166
|
Authorization:
|
158
|
-
- Bearer
|
167
|
+
- Bearer 3778b1028b63a1f5195744388ba7d0ebb55b53c4f389af2756bdce7442d4df41
|
159
168
|
Content-Type:
|
160
|
-
- application/
|
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/"
|
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
|
-
-
|
194
|
+
- 586b98e2-f871-4b4a-bd47-f7a2747c4f39
|
184
195
|
X-Runtime:
|
185
|
-
- '0.
|
196
|
+
- '0.076974'
|
186
197
|
Connection:
|
187
198
|
- close
|
188
199
|
Server:
|
189
200
|
- thin
|
190
201
|
body:
|
191
|
-
encoding:
|
192
|
-
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:
|
205
|
+
recorded_at: Tue, 28 Apr 2015 18:43:30 GMT
|
195
206
|
recorded_with: VCR 2.9.3
|