canvas_sync 0.16.4 → 0.17.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +49 -137
  3. data/app/models/canvas_sync/sync_batch.rb +5 -0
  4. data/db/migrate/20170915210836_create_canvas_sync_job_log.rb +12 -31
  5. data/db/migrate/20180725155729_add_job_id_to_canvas_sync_job_logs.rb +4 -13
  6. data/db/migrate/20190916154829_add_fork_count_to_canvas_sync_job_logs.rb +3 -11
  7. data/db/migrate/20201018210836_create_canvas_sync_sync_batches.rb +11 -0
  8. data/lib/canvas_sync.rb +36 -118
  9. data/lib/canvas_sync/job.rb +5 -5
  10. data/lib/canvas_sync/job_batches/batch.rb +401 -0
  11. data/lib/canvas_sync/job_batches/batch_aware_job.rb +62 -0
  12. data/lib/canvas_sync/job_batches/callback.rb +157 -0
  13. data/lib/canvas_sync/job_batches/chain_builder.rb +220 -0
  14. data/lib/canvas_sync/job_batches/context_hash.rb +147 -0
  15. data/lib/canvas_sync/job_batches/jobs/base_job.rb +7 -0
  16. data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +18 -0
  17. data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +73 -0
  18. data/lib/canvas_sync/job_batches/sidekiq.rb +93 -0
  19. data/lib/canvas_sync/job_batches/status.rb +83 -0
  20. data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +35 -0
  21. data/lib/canvas_sync/jobs/report_checker.rb +3 -6
  22. data/lib/canvas_sync/jobs/report_processor_job.rb +2 -5
  23. data/lib/canvas_sync/jobs/report_starter.rb +27 -19
  24. data/lib/canvas_sync/jobs/sync_accounts_job.rb +3 -5
  25. data/lib/canvas_sync/jobs/sync_admins_job.rb +2 -4
  26. data/lib/canvas_sync/jobs/sync_assignment_groups_job.rb +2 -4
  27. data/lib/canvas_sync/jobs/sync_assignments_job.rb +2 -4
  28. data/lib/canvas_sync/jobs/sync_context_module_items_job.rb +2 -4
  29. data/lib/canvas_sync/jobs/sync_context_modules_job.rb +2 -4
  30. data/lib/canvas_sync/jobs/sync_provisioning_report_job.rb +4 -34
  31. data/lib/canvas_sync/jobs/sync_roles_job.rb +2 -5
  32. data/lib/canvas_sync/jobs/sync_simple_table_job.rb +11 -32
  33. data/lib/canvas_sync/jobs/sync_submissions_job.rb +2 -4
  34. data/lib/canvas_sync/jobs/sync_terms_job.rb +25 -8
  35. data/lib/canvas_sync/misc_helper.rb +15 -0
  36. data/lib/canvas_sync/version.rb +1 -1
  37. data/spec/canvas_sync/canvas_sync_spec.rb +136 -153
  38. data/spec/canvas_sync/jobs/job_spec.rb +9 -17
  39. data/spec/canvas_sync/jobs/report_checker_spec.rb +1 -3
  40. data/spec/canvas_sync/jobs/report_processor_job_spec.rb +0 -3
  41. data/spec/canvas_sync/jobs/report_starter_spec.rb +19 -28
  42. data/spec/canvas_sync/jobs/sync_admins_job_spec.rb +1 -4
  43. data/spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb +2 -1
  44. data/spec/canvas_sync/jobs/sync_assignments_job_spec.rb +3 -2
  45. data/spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb +3 -2
  46. data/spec/canvas_sync/jobs/sync_context_modules_job_spec.rb +3 -2
  47. data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +3 -35
  48. data/spec/canvas_sync/jobs/sync_roles_job_spec.rb +1 -4
  49. data/spec/canvas_sync/jobs/sync_simple_table_job_spec.rb +5 -12
  50. data/spec/canvas_sync/jobs/sync_submissions_job_spec.rb +2 -1
  51. data/spec/canvas_sync/jobs/sync_terms_job_spec.rb +1 -4
  52. data/spec/dummy/app/models/account.rb +3 -0
  53. data/spec/dummy/app/models/pseudonym.rb +14 -0
  54. data/spec/dummy/app/models/submission.rb +1 -0
  55. data/spec/dummy/app/models/user.rb +1 -0
  56. data/spec/dummy/config/environments/test.rb +2 -0
  57. data/spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb +24 -0
  58. data/spec/dummy/db/schema.rb +24 -4
  59. data/spec/dummy/db/test.sqlite3 +0 -0
  60. data/spec/dummy/log/development.log +1248 -0
  61. data/spec/dummy/log/test.log +43258 -0
  62. data/spec/job_batching/batch_aware_job_spec.rb +100 -0
  63. data/spec/job_batching/batch_spec.rb +372 -0
  64. data/spec/job_batching/callback_spec.rb +38 -0
  65. data/spec/job_batching/flow_spec.rb +91 -0
  66. data/spec/job_batching/integration/integration.rb +57 -0
  67. data/spec/job_batching/integration/nested.rb +88 -0
  68. data/spec/job_batching/integration/simple.rb +47 -0
  69. data/spec/job_batching/integration/workflow.rb +134 -0
  70. data/spec/job_batching/integration_helper.rb +48 -0
  71. data/spec/job_batching/sidekiq_spec.rb +124 -0
  72. data/spec/job_batching/status_spec.rb +92 -0
  73. data/spec/job_batching/support/base_job.rb +14 -0
  74. data/spec/job_batching/support/sample_callback.rb +2 -0
  75. data/spec/spec_helper.rb +17 -0
  76. data/spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv +3 -0
  77. data/spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv +4 -0
  78. metadata +105 -14
  79. data/lib/canvas_sync/job_chain.rb +0 -57
  80. data/lib/canvas_sync/jobs/fork_gather.rb +0 -59
  81. data/spec/canvas_sync/jobs/fork_gather_spec.rb +0 -73
@@ -0,0 +1,48 @@
1
+ require 'spec_helper'
2
+ require 'sidekiq/batch'
3
+ require 'sidekiq/testing'
4
+
5
+ Sidekiq::Testing.server_middleware do |chain|
6
+ chain.add CanvasSync::JobBatches::Batch::Middleware::ServerMiddleware
7
+ end
8
+
9
+ Sidekiq.redis { |r| r.flushdb }
10
+
11
+ def redis_keys
12
+ Sidekiq.redis { |r| r.keys('BID-*') }
13
+ end
14
+
15
+ def dump_redis_keys
16
+ puts redis_keys.inspect
17
+ end
18
+
19
+ def process_tests
20
+ out_buf = StringIO.new
21
+ Sidekiq.logger = Logger.new out_buf
22
+
23
+ # Sidekiq.logger.level = :info
24
+
25
+ Sidekiq::Worker.drain_all
26
+
27
+ output = out_buf.string
28
+ keys = redis_keys
29
+ puts out_buf.string
30
+
31
+ [output, keys]
32
+ end
33
+
34
+ def overall_tests output, keys
35
+ describe "sidekiq batch" do
36
+ it "runs overall complete callback" do
37
+ expect(output).to include "Overall Complete"
38
+ end
39
+
40
+ it "runs overall success callback" do
41
+ expect(output).to include "Overall Success"
42
+ end
43
+
44
+ it "cleans redis keys" do
45
+ expect(keys).to eq([])
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,124 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe CanvasSync::JobBatches::Sidekiq do
4
+ describe CanvasSync::JobBatches::Sidekiq::ServerMiddleware do
5
+ context 'when without batch' do
6
+ it 'just yields' do
7
+ yielded = false
8
+ expect(CanvasSync::JobBatches::Batch).not_to receive(:process_successful_job)
9
+ expect(CanvasSync::JobBatches::Batch).not_to receive(:process_failed_job)
10
+ subject.call(nil, {}, nil) { yielded = true }
11
+ expect(yielded).to be_truthy
12
+ end
13
+ end
14
+
15
+ context 'when in batch' do
16
+ let(:bid) { 'SAMPLEBID' }
17
+ let(:jid) { 'SAMPLEJID' }
18
+
19
+ context 'when successful' do
20
+ it 'yields' do
21
+ yielded = false
22
+ subject.call(nil, { 'bid' => bid, 'jid' => jid }, nil) { yielded = true }
23
+ expect(yielded).to be_truthy
24
+ end
25
+
26
+ it 'calls process_successful_job' do
27
+ expect(CanvasSync::JobBatches::Batch).to receive(:process_successful_job).with(bid, nil)
28
+ subject.call(nil, { 'bid' => bid }, nil) {}
29
+ end
30
+ end
31
+
32
+ context 'when failed' do
33
+ it 'calls process_failed_job and reraises exception' do
34
+ reraised = false
35
+ expect(CanvasSync::JobBatches::Batch).to receive(:process_failed_job)
36
+ begin
37
+ subject.call(nil, { 'bid' => bid }, nil) { raise 'ERR' }
38
+ rescue
39
+ reraised = true
40
+ end
41
+ expect(reraised).to be_truthy
42
+ end
43
+ end
44
+ end
45
+ end
46
+
47
+ describe CanvasSync::JobBatches::Sidekiq::ClientMiddleware do
48
+ context 'when without batch' do
49
+ it 'just yields' do
50
+ yielded = false
51
+ expect(CanvasSync::JobBatches::Batch).not_to receive(:increment_job_queue)
52
+ subject.call(nil, {}, nil) { yielded = true }
53
+ expect(yielded).to be_truthy
54
+ end
55
+ end
56
+
57
+ context 'when in batch' do
58
+ let(:bid) { 'SAMPLEBID' }
59
+ let(:jid) { 'SAMPLEJID' }
60
+ before { Thread.current[:batch] = CanvasSync::JobBatches::Batch.new(bid) }
61
+
62
+ it 'yields' do
63
+ yielded = false
64
+ subject.call(nil, { 'jid' => jid }, nil) { yielded = true }
65
+ expect(yielded).to be_truthy
66
+ end
67
+
68
+ it 'increments job queue' do
69
+ # expect(CanvasSync::JobBatches::Batch).to receive(:increment_job_queue).with(bid)
70
+ # subject.call(nil, { 'jid' => jid }, nil) {}
71
+ end
72
+
73
+ it 'assigns bid to msg' do
74
+ msg = { 'jid' => jid }
75
+ subject.call(nil, msg, nil) {}
76
+ expect(msg[:bid]).to eq(bid)
77
+ end
78
+ end
79
+ end
80
+ end
81
+
82
+ RSpec.describe CanvasSync::JobBatches::Sidekiq do
83
+ let(:config) { class_double(Sidekiq) }
84
+ let(:client_middleware) { double(Sidekiq::Middleware::Chain) }
85
+
86
+ context 'client' do
87
+ it 'adds client middleware' do
88
+ expect(Sidekiq).to receive(:configure_client).and_yield(config)
89
+ expect(config).to receive(:client_middleware).and_yield(client_middleware)
90
+ expect(client_middleware).to receive(:add).with(CanvasSync::JobBatches::Sidekiq::ClientMiddleware)
91
+ CanvasSync::JobBatches::Sidekiq.configure
92
+ end
93
+ end
94
+
95
+ context 'server' do
96
+ let(:server_middleware) { double(Sidekiq::Middleware::Chain) }
97
+ let(:death_handlers) { double(Array) }
98
+
99
+ it 'adds client and server middleware' do
100
+ expect(Sidekiq).to receive(:configure_server).and_yield(config)
101
+ expect(config).to receive(:client_middleware).and_yield(client_middleware)
102
+ expect(config).to receive(:server_middleware).and_yield(server_middleware)
103
+ expect(config).to receive(:death_handlers).and_return(death_handlers)
104
+ expect(client_middleware).to receive(:add).with(CanvasSync::JobBatches::Sidekiq::ClientMiddleware)
105
+ expect(server_middleware).to receive(:add).with(CanvasSync::JobBatches::Sidekiq::ServerMiddleware)
106
+ expect(death_handlers).to receive(:<<)
107
+ CanvasSync::JobBatches::Sidekiq.configure
108
+ end
109
+ end
110
+
111
+ context 'worker' do
112
+ it 'defines method bid' do
113
+ expect(Sidekiq::Worker.instance_methods).to include(:bid)
114
+ end
115
+
116
+ it 'defines method batch' do
117
+ expect(Sidekiq::Worker.instance_methods).to include(:batch)
118
+ end
119
+
120
+ it 'defines method valid_within_batch?' do
121
+ expect(Sidekiq::Worker.instance_methods).to include(:valid_within_batch?)
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,92 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe CanvasSync::JobBatches::Batch::Status do
4
+ let(:bid) { 'BID' }
5
+ let(:batch) { CanvasSync::JobBatches::Batch.new(bid) }
6
+ subject { described_class.new(bid) }
7
+
8
+ describe '#join' do
9
+ it 'raises info' do
10
+ expect { subject.join }.to raise_error('Not supported')
11
+ end
12
+ end
13
+
14
+ describe '#pending' do
15
+ context 'when not initalized' do
16
+ it 'returns 0 pending jobs' do
17
+ expect(subject.pending).to eq(0)
18
+ end
19
+ end
20
+
21
+ context 'when more than 0' do
22
+ before { batch.jobs do TestWorker.perform_async end }
23
+ it 'returns pending jobs' do
24
+ expect(subject.pending).to eq(1)
25
+ end
26
+ end
27
+ end
28
+
29
+ describe '#failures' do
30
+ context 'when not initalized' do
31
+ it 'returns 0 failed jobs' do
32
+ expect(subject.failures).to eq(0)
33
+ end
34
+ end
35
+
36
+ context 'when more than 0' do
37
+ before { batch.increment_job_queue(bid) }
38
+ before { CanvasSync::JobBatches::Batch.process_failed_job(bid, 'FAILEDID') }
39
+
40
+ it 'returns failed jobs' do
41
+ expect(subject.failures).to eq(1)
42
+ end
43
+ end
44
+ end
45
+
46
+ describe '#failure_info' do
47
+ context 'when not initalized' do
48
+ it 'returns empty array' do
49
+ expect(subject.failure_info).to eq([])
50
+ end
51
+ end
52
+
53
+ context 'when with error' do
54
+ before { CanvasSync::JobBatches::Batch.process_failed_job(bid, 'jid123') }
55
+
56
+ it 'returns array with failed jids' do
57
+ expect(subject.failure_info).to eq(['jid123'])
58
+ end
59
+ end
60
+ end
61
+
62
+ describe '#total' do
63
+ context 'when not initalized' do
64
+ it 'returns 0 failed jobs' do
65
+ expect(subject.total).to eq(0)
66
+ end
67
+ end
68
+
69
+ context 'when more than 0' do
70
+ before { batch.jobs do TestWorker.perform_async end }
71
+
72
+ it 'returns failed jobs' do
73
+ expect(subject.total).to eq(1)
74
+ end
75
+ end
76
+ end
77
+
78
+ describe '#data' do
79
+ it 'returns batch description' do
80
+ expect(subject.data).to include(total: 0, failures: 0, pending: 0, created_at: nil, complete: false, failure_info: [], parent_bid: nil)
81
+ end
82
+ end
83
+
84
+ describe '#created_at' do
85
+ it 'returns time' do
86
+ batch = CanvasSync::JobBatches::Batch.new
87
+ batch.jobs do TestWorker.perform_async end
88
+ status = described_class.new(batch.bid)
89
+ expect(status.created_at).not_to be_nil
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,14 @@
1
+ class BatchTestJobBase < ActiveJob::Base
2
+ def perform
3
+ end
4
+
5
+ def self.perform_async(*args)
6
+ perform_later(*args)
7
+ end
8
+ end
9
+
10
+ class FailingBatchTestJobBase < BatchTestJobBase
11
+ def perform
12
+ raise "Foo"
13
+ end
14
+ end
@@ -0,0 +1,2 @@
1
+ class SampleCallback; end
2
+ class SampleCallback2; end
@@ -13,6 +13,19 @@ require 'shoulda/matchers'
13
13
  require 'pry'
14
14
  require 'pry-nav'
15
15
 
16
+ require 'sidekiq/testing'
17
+ Sidekiq::Testing.fake!
18
+
19
+ require 'fakeredis/rspec'
20
+ Dir[File.dirname(__FILE__) + "/job_batching/support/**/*.rb"].each {|f| require f }
21
+
22
+ # Fix an issue with fakeredis with Redis >=4.2
23
+ class Redis::Connection::Memory
24
+ def exists(*keys)
25
+ keys.count { |key| data.key?(key) }
26
+ end
27
+ end
28
+
16
29
  ActiveRecord::Migration.maintain_test_schema!
17
30
 
18
31
  RSpec.configure do |config|
@@ -51,3 +64,7 @@ end
51
64
  def canvas_sync_client
52
65
  Bearcat::Client.new(token: 'cool-token', prefix: 'http://test.instructure.com')
53
66
  end
67
+
68
+ def set_batch_context(ctx)
69
+ allow_any_instance_of(ActiveJob::Base).to receive(:batch_context).and_return(ctx.with_indifferent_access)
70
+ end
@@ -0,0 +1,3 @@
1
+ canvas_course_id,course_id,integration_id,short_name,long_name,canvas_account_id,account_id,canvas_term_id,term_id,status,start_date,end_date,course_format,created_by_sis
2
+ 1,course_sis_id_1,,C1,Course #1,1,,1,term_sis_id_1,active,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE
3
+ 2,course_sis_id_2,,C2,Course #2,1,,1,term_sis_id_2,unpublished,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE
@@ -0,0 +1,4 @@
1
+ canvas_user_id,user_id,integration_id,authentication_provider_id,login_id,first_name,last_name,full_name,sortable_name,short_name,email,status,created_by_sis
2
+ 1,sis_id_1,,123,spiderdude1337,Patches,the Spider,Patches the Spider,"the Spider, Patches",,poorbastard@yharnam.com,active,FALSE
3
+ 2,sis_id_2,,1234,retireddude109,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
4
+ 2,sis_id_2,,1234,retireddude110,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.4
4
+ version: 0.17.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-29 00:00:00.000000000 Z
11
+ date: 2020-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -234,6 +234,34 @@ dependencies:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: fakeredis
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: sidekiq
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - ">="
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
237
265
  - !ruby/object:Gem::Dependency
238
266
  name: activejob
239
267
  requirement: !ruby/object:Gem::Requirement
@@ -248,6 +276,20 @@ dependencies:
248
276
  - - ">="
249
277
  - !ruby/object:Gem::Version
250
278
  version: '0'
279
+ - !ruby/object:Gem::Dependency
280
+ name: redis
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - ">="
284
+ - !ruby/object:Gem::Version
285
+ version: '4.2'
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - ">="
291
+ - !ruby/object:Gem::Version
292
+ version: '4.2'
251
293
  - !ruby/object:Gem::Dependency
252
294
  name: rails
253
295
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +346,7 @@ dependencies:
304
346
  - - ">="
305
347
  - !ruby/object:Gem::Version
306
348
  version: '0'
307
- description:
349
+ description:
308
350
  email:
309
351
  - ncollings@instructure.com
310
352
  executables: []
@@ -316,10 +358,12 @@ files:
316
358
  - app/controllers/api/v1/health_check_controller.rb
317
359
  - app/controllers/api/v1/live_events_controller.rb
318
360
  - app/models/canvas_sync/job_log.rb
361
+ - app/models/canvas_sync/sync_batch.rb
319
362
  - config/initializers/apartment.rb
320
363
  - db/migrate/20170915210836_create_canvas_sync_job_log.rb
321
364
  - db/migrate/20180725155729_add_job_id_to_canvas_sync_job_logs.rb
322
365
  - db/migrate/20190916154829_add_fork_count_to_canvas_sync_job_logs.rb
366
+ - db/migrate/20201018210836_create_canvas_sync_sync_batches.rb
323
367
  - lib/canvas_sync.rb
324
368
  - lib/canvas_sync/api_syncable.rb
325
369
  - lib/canvas_sync/class_callback_executor.rb
@@ -377,8 +421,17 @@ files:
377
421
  - lib/canvas_sync/importers/bulk_importer.rb
378
422
  - lib/canvas_sync/importers/legacy_importer.rb
379
423
  - lib/canvas_sync/job.rb
380
- - lib/canvas_sync/job_chain.rb
381
- - lib/canvas_sync/jobs/fork_gather.rb
424
+ - lib/canvas_sync/job_batches/batch.rb
425
+ - lib/canvas_sync/job_batches/batch_aware_job.rb
426
+ - lib/canvas_sync/job_batches/callback.rb
427
+ - lib/canvas_sync/job_batches/chain_builder.rb
428
+ - lib/canvas_sync/job_batches/context_hash.rb
429
+ - lib/canvas_sync/job_batches/jobs/base_job.rb
430
+ - lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb
431
+ - lib/canvas_sync/job_batches/jobs/serial_batch_job.rb
432
+ - lib/canvas_sync/job_batches/sidekiq.rb
433
+ - lib/canvas_sync/job_batches/status.rb
434
+ - lib/canvas_sync/jobs/begin_sync_chain_job.rb
382
435
  - lib/canvas_sync/jobs/report_checker.rb
383
436
  - lib/canvas_sync/jobs/report_processor_job.rb
384
437
  - lib/canvas_sync/jobs/report_starter.rb
@@ -393,6 +446,7 @@ files:
393
446
  - lib/canvas_sync/jobs/sync_simple_table_job.rb
394
447
  - lib/canvas_sync/jobs/sync_submissions_job.rb
395
448
  - lib/canvas_sync/jobs/sync_terms_job.rb
449
+ - lib/canvas_sync/misc_helper.rb
396
450
  - lib/canvas_sync/processors/assignment_groups_processor.rb
397
451
  - lib/canvas_sync/processors/assignments_processor.rb
398
452
  - lib/canvas_sync/processors/context_module_items_processor.rb
@@ -406,7 +460,6 @@ files:
406
460
  - lib/canvas_sync/sidekiq_job.rb
407
461
  - lib/canvas_sync/version.rb
408
462
  - spec/canvas_sync/canvas_sync_spec.rb
409
- - spec/canvas_sync/jobs/fork_gather_spec.rb
410
463
  - spec/canvas_sync/jobs/job_spec.rb
411
464
  - spec/canvas_sync/jobs/report_checker_spec.rb
412
465
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
@@ -458,6 +511,7 @@ files:
458
511
  - spec/dummy/app/models/enrollment.rb
459
512
  - spec/dummy/app/models/group.rb
460
513
  - spec/dummy/app/models/group_membership.rb
514
+ - spec/dummy/app/models/pseudonym.rb
461
515
  - spec/dummy/app/models/role.rb
462
516
  - spec/dummy/app/models/section.rb
463
517
  - spec/dummy/app/models/submission.rb
@@ -520,7 +574,11 @@ files:
520
574
  - spec/dummy/db/migrate/20190927204546_create_admins.rb
521
575
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
522
576
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
577
+ - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
523
578
  - spec/dummy/db/schema.rb
579
+ - spec/dummy/db/test.sqlite3
580
+ - spec/dummy/log/development.log
581
+ - spec/dummy/log/test.log
524
582
  - spec/factories/account_factory.rb
525
583
  - spec/factories/admin_factory.rb
526
584
  - spec/factories/assignment_factory.rb
@@ -536,6 +594,19 @@ files:
536
594
  - spec/factories/submission_factory.rb
537
595
  - spec/factories/term_factory.rb
538
596
  - spec/factories/user_factory.rb
597
+ - spec/job_batching/batch_aware_job_spec.rb
598
+ - spec/job_batching/batch_spec.rb
599
+ - spec/job_batching/callback_spec.rb
600
+ - spec/job_batching/flow_spec.rb
601
+ - spec/job_batching/integration/integration.rb
602
+ - spec/job_batching/integration/nested.rb
603
+ - spec/job_batching/integration/simple.rb
604
+ - spec/job_batching/integration/workflow.rb
605
+ - spec/job_batching/integration_helper.rb
606
+ - spec/job_batching/sidekiq_spec.rb
607
+ - spec/job_batching/status_spec.rb
608
+ - spec/job_batching/support/base_job.rb
609
+ - spec/job_batching/support/sample_callback.rb
539
610
  - spec/spec_helper.rb
540
611
  - spec/support/fake_canvas.rb
541
612
  - spec/support/fixtures/canvas_responses/admins.json
@@ -552,6 +623,8 @@ files:
552
623
  - spec/support/fixtures/reports/group_memberships.csv
553
624
  - spec/support/fixtures/reports/groups.csv
554
625
  - spec/support/fixtures/reports/provisioning_csv
626
+ - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
627
+ - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
555
628
  - spec/support/fixtures/reports/sections.csv
556
629
  - spec/support/fixtures/reports/submissions.csv
557
630
  - spec/support/fixtures/reports/users.csv
@@ -559,7 +632,7 @@ files:
559
632
  homepage: https://instructure.com
560
633
  licenses: []
561
634
  metadata: {}
562
- post_install_message:
635
+ post_install_message:
563
636
  rdoc_options: []
564
637
  require_paths:
565
638
  - lib
@@ -570,18 +643,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
570
643
  version: '0'
571
644
  required_rubygems_version: !ruby/object:Gem::Requirement
572
645
  requirements:
573
- - - ">="
646
+ - - ">"
574
647
  - !ruby/object:Gem::Version
575
- version: '0'
648
+ version: 1.3.1
576
649
  requirements: []
577
- rubyforge_project:
578
- rubygems_version: 2.5.2.1
579
- signing_key:
650
+ rubygems_version: 3.1.2
651
+ signing_key:
580
652
  specification_version: 4
581
653
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
582
654
  test_files:
583
655
  - spec/canvas_sync/canvas_sync_spec.rb
584
- - spec/canvas_sync/jobs/fork_gather_spec.rb
585
656
  - spec/canvas_sync/jobs/job_spec.rb
586
657
  - spec/canvas_sync/jobs/report_checker_spec.rb
587
658
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
@@ -633,6 +704,7 @@ test_files:
633
704
  - spec/dummy/app/models/enrollment.rb
634
705
  - spec/dummy/app/models/group.rb
635
706
  - spec/dummy/app/models/group_membership.rb
707
+ - spec/dummy/app/models/pseudonym.rb
636
708
  - spec/dummy/app/models/role.rb
637
709
  - spec/dummy/app/models/section.rb
638
710
  - spec/dummy/app/models/submission.rb
@@ -695,7 +767,11 @@ test_files:
695
767
  - spec/dummy/db/migrate/20190927204546_create_admins.rb
696
768
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
697
769
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
770
+ - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
698
771
  - spec/dummy/db/schema.rb
772
+ - spec/dummy/db/test.sqlite3
773
+ - spec/dummy/log/development.log
774
+ - spec/dummy/log/test.log
699
775
  - spec/factories/account_factory.rb
700
776
  - spec/factories/admin_factory.rb
701
777
  - spec/factories/assignment_factory.rb
@@ -711,6 +787,19 @@ test_files:
711
787
  - spec/factories/submission_factory.rb
712
788
  - spec/factories/term_factory.rb
713
789
  - spec/factories/user_factory.rb
790
+ - spec/job_batching/batch_aware_job_spec.rb
791
+ - spec/job_batching/batch_spec.rb
792
+ - spec/job_batching/callback_spec.rb
793
+ - spec/job_batching/flow_spec.rb
794
+ - spec/job_batching/integration/integration.rb
795
+ - spec/job_batching/integration/nested.rb
796
+ - spec/job_batching/integration/simple.rb
797
+ - spec/job_batching/integration/workflow.rb
798
+ - spec/job_batching/integration_helper.rb
799
+ - spec/job_batching/sidekiq_spec.rb
800
+ - spec/job_batching/status_spec.rb
801
+ - spec/job_batching/support/base_job.rb
802
+ - spec/job_batching/support/sample_callback.rb
714
803
  - spec/spec_helper.rb
715
804
  - spec/support/fake_canvas.rb
716
805
  - spec/support/fixtures/canvas_responses/admins.json
@@ -727,6 +816,8 @@ test_files:
727
816
  - spec/support/fixtures/reports/group_memberships.csv
728
817
  - spec/support/fixtures/reports/groups.csv
729
818
  - spec/support/fixtures/reports/provisioning_csv
819
+ - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
820
+ - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
730
821
  - spec/support/fixtures/reports/sections.csv
731
822
  - spec/support/fixtures/reports/submissions.csv
732
823
  - spec/support/fixtures/reports/users.csv