canvas_sync 0.17.26.beta1 → 0.17.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb +24 -0
  4. data/lib/canvas_sync/generators/templates/models/content_migration.rb +10 -0
  5. data/lib/canvas_sync/importers/bulk_importer.rb +1 -1
  6. data/lib/canvas_sync/job_batches/context_hash.rb +4 -0
  7. data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +12 -9
  8. data/lib/canvas_sync/job_batches/jobs/managed_batch_job.rb +62 -25
  9. data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +9 -3
  10. data/lib/canvas_sync/job_batches/sidekiq/web/helpers.rb +1 -1
  11. data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +2 -0
  12. data/lib/canvas_sync/jobs/sync_content_migrations_job.rb +20 -0
  13. data/lib/canvas_sync/jobs/term_batches_job.rb +30 -3
  14. data/lib/canvas_sync/processors/content_migrations_processor.rb +19 -0
  15. data/lib/canvas_sync/processors/model_mappings.yml +40 -0
  16. data/lib/canvas_sync/version.rb +1 -1
  17. data/lib/canvas_sync.rb +12 -0
  18. data/spec/canvas_sync/jobs/sync_content_migrations_job_spec.rb +30 -0
  19. data/spec/canvas_sync/processors/content_migrations_processor_spec.rb +13 -0
  20. data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +5 -0
  21. data/spec/dummy/app/models/content_migration.rb +16 -0
  22. data/spec/dummy/db/migrate/20220308072643_create_content_migrations.rb +30 -0
  23. data/spec/dummy/db/schema.rb +19 -1
  24. data/spec/support/fixtures/reports/content_migrations.csv +3 -0
  25. data/spec/support/fixtures/reports/users.csv +3 -2
  26. metadata +19 -13
  27. data/spec/dummy/log/development.log +0 -2069
  28. data/spec/dummy/log/test.log +0 -83945
  29. data/spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv +0 -3
  30. data/spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv +0 -4
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.17.26.beta1
4
+ version: 0.17.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-17 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -381,6 +381,7 @@ files:
381
381
  - lib/canvas_sync/generators/templates/migrations/create_admins.rb
382
382
  - lib/canvas_sync/generators/templates/migrations/create_assignment_groups.rb
383
383
  - lib/canvas_sync/generators/templates/migrations/create_assignments.rb
384
+ - lib/canvas_sync/generators/templates/migrations/create_content_migrations.rb
384
385
  - lib/canvas_sync/generators/templates/migrations/create_context_module_items.rb
385
386
  - lib/canvas_sync/generators/templates/migrations/create_context_modules.rb
386
387
  - lib/canvas_sync/generators/templates/migrations/create_courses.rb
@@ -400,6 +401,7 @@ files:
400
401
  - lib/canvas_sync/generators/templates/models/admin.rb
401
402
  - lib/canvas_sync/generators/templates/models/assignment.rb
402
403
  - lib/canvas_sync/generators/templates/models/assignment_group.rb
404
+ - lib/canvas_sync/generators/templates/models/content_migration.rb
403
405
  - lib/canvas_sync/generators/templates/models/context_module.rb
404
406
  - lib/canvas_sync/generators/templates/models/context_module_item.rb
405
407
  - lib/canvas_sync/generators/templates/models/course.rb
@@ -469,6 +471,7 @@ files:
469
471
  - lib/canvas_sync/jobs/sync_admins_job.rb
470
472
  - lib/canvas_sync/jobs/sync_assignment_groups_job.rb
471
473
  - lib/canvas_sync/jobs/sync_assignments_job.rb
474
+ - lib/canvas_sync/jobs/sync_content_migrations_job.rb
472
475
  - lib/canvas_sync/jobs/sync_context_module_items_job.rb
473
476
  - lib/canvas_sync/jobs/sync_context_modules_job.rb
474
477
  - lib/canvas_sync/jobs/sync_provisioning_report_job.rb
@@ -480,6 +483,7 @@ files:
480
483
  - lib/canvas_sync/misc_helper.rb
481
484
  - lib/canvas_sync/processors/assignment_groups_processor.rb
482
485
  - lib/canvas_sync/processors/assignments_processor.rb
486
+ - lib/canvas_sync/processors/content_migrations_processor.rb
483
487
  - lib/canvas_sync/processors/context_module_items_processor.rb
484
488
  - lib/canvas_sync/processors/context_modules_processor.rb
485
489
  - lib/canvas_sync/processors/model_mappings.yml
@@ -498,6 +502,7 @@ files:
498
502
  - spec/canvas_sync/jobs/sync_admins_job_spec.rb
499
503
  - spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb
500
504
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
505
+ - spec/canvas_sync/jobs/sync_content_migrations_job_spec.rb
501
506
  - spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb
502
507
  - spec/canvas_sync/jobs/sync_context_modules_job_spec.rb
503
508
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
@@ -522,6 +527,7 @@ files:
522
527
  - spec/canvas_sync/models/user_spec.rb
523
528
  - spec/canvas_sync/processors/assignment_groups_processor_spec.rb
524
529
  - spec/canvas_sync/processors/assignments_processor_spec.rb
530
+ - spec/canvas_sync/processors/content_migrations_processor_spec.rb
525
531
  - spec/canvas_sync/processors/context_module_items_processor_spec.rb
526
532
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
527
533
  - spec/canvas_sync/processors/normal_processor_spec.rb
@@ -536,6 +542,7 @@ files:
536
542
  - spec/dummy/app/models/application_record.rb
537
543
  - spec/dummy/app/models/assignment.rb
538
544
  - spec/dummy/app/models/assignment_group.rb
545
+ - spec/dummy/app/models/content_migration.rb
539
546
  - spec/dummy/app/models/context_module.rb
540
547
  - spec/dummy/app/models/context_module_item.rb
541
548
  - spec/dummy/app/models/course.rb
@@ -612,9 +619,8 @@ files:
612
619
  - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
613
620
  - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
614
621
  - spec/dummy/db/migrate/20211001184920_create_grading_period_groups.rb
622
+ - spec/dummy/db/migrate/20220308072643_create_content_migrations.rb
615
623
  - spec/dummy/db/schema.rb
616
- - spec/dummy/log/development.log
617
- - spec/dummy/log/test.log
618
624
  - spec/factories/account_factory.rb
619
625
  - spec/factories/admin_factory.rb
620
626
  - spec/factories/assignment_factory.rb
@@ -654,6 +660,7 @@ files:
654
660
  - spec/support/fixtures/canvas_responses/terms.json
655
661
  - spec/support/fixtures/reports/assignment_groups.csv
656
662
  - spec/support/fixtures/reports/assignments.csv
663
+ - spec/support/fixtures/reports/content_migrations.csv
657
664
  - spec/support/fixtures/reports/context_module_items.csv
658
665
  - spec/support/fixtures/reports/context_modules.csv
659
666
  - spec/support/fixtures/reports/courses.csv
@@ -663,8 +670,6 @@ files:
663
670
  - spec/support/fixtures/reports/group_memberships.csv
664
671
  - spec/support/fixtures/reports/groups.csv
665
672
  - spec/support/fixtures/reports/provisioning_csv
666
- - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
667
- - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
668
673
  - spec/support/fixtures/reports/sections.csv
669
674
  - spec/support/fixtures/reports/submissions.csv
670
675
  - spec/support/fixtures/reports/user_observers.csv
@@ -684,11 +689,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
684
689
  version: '0'
685
690
  required_rubygems_version: !ruby/object:Gem::Requirement
686
691
  requirements:
687
- - - ">"
692
+ - - ">="
688
693
  - !ruby/object:Gem::Version
689
- version: 1.3.1
694
+ version: '0'
690
695
  requirements: []
691
- rubygems_version: 3.0.3
696
+ rubygems_version: 3.0.3.1
692
697
  signing_key:
693
698
  specification_version: 4
694
699
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
@@ -701,6 +706,7 @@ test_files:
701
706
  - spec/canvas_sync/jobs/sync_admins_job_spec.rb
702
707
  - spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb
703
708
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
709
+ - spec/canvas_sync/jobs/sync_content_migrations_job_spec.rb
704
710
  - spec/canvas_sync/jobs/sync_context_module_items_job_spec.rb
705
711
  - spec/canvas_sync/jobs/sync_context_modules_job_spec.rb
706
712
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
@@ -725,6 +731,7 @@ test_files:
725
731
  - spec/canvas_sync/models/user_spec.rb
726
732
  - spec/canvas_sync/processors/assignment_groups_processor_spec.rb
727
733
  - spec/canvas_sync/processors/assignments_processor_spec.rb
734
+ - spec/canvas_sync/processors/content_migrations_processor_spec.rb
728
735
  - spec/canvas_sync/processors/context_module_items_processor_spec.rb
729
736
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
730
737
  - spec/canvas_sync/processors/normal_processor_spec.rb
@@ -739,6 +746,7 @@ test_files:
739
746
  - spec/dummy/app/models/application_record.rb
740
747
  - spec/dummy/app/models/assignment.rb
741
748
  - spec/dummy/app/models/assignment_group.rb
749
+ - spec/dummy/app/models/content_migration.rb
742
750
  - spec/dummy/app/models/context_module.rb
743
751
  - spec/dummy/app/models/context_module_item.rb
744
752
  - spec/dummy/app/models/course.rb
@@ -815,9 +823,8 @@ test_files:
815
823
  - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
816
824
  - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
817
825
  - spec/dummy/db/migrate/20211001184920_create_grading_period_groups.rb
826
+ - spec/dummy/db/migrate/20220308072643_create_content_migrations.rb
818
827
  - spec/dummy/db/schema.rb
819
- - spec/dummy/log/development.log
820
- - spec/dummy/log/test.log
821
828
  - spec/factories/account_factory.rb
822
829
  - spec/factories/admin_factory.rb
823
830
  - spec/factories/assignment_factory.rb
@@ -857,6 +864,7 @@ test_files:
857
864
  - spec/support/fixtures/canvas_responses/terms.json
858
865
  - spec/support/fixtures/reports/assignment_groups.csv
859
866
  - spec/support/fixtures/reports/assignments.csv
867
+ - spec/support/fixtures/reports/content_migrations.csv
860
868
  - spec/support/fixtures/reports/context_module_items.csv
861
869
  - spec/support/fixtures/reports/context_modules.csv
862
870
  - spec/support/fixtures/reports/courses.csv
@@ -866,8 +874,6 @@ test_files:
866
874
  - spec/support/fixtures/reports/group_memberships.csv
867
875
  - spec/support/fixtures/reports/groups.csv
868
876
  - spec/support/fixtures/reports/provisioning_csv
869
- - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
870
- - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
871
877
  - spec/support/fixtures/reports/sections.csv
872
878
  - spec/support/fixtures/reports/submissions.csv
873
879
  - spec/support/fixtures/reports/user_observers.csv