canvas_oauth_engine 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: b10222793a636d66701b987776c13f86d568ff7db074c3444f5cb9d1b01cd180
4
- data.tar.gz: 1349d736705163172c3e2fd860530bb3f2ab22cee75ae257ef0e163db2cfbf66
2
+ SHA1:
3
+ metadata.gz: d66a225fd03c8734a9f4b39aca6625227689c207
4
+ data.tar.gz: 04d1c9e40173cd975a4d4d736cc48ec0a672441f
5
5
  SHA512:
6
- metadata.gz: 3e40c881d9e0872d0e97b3eb6d73b0ed2336ed78427d276fd377e3043fdd57d8d65f8876fc70c806313390b9892db66c4b0a3a343ce73739b1a895134eac1cc5
7
- data.tar.gz: 4fdeb5ec04e2149c839c6234b2f6244e33a45aa11122e8eaa4e00714ecb73cbe2e25c284f704402e7b134b53fbd1546d321404625e7bfa9416e928712ada0e85
6
+ metadata.gz: ac97af15039693efa6eadfa28055eaa9584b4b10ab3951246663accc5e4c7371b15dc2de8b13d58a694d7c11bf35c8eab29f5c1466cc315595a9a473a687399e
7
+ data.tar.gz: 15c980b1cd0f21586d6afef28e9fde5ddf7d70be98c3970ee637ce29b24ce95d89a70433a694ec955dc7a31d7babcc342286a54266e64a55e370eebaad5e0dac
@@ -195,6 +195,10 @@ module CanvasOauth
195
195
  authenticated_post "/api/v1/courses/#{course_id}/assignments", { body: { assignment: params } }
196
196
  end
197
197
 
198
+ def update_assignment(course_id, assignment_id, params)
199
+ authenticated_put "/api/v1/courses/#{course_id}/assignments/#{assignment_id}", { body: { assignment: params } }
200
+ end
201
+
198
202
  def grade_assignment(course_id, assignment_id, user_id, params)
199
203
  authenticated_put "/api/v1/courses/#{course_id}/assignments/#{assignment_id}/submissions/#{user_id}", { body: params }
200
204
  end
@@ -1,3 +1,3 @@
1
1
  module CanvasOauth
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
File without changes
@@ -0,0 +1,516 @@
1
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
2
+  (0.2ms) begin transaction
3
+  (0.0ms) rollback transaction
4
+  (0.0ms) begin transaction
5
+  (0.0ms) rollback transaction
6
+  (0.0ms) begin transaction
7
+  (0.0ms) rollback transaction
8
+  (0.0ms) begin transaction
9
+  (0.0ms) rollback transaction
10
+  (0.0ms) begin transaction
11
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" = 123 AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" = 'abc123' ORDER BY created_at DESC LIMIT 1
12
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" = 123 AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" = 'abc123' ORDER BY created_at DESC LIMIT 1
13
+  (0.0ms) rollback transaction
14
+  (0.0ms) begin transaction
15
+  (0.0ms) rollback transaction
16
+  (0.0ms) begin transaction
17
+  (0.0ms) rollback transaction
18
+  (0.0ms) begin transaction
19
+  (0.0ms) rollback transaction
20
+  (0.0ms) begin transaction
21
+  (0.0ms) rollback transaction
22
+  (0.0ms) begin transaction
23
+  (0.0ms) rollback transaction
24
+  (0.0ms) begin transaction
25
+ Processing by CanvasOauth::CanvasController#oauth as HTML
26
+ Rendered text template (0.0ms)
27
+ Completed 200 OK in 4ms (Views: 3.9ms | ActiveRecord: 0.0ms)
28
+  (0.1ms) rollback transaction
29
+  (0.0ms) begin transaction
30
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
31
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
32
+  (0.0ms) rollback transaction
33
+  (0.0ms) begin transaction
34
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
35
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
36
+  (0.0ms) rollback transaction
37
+  (0.0ms) begin transaction
38
+ Processing by CanvasOauth::CanvasController#oauth as HTML
39
+ Parameters: {"code"=>"valid"}
40
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
41
+  (0.0ms) rollback transaction
42
+  (0.0ms) begin transaction
43
+ Processing by CanvasOauth::CanvasController#oauth as HTML
44
+ Parameters: {"code"=>"valid", "state"=>"zzyyxx"}
45
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
46
+  (0.0ms) rollback transaction
47
+  (0.0ms) begin transaction
48
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
49
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
50
+  (0.0ms) rollback transaction
51
+  (0.0ms) begin transaction
52
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
53
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
54
+  (0.0ms) rollback transaction
55
+  (0.0ms) begin transaction
56
+ CanvasOauth::Authorization Load (0.1ms) SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
57
+ SQLite3::SQLException: no such table: canvas_oauth_authorizations: SELECT "canvas_oauth_authorizations".* FROM "canvas_oauth_authorizations" WHERE "canvas_oauth_authorizations"."canvas_user_id" IS NULL AND "canvas_oauth_authorizations"."tool_consumer_instance_guid" IS NULL ORDER BY created_at DESC LIMIT 1
58
+  (0.0ms) rollback transaction
59
+  (0.0ms) begin transaction
60
+  (0.0ms) rollback transaction
61
+  (0.0ms) begin transaction
62
+  (0.0ms) rollback transaction
63
+  (0.0ms) begin transaction
64
+  (0.0ms) rollback transaction
65
+  (0.0ms) begin transaction
66
+  (0.0ms) rollback transaction
67
+  (0.0ms) begin transaction
68
+  (0.0ms) rollback transaction
69
+  (0.0ms) begin transaction
70
+  (0.0ms) rollback transaction
71
+  (0.0ms) begin transaction
72
+  (0.0ms) rollback transaction
73
+  (0.0ms) begin transaction
74
+  (0.0ms) rollback transaction
75
+  (0.0ms) begin transaction
76
+  (0.0ms) rollback transaction
77
+  (0.0ms) begin transaction
78
+  (0.0ms) rollback transaction
79
+  (0.0ms) begin transaction
80
+  (0.0ms) rollback transaction
81
+  (0.0ms) begin transaction
82
+  (0.0ms) rollback transaction
83
+  (0.1ms) begin transaction
84
+  (0.0ms) rollback transaction
85
+  (0.0ms) begin transaction
86
+  (0.0ms) rollback transaction
87
+  (0.0ms) begin transaction
88
+  (0.1ms) rollback transaction
89
+  (0.0ms) begin transaction
90
+  (0.0ms) rollback transaction
91
+  (0.0ms) begin transaction
92
+  (0.0ms) rollback transaction
93
+  (0.1ms) begin transaction
94
+ API call (0.03ms): put ["/api/v1/courses/1/assignments/2/submissions/3", {:body=>{}, :headers=>{}}]
95
+  (0.0ms) rollback transaction
96
+  (0.0ms) begin transaction
97
+  (0.0ms) rollback transaction
98
+  (0.0ms) begin transaction
99
+ API call (0.04ms): get ["/path", {:query=>"stuff", :headers=>{}}]
100
+  (0.0ms) rollback transaction
101
+  (0.0ms) begin transaction
102
+ API call (0.05ms): get ["/path", {:headers=>{}}]
103
+  (0.1ms) rollback transaction
104
+  (0.0ms) begin transaction
105
+ API call (0.02ms): get ["/path", {:headers=>{}}]
106
+  (0.0ms) rollback transaction
107
+  (0.0ms) begin transaction
108
+ API call (0.08ms): get ["/api/v1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
109
+  (0.0ms) rollback transaction
110
+  (0.0ms) begin transaction
111
+ API call (0.02ms): get ["/api/v1/courses/123/students", {:query=>{:per_page=>50}, :headers=>{}}]
112
+  (0.0ms) rollback transaction
113
+  (0.1ms) begin transaction
114
+  (0.0ms) rollback transaction
115
+  (0.0ms) begin transaction
116
+ API call (0.02ms): get ["/api/v1/courses/123/sections", {:query=>{:include=>["students", "avatar_url", "enrollments"], :per_page=>50}, :headers=>{}}]
117
+  (0.1ms) rollback transaction
118
+  (0.0ms) begin transaction
119
+  (0.0ms) rollback transaction
120
+  (0.0ms) begin transaction
121
+ API call (0.02ms): get ["/api/v1/users/123/profile", {:headers=>{}}]
122
+  (0.0ms) rollback transaction
123
+  (0.0ms) begin transaction
124
+ API call (0.02ms): get ["/api/v1/accounts/1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
125
+  (0.0ms) rollback transaction
126
+  (0.0ms) begin transaction
127
+  (0.0ms) rollback transaction
128
+  (0.1ms) begin transaction
129
+  (0.0ms) rollback transaction
130
+  (0.0ms) begin transaction
131
+ API call (0.04ms): get ["/api/v1/accounts/1/users", {:query=>{:per_page=>50}, :headers=>{}}]
132
+  (0.0ms) rollback transaction
133
+  (0.0ms) begin transaction
134
+  (0.0ms) rollback transaction
135
+  (0.1ms) begin transaction
136
+ API call (0.02ms): get ["/api/v1/courses/123/assignments", {:query=>{:per_page=>50}, :headers=>{}}]
137
+  (0.1ms) rollback transaction
138
+  (0.0ms) begin transaction
139
+ API call (0.02ms): post ["/api/v1/courses/123/assignments", {:body=>{:assignment=>{:name=>"Assignment"}}, :headers=>{}}]
140
+  (0.1ms) rollback transaction
141
+  (0.0ms) begin transaction
142
+  (0.0ms) rollback transaction
143
+  (0.0ms) begin transaction
144
+ API call (0.02ms): get ["/api/v1/courses/123", {:headers=>{}}]
145
+  (0.0ms) rollback transaction
146
+  (0.0ms) begin transaction
147
+  (0.1ms) rollback transaction
148
+  (0.0ms) begin transaction
149
+  (0.0ms) rollback transaction
150
+  (0.0ms) begin transaction
151
+  (0.0ms) rollback transaction
152
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
153
+  (0.3ms) begin transaction
154
+  (0.1ms) rollback transaction
155
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
156
+  (0.2ms) begin transaction
157
+  (0.1ms) rollback transaction
158
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
159
+  (0.2ms) begin transaction
160
+  (0.1ms) rollback transaction
161
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
162
+  (0.2ms) begin transaction
163
+  (0.1ms) rollback transaction
164
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
165
+  (0.2ms) begin transaction
166
+  (0.1ms) rollback transaction
167
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
168
+  (0.2ms) begin transaction
169
+  (0.1ms) rollback transaction
170
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
171
+  (0.2ms) begin transaction
172
+  (0.1ms) rollback transaction
173
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
174
+  (0.2ms) begin transaction
175
+  (0.1ms) rollback transaction
176
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
177
+  (0.2ms) begin transaction
178
+  (0.0ms) rollback transaction
179
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
180
+  (0.2ms) begin transaction
181
+  (0.0ms) rollback transaction
182
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
183
+  (0.2ms) begin transaction
184
+  (0.0ms) rollback transaction
185
+  (0.0ms) begin transaction
186
+  (0.0ms) rollback transaction
187
+  (0.0ms) begin transaction
188
+  (0.0ms) rollback transaction
189
+  (0.0ms) begin transaction
190
+  (0.0ms) rollback transaction
191
+  (0.0ms) begin transaction
192
+  (0.0ms) rollback transaction
193
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
194
+  (0.2ms) begin transaction
195
+  (0.1ms) rollback transaction
196
+  (0.0ms) begin transaction
197
+  (0.1ms) rollback transaction
198
+  (0.0ms) begin transaction
199
+  (0.0ms) rollback transaction
200
+  (0.0ms) begin transaction
201
+  (0.0ms) rollback transaction
202
+  (0.0ms) begin transaction
203
+  (0.0ms) rollback transaction
204
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
205
+  (0.2ms) begin transaction
206
+  (0.1ms) rollback transaction
207
+  (0.0ms) begin transaction
208
+  (0.0ms) rollback transaction
209
+  (0.0ms) begin transaction
210
+  (0.0ms) rollback transaction
211
+  (0.0ms) begin transaction
212
+  (0.1ms) rollback transaction
213
+  (0.0ms) begin transaction
214
+  (0.0ms) rollback transaction
215
+ Initializing Canvas using configuration in /Users/kgarner/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
216
+  (0.2ms) begin transaction
217
+  (0.0ms) rollback transaction
218
+  (0.0ms) begin transaction
219
+  (0.0ms) rollback transaction
220
+  (0.0ms) begin transaction
221
+  (0.0ms) rollback transaction
222
+  (0.0ms) begin transaction
223
+  (0.0ms) rollback transaction
224
+  (0.0ms) begin transaction
225
+  (0.0ms) rollback transaction
226
+ Initializing Canvas using configuration in /Users/kgarner/exempt/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
227
+  (0.0ms) begin transaction
228
+ API call (0.09ms): get ["/path", {:headers=>{}}]
229
+  (0.1ms) rollback transaction
230
+  (0.0ms) begin transaction
231
+ API call (0.05ms): get ["/path", {:headers=>{}}]
232
+  (0.0ms) rollback transaction
233
+  (0.0ms) begin transaction
234
+ API call (0.04ms): get ["/path", {:query=>"stuff", :headers=>{}}]
235
+  (0.0ms) rollback transaction
236
+  (0.1ms) begin transaction
237
+ API call (0.03ms): get ["/api/v1/courses/123/sections", {:query=>{:include=>["students", "avatar_url", "enrollments"], :per_page=>50}, :headers=>{}}]
238
+  (0.0ms) rollback transaction
239
+  (0.0ms) begin transaction
240
+  (0.0ms) rollback transaction
241
+  (0.0ms) begin transaction
242
+ API call (0.08ms): get ["/api/v1/accounts/1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
243
+  (0.1ms) rollback transaction
244
+  (0.0ms) begin transaction
245
+  (0.0ms) rollback transaction
246
+  (0.0ms) begin transaction
247
+  (0.0ms) rollback transaction
248
+  (0.0ms) begin transaction
249
+ API call (0.03ms): put ["/api/v1/courses/123/assignments/345", {:body=>{:assignment=>{:omit_from_final_grade=>true}}, :headers=>{}}]
250
+  (0.0ms) rollback transaction
251
+  (0.0ms) begin transaction
252
+  (0.0ms) rollback transaction
253
+  (0.0ms) begin transaction
254
+ API call (0.03ms): get ["/api/v1/courses/123/assignments", {:query=>{:per_page=>50}, :headers=>{}}]
255
+  (0.0ms) rollback transaction
256
+  (0.0ms) begin transaction
257
+ API call (0.07ms): post ["/api/v1/courses/123/assignments", {:body=>{:assignment=>{:name=>"Assignment"}}, :headers=>{}}]
258
+  (0.0ms) rollback transaction
259
+  (0.0ms) begin transaction
260
+  (0.0ms) rollback transaction
261
+  (0.0ms) begin transaction
262
+  (0.0ms) rollback transaction
263
+  (0.0ms) begin transaction
264
+ API call (0.03ms): get ["/api/v1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
265
+  (0.0ms) rollback transaction
266
+  (0.0ms) begin transaction
267
+ API call (0.03ms): get ["/api/v1/users/123/profile", {:headers=>{}}]
268
+  (0.0ms) rollback transaction
269
+  (0.0ms) begin transaction
270
+ API call (0.03ms): get ["/api/v1/courses/123", {:headers=>{}}]
271
+  (0.0ms) rollback transaction
272
+  (0.0ms) begin transaction
273
+ API call (0.03ms): put ["/api/v1/courses/1/assignments/2/submissions/3", {:body=>{}, :headers=>{}}]
274
+  (0.0ms) rollback transaction
275
+  (0.0ms) begin transaction
276
+  (0.0ms) rollback transaction
277
+  (0.0ms) begin transaction
278
+  (0.0ms) rollback transaction
279
+  (0.0ms) begin transaction
280
+ API call (0.07ms): get ["/api/v1/courses/123/students", {:query=>{:per_page=>50}, :headers=>{}}]
281
+  (0.0ms) rollback transaction
282
+  (0.0ms) begin transaction
283
+  (0.1ms) rollback transaction
284
+  (0.1ms) begin transaction
285
+  (0.1ms) rollback transaction
286
+  (0.0ms) begin transaction
287
+  (0.1ms) rollback transaction
288
+  (0.1ms) begin transaction
289
+ API call (0.12ms): get ["/api/v1/accounts/1/users", {:query=>{:per_page=>50}, :headers=>{}}]
290
+  (0.1ms) rollback transaction
291
+  (0.1ms) begin transaction
292
+  (0.0ms) rollback transaction
293
+  (0.0ms) begin transaction
294
+  (0.0ms) rollback transaction
295
+  (0.1ms) begin transaction
296
+  (0.0ms) rollback transaction
297
+  (0.0ms) begin transaction
298
+  (0.0ms) rollback transaction
299
+  (0.1ms) begin transaction
300
+  (0.0ms) rollback transaction
301
+  (0.1ms) begin transaction
302
+  (0.1ms) rollback transaction
303
+  (0.0ms) begin transaction
304
+  (0.0ms) rollback transaction
305
+  (0.0ms) begin transaction
306
+  (0.1ms) rollback transaction
307
+  (0.0ms) begin transaction
308
+  (0.0ms) rollback transaction
309
+  (0.0ms) begin transaction
310
+  (0.0ms) rollback transaction
311
+  (0.0ms) begin transaction
312
+  (0.0ms) rollback transaction
313
+  (0.0ms) begin transaction
314
+  (0.1ms) rollback transaction
315
+  (0.1ms) begin transaction
316
+  (0.0ms) rollback transaction
317
+  (0.0ms) begin transaction
318
+  (0.1ms) rollback transaction
319
+  (0.0ms) begin transaction
320
+  (0.0ms) rollback transaction
321
+  (0.0ms) begin transaction
322
+  (0.0ms) rollback transaction
323
+  (0.0ms) begin transaction
324
+  (0.0ms) rollback transaction
325
+  (0.0ms) begin transaction
326
+  (0.0ms) rollback transaction
327
+  (0.0ms) begin transaction
328
+  (0.0ms) rollback transaction
329
+  (0.0ms) begin transaction
330
+  (0.0ms) rollback transaction
331
+  (0.0ms) begin transaction
332
+  (0.0ms) rollback transaction
333
+  (0.0ms) begin transaction
334
+ Processing by CanvasOauth::CanvasController#oauth as HTML
335
+ Rendering text template
336
+ Rendered text template (0.0ms)
337
+ Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.0ms)
338
+  (0.1ms) rollback transaction
339
+  (0.0ms) begin transaction
340
+ Processing by CanvasOauth::CanvasController#oauth as HTML
341
+ Parameters: {"code"=>"valid", "state"=>"zzyyxx"}
342
+ Rendering text template
343
+ Rendered text template (0.0ms)
344
+ Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
345
+  (0.0ms) rollback transaction
346
+  (0.0ms) begin transaction
347
+ Processing by CanvasOauth::CanvasController#oauth as HTML
348
+ Parameters: {"code"=>"valid"}
349
+ Rendering text template
350
+ Rendered text template (0.0ms)
351
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
352
+  (0.0ms) rollback transaction
353
+  (0.1ms) begin transaction
354
+ Processing by CanvasOauth::CanvasController#oauth as HTML
355
+ Parameters: {"code"=>"valid", "state"=>"mismatch"}
356
+ Rendering text template
357
+ Rendered text template (0.0ms)
358
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
359
+  (0.0ms) rollback transaction
360
+  (0.0ms) begin transaction
361
+ Processing by CanvasOauth::CanvasController#oauth as HTML
362
+ Parameters: {"code"=>"valid", "state"=>"zzyyxx"}
363
+ Completed 500 Internal Server Error in 2ms (ActiveRecord: 1.6ms)
364
+  (0.0ms) rollback transaction
365
+  (0.0ms) begin transaction
366
+ Processing by CanvasOauth::CanvasController#oauth as HTML
367
+ Parameters: {"code"=>"invalid"}
368
+ Rendering text template
369
+ Rendered text template (0.0ms)
370
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
371
+  (0.0ms) rollback transaction
372
+  (0.0ms) begin transaction
373
+ Processing by CanvasOauth::CanvasController#oauth as HTML
374
+ Parameters: {"code"=>"valid"}
375
+ Rendering text template
376
+ Rendered text template (0.0ms)
377
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
378
+  (0.0ms) rollback transaction
379
+  (0.0ms) begin transaction
380
+ Processing by CanvasOauth::CanvasController#oauth as HTML
381
+ Parameters: {"code"=>"valid"}
382
+ Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.1ms)
383
+  (0.0ms) rollback transaction
384
+  (0.0ms) begin transaction
385
+  (0.0ms) rollback transaction
386
+  (0.1ms) begin transaction
387
+  (0.0ms) rollback transaction
388
+  (0.0ms) begin transaction
389
+  (0.0ms) rollback transaction
390
+  (0.0ms) begin transaction
391
+  (0.0ms) rollback transaction
392
+  (0.0ms) begin transaction
393
+  (0.0ms) rollback transaction
394
+  (0.0ms) begin transaction
395
+  (0.1ms) rollback transaction
396
+  (0.0ms) begin transaction
397
+  (0.0ms) rollback transaction
398
+  (0.0ms) begin transaction
399
+  (0.0ms) rollback transaction
400
+  (0.0ms) begin transaction
401
+  (0.0ms) rollback transaction
402
+  (0.0ms) begin transaction
403
+  (0.0ms) rollback transaction
404
+  (0.0ms) begin transaction
405
+  (0.0ms) rollback transaction
406
+  (0.0ms) begin transaction
407
+  (0.0ms) rollback transaction
408
+  (0.0ms) begin transaction
409
+  (0.0ms) rollback transaction
410
+ Initializing Canvas using configuration in /Users/kgarner/exempt/instructure/canvas_oauth_engine/spec/dummy/config/canvas.yml
411
+  (0.0ms) begin transaction
412
+  (0.0ms) rollback transaction
413
+  (0.0ms) begin transaction
414
+  (0.0ms) rollback transaction
415
+  (0.0ms) begin transaction
416
+  (0.0ms) rollback transaction
417
+  (0.0ms) begin transaction
418
+  (0.0ms) rollback transaction
419
+  (0.1ms) begin transaction
420
+  (0.0ms) rollback transaction
421
+  (0.0ms) begin transaction
422
+  (0.1ms) rollback transaction
423
+  (0.0ms) begin transaction
424
+  (0.0ms) rollback transaction
425
+  (0.0ms) begin transaction
426
+  (0.0ms) rollback transaction
427
+  (0.0ms) begin transaction
428
+  (0.0ms) rollback transaction
429
+  (0.0ms) begin transaction
430
+  (0.0ms) rollback transaction
431
+  (0.0ms) begin transaction
432
+  (0.0ms) rollback transaction
433
+  (0.0ms) begin transaction
434
+  (0.0ms) rollback transaction
435
+  (0.0ms) begin transaction
436
+  (0.0ms) rollback transaction
437
+  (0.0ms) begin transaction
438
+  (0.0ms) rollback transaction
439
+  (0.0ms) begin transaction
440
+  (0.0ms) rollback transaction
441
+  (0.0ms) begin transaction
442
+  (0.0ms) rollback transaction
443
+  (0.0ms) begin transaction
444
+  (0.0ms) rollback transaction
445
+  (0.0ms) begin transaction
446
+  (0.0ms) rollback transaction
447
+  (0.0ms) begin transaction
448
+  (0.0ms) rollback transaction
449
+  (0.0ms) begin transaction
450
+  (0.0ms) rollback transaction
451
+  (0.0ms) begin transaction
452
+ API call (0.06ms): get ["/api/v1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
453
+  (0.0ms) rollback transaction
454
+  (0.0ms) begin transaction
455
+  (0.1ms) rollback transaction
456
+  (0.0ms) begin transaction
457
+ API call (0.03ms): put ["/api/v1/courses/123/assignments/345", {:body=>{:assignment=>{:omit_from_final_grade=>true}}, :headers=>{}}]
458
+  (0.0ms) rollback transaction
459
+  (0.0ms) begin transaction
460
+ API call (0.03ms): get ["/api/v1/courses/123", {:headers=>{}}]
461
+  (0.0ms) rollback transaction
462
+  (0.0ms) begin transaction
463
+ API call (0.09ms): post ["/api/v1/courses/123/assignments", {:body=>{:assignment=>{:name=>"Assignment"}}, :headers=>{}}]
464
+  (0.1ms) rollback transaction
465
+  (0.0ms) begin transaction
466
+  (0.0ms) rollback transaction
467
+  (0.0ms) begin transaction
468
+ API call (0.04ms): get ["/api/v1/users/123/profile", {:headers=>{}}]
469
+  (0.0ms) rollback transaction
470
+  (0.0ms) begin transaction
471
+  (0.1ms) rollback transaction
472
+  (0.1ms) begin transaction
473
+  (0.1ms) rollback transaction
474
+  (0.1ms) begin transaction
475
+  (0.2ms) rollback transaction
476
+  (0.1ms) begin transaction
477
+ API call (0.09ms): get ["/api/v1/accounts/1/courses", {:query=>{:per_page=>50}, :headers=>{}}]
478
+  (0.1ms) rollback transaction
479
+  (0.1ms) begin transaction
480
+  (0.1ms) rollback transaction
481
+  (0.0ms) begin transaction
482
+ API call (0.12ms): get ["/path", {:headers=>{}}]
483
+  (0.2ms) rollback transaction
484
+  (0.0ms) begin transaction
485
+ API call (0.05ms): get ["/path", {:query=>"stuff", :headers=>{}}]
486
+  (0.0ms) rollback transaction
487
+  (0.0ms) begin transaction
488
+ API call (0.07ms): get ["/path", {:headers=>{}}]
489
+  (0.0ms) rollback transaction
490
+  (0.1ms) begin transaction
491
+ API call (0.05ms): get ["/api/v1/accounts/1/users", {:query=>{:per_page=>50}, :headers=>{}}]
492
+  (0.0ms) rollback transaction
493
+  (0.0ms) begin transaction
494
+  (0.0ms) rollback transaction
495
+  (0.0ms) begin transaction
496
+  (0.0ms) rollback transaction
497
+  (0.0ms) begin transaction
498
+ API call (0.03ms): put ["/api/v1/courses/1/assignments/2/submissions/3", {:body=>{}, :headers=>{}}]
499
+  (0.0ms) rollback transaction
500
+  (0.1ms) begin transaction
501
+ API call (0.04ms): get ["/api/v1/courses/123/assignments", {:query=>{:per_page=>50}, :headers=>{}}]
502
+  (0.0ms) rollback transaction
503
+  (0.1ms) begin transaction
504
+  (0.0ms) rollback transaction
505
+  (0.0ms) begin transaction
506
+ API call (0.05ms): get ["/api/v1/courses/123/sections", {:query=>{:include=>["students", "avatar_url", "enrollments"], :per_page=>50}, :headers=>{}}]
507
+  (0.0ms) rollback transaction
508
+  (0.0ms) begin transaction
509
+  (0.0ms) rollback transaction
510
+  (0.0ms) begin transaction
511
+  (0.1ms) rollback transaction
512
+  (0.0ms) begin transaction
513
+ API call (0.03ms): get ["/api/v1/courses/123/students", {:query=>{:per_page=>50}, :headers=>{}}]
514
+  (0.1ms) rollback transaction
515
+  (0.0ms) begin transaction
516
+  (0.0ms) rollback transaction
@@ -174,6 +174,20 @@ describe CanvasOauth::CanvasApi do
174
174
  end
175
175
  end
176
176
 
177
+ describe "update_assignment" do
178
+ it "puts to /api/v1/courses/:course_id/assignments/:id" do
179
+ expect(CanvasOauth::CanvasApi).to receive(:put).with('/api/v1/courses/123/assignments/345', anything())
180
+ canvas.update_assignment('123', '345', omit_from_final_grade: true)
181
+ end
182
+
183
+ it "sets the body of the request to the assignment params" do
184
+ expect(canvas).to receive(:authenticated_put).
185
+ with(anything(), { body: { assignment: { omit_from_final_grade: true }}})
186
+
187
+ canvas.update_assignment('123', '345', omit_from_final_grade: true)
188
+ end
189
+ end
190
+
177
191
  describe "grade_assignment" do
178
192
  it "puts to /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:id" do
179
193
  expect(CanvasOauth::CanvasApi).to receive(:put).with('/api/v1/courses/1/assignments/2/submissions/3', anything())
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_oauth_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Donahue
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-08-09 00:00:00.000000000 Z
13
+ date: 2019-11-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -264,6 +264,8 @@ files:
264
264
  - spec/dummy/config/routes.rb
265
265
  - spec/dummy/db/migrate/20160711200737_create_canvas_oauth_authorizations.canvas_oauth.rb
266
266
  - spec/dummy/db/schema.rb
267
+ - spec/dummy/db/test.sqlite3
268
+ - spec/dummy/log/test.log
267
269
  - spec/dummy/public/404.html
268
270
  - spec/dummy/public/422.html
269
271
  - spec/dummy/public/500.html
@@ -293,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
295
  version: '0'
294
296
  requirements: []
295
297
  rubyforge_project:
296
- rubygems_version: 2.7.6
298
+ rubygems_version: 2.6.14.4
297
299
  signing_key:
298
300
  specification_version: 4
299
301
  summary: CanvasOauth is a mountable engine for handling the oauth workflow with canvas
@@ -327,7 +329,9 @@ test_files:
327
329
  - spec/dummy/public/404.html
328
330
  - spec/dummy/public/robots.txt
329
331
  - spec/dummy/db/schema.rb
332
+ - spec/dummy/db/test.sqlite3
330
333
  - spec/dummy/db/migrate/20160711200737_create_canvas_oauth_authorizations.canvas_oauth.rb
334
+ - spec/dummy/log/test.log
331
335
  - spec/dummy/README.rdoc
332
336
  - spec/models/canvas_oauth/authorization_spec.rb
333
337
  - spec/lib/canvas_oauth/canvas_api_extensions_spec.rb