canvas_sync 0.17.18 → 0.17.23.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -1
  3. data/lib/canvas_sync/concerns/sync_mapping.rb +112 -0
  4. data/lib/canvas_sync/generators/install_generator.rb +1 -0
  5. data/lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb +22 -0
  6. data/lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb +22 -0
  7. data/lib/canvas_sync/generators/templates/migrations/create_user_observers.rb +17 -0
  8. data/lib/canvas_sync/generators/templates/models/grading_period.rb +8 -0
  9. data/lib/canvas_sync/generators/templates/models/grading_period_group.rb +9 -0
  10. data/lib/canvas_sync/generators/templates/models/user_observer.rb +11 -0
  11. data/lib/canvas_sync/importers/bulk_importer.rb +27 -16
  12. data/lib/canvas_sync/job_batches/chain_builder.rb +1 -1
  13. data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +1 -1
  14. data/lib/canvas_sync/jobs/report_checker.rb +37 -4
  15. data/lib/canvas_sync/jobs/report_starter.rb +2 -2
  16. data/lib/canvas_sync/processors/assignment_groups_processor.rb +1 -7
  17. data/lib/canvas_sync/processors/assignments_processor.rb +1 -7
  18. data/lib/canvas_sync/processors/context_module_items_processor.rb +1 -7
  19. data/lib/canvas_sync/processors/context_modules_processor.rb +1 -7
  20. data/lib/canvas_sync/processors/model_mappings.yml +68 -0
  21. data/lib/canvas_sync/processors/normal_processor.rb +3 -3
  22. data/lib/canvas_sync/processors/provisioning_report_processor.rb +21 -63
  23. data/lib/canvas_sync/processors/report_processor.rb +14 -9
  24. data/lib/canvas_sync/processors/submissions_processor.rb +1 -7
  25. data/lib/canvas_sync/record.rb +4 -0
  26. data/lib/canvas_sync/version.rb +1 -1
  27. data/lib/canvas_sync.rb +4 -1
  28. data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +40 -0
  29. data/spec/dummy/app/models/grading_period.rb +14 -0
  30. data/spec/dummy/app/models/grading_period_group.rb +15 -0
  31. data/spec/dummy/app/models/user_observer.rb +17 -0
  32. data/spec/dummy/db/migrate/20210907233329_create_user_observers.rb +23 -0
  33. data/spec/dummy/db/migrate/20210907233330_create_grading_periods.rb +28 -0
  34. data/spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb +28 -0
  35. data/spec/dummy/db/schema.rb +42 -1
  36. data/spec/dummy/log/development.log +1167 -0
  37. data/spec/dummy/log/test.log +4734 -0
  38. data/spec/support/fixtures/reports/grading_period_groups.csv +2 -0
  39. data/spec/support/fixtures/reports/grading_periods.csv +3 -0
  40. data/spec/support/fixtures/reports/user_observers.csv +3 -0
  41. metadata +33 -18
@@ -0,0 +1,2 @@
1
+ grading_period_group_id,canvas_course_id,canvas_account_id,title,weighted,display_totals_for_all_grading_periods,status
2
+ 1,,1,Test Group,false,false,active
@@ -0,0 +1,3 @@
1
+ grading_period_id,title,weight,start_date,end_date,close_date,grading_period_group_id,status
2
+ 1,Period 1,0.2,2019-07-01 06:00:00 UTC,2019-08-01 05:59:59 UTC,2019-08-01 05:59:59 UTC,1,active
3
+ 2,Period 2,0.8,2019-08-01 06:00:00 UTC,2019-09-01 05:59:59 UTC,2019-09-01 05:59:59 UTC,1,deleted
@@ -0,0 +1,3 @@
1
+ canvas_observer_id,observer_id,canvas_student_id,student_id,status,created_by_sis
2
+ 21,,3,"bravo:test:sis Hello World",active,false
3
+ 21,,2,2,active,false
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.18
4
+ version: 0.17.23.beta2
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-08-18 00:00:00.000000000 Z
11
+ date: 2021-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.17'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.17'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rails
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -386,6 +372,7 @@ files:
386
372
  - lib/canvas_sync/concerns/account/ancestry.rb
387
373
  - lib/canvas_sync/concerns/api_syncable.rb
388
374
  - lib/canvas_sync/concerns/legacy_columns.rb
375
+ - lib/canvas_sync/concerns/sync_mapping.rb
389
376
  - lib/canvas_sync/config.rb
390
377
  - lib/canvas_sync/engine.rb
391
378
  - lib/canvas_sync/generators/install_generator.rb
@@ -398,6 +385,8 @@ files:
398
385
  - lib/canvas_sync/generators/templates/migrations/create_context_modules.rb
399
386
  - lib/canvas_sync/generators/templates/migrations/create_courses.rb
400
387
  - lib/canvas_sync/generators/templates/migrations/create_enrollments.rb
388
+ - lib/canvas_sync/generators/templates/migrations/create_grading_period_groups.rb
389
+ - lib/canvas_sync/generators/templates/migrations/create_grading_periods.rb
401
390
  - lib/canvas_sync/generators/templates/migrations/create_group_memberships.rb
402
391
  - lib/canvas_sync/generators/templates/migrations/create_groups.rb
403
392
  - lib/canvas_sync/generators/templates/migrations/create_pseudonyms.rb
@@ -405,6 +394,7 @@ files:
405
394
  - lib/canvas_sync/generators/templates/migrations/create_sections.rb
406
395
  - lib/canvas_sync/generators/templates/migrations/create_submissions.rb
407
396
  - lib/canvas_sync/generators/templates/migrations/create_terms.rb
397
+ - lib/canvas_sync/generators/templates/migrations/create_user_observers.rb
408
398
  - lib/canvas_sync/generators/templates/migrations/create_users.rb
409
399
  - lib/canvas_sync/generators/templates/models/account.rb
410
400
  - lib/canvas_sync/generators/templates/models/admin.rb
@@ -414,6 +404,8 @@ files:
414
404
  - lib/canvas_sync/generators/templates/models/context_module_item.rb
415
405
  - lib/canvas_sync/generators/templates/models/course.rb
416
406
  - lib/canvas_sync/generators/templates/models/enrollment.rb
407
+ - lib/canvas_sync/generators/templates/models/grading_period.rb
408
+ - lib/canvas_sync/generators/templates/models/grading_period_group.rb
417
409
  - lib/canvas_sync/generators/templates/models/group.rb
418
410
  - lib/canvas_sync/generators/templates/models/group_membership.rb
419
411
  - lib/canvas_sync/generators/templates/models/pseudonym.rb
@@ -422,6 +414,7 @@ files:
422
414
  - lib/canvas_sync/generators/templates/models/submission.rb
423
415
  - lib/canvas_sync/generators/templates/models/term.rb
424
416
  - lib/canvas_sync/generators/templates/models/user.rb
417
+ - lib/canvas_sync/generators/templates/models/user_observer.rb
425
418
  - lib/canvas_sync/generators/templates/services/live_events/assignment_event.rb
426
419
  - lib/canvas_sync/generators/templates/services/live_events/assignment_group_event.rb
427
420
  - lib/canvas_sync/generators/templates/services/live_events/base_event.rb
@@ -546,6 +539,8 @@ files:
546
539
  - spec/dummy/app/models/context_module_item.rb
547
540
  - spec/dummy/app/models/course.rb
548
541
  - spec/dummy/app/models/enrollment.rb
542
+ - spec/dummy/app/models/grading_period.rb
543
+ - spec/dummy/app/models/grading_period_group.rb
549
544
  - spec/dummy/app/models/group.rb
550
545
  - spec/dummy/app/models/group_membership.rb
551
546
  - spec/dummy/app/models/pseudonym.rb
@@ -554,6 +549,7 @@ files:
554
549
  - spec/dummy/app/models/submission.rb
555
550
  - spec/dummy/app/models/term.rb
556
551
  - spec/dummy/app/models/user.rb
552
+ - spec/dummy/app/models/user_observer.rb
557
553
  - spec/dummy/app/services/live_events/assignment_created_event.rb
558
554
  - spec/dummy/app/services/live_events/assignment_event.rb
559
555
  - spec/dummy/app/services/live_events/assignment_updated_event.rb
@@ -612,7 +608,12 @@ files:
612
608
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
613
609
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
614
610
  - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
611
+ - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
612
+ - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
613
+ - spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb
615
614
  - spec/dummy/db/schema.rb
615
+ - spec/dummy/log/development.log
616
+ - spec/dummy/log/test.log
616
617
  - spec/factories/account_factory.rb
617
618
  - spec/factories/admin_factory.rb
618
619
  - spec/factories/assignment_factory.rb
@@ -656,6 +657,8 @@ files:
656
657
  - spec/support/fixtures/reports/context_modules.csv
657
658
  - spec/support/fixtures/reports/courses.csv
658
659
  - spec/support/fixtures/reports/enrollments.csv
660
+ - spec/support/fixtures/reports/grading_period_groups.csv
661
+ - spec/support/fixtures/reports/grading_periods.csv
659
662
  - spec/support/fixtures/reports/group_memberships.csv
660
663
  - spec/support/fixtures/reports/groups.csv
661
664
  - spec/support/fixtures/reports/provisioning_csv
@@ -663,6 +666,7 @@ files:
663
666
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
664
667
  - spec/support/fixtures/reports/sections.csv
665
668
  - spec/support/fixtures/reports/submissions.csv
669
+ - spec/support/fixtures/reports/user_observers.csv
666
670
  - spec/support/fixtures/reports/users.csv
667
671
  - spec/support/fixtures/reports/xlist.csv
668
672
  homepage: https://instructure.com
@@ -679,9 +683,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
679
683
  version: '0'
680
684
  required_rubygems_version: !ruby/object:Gem::Requirement
681
685
  requirements:
682
- - - ">="
686
+ - - ">"
683
687
  - !ruby/object:Gem::Version
684
- version: '0'
688
+ version: 1.3.1
685
689
  requirements: []
686
690
  rubygems_version: 3.0.3
687
691
  signing_key:
@@ -738,6 +742,8 @@ test_files:
738
742
  - spec/dummy/app/models/context_module_item.rb
739
743
  - spec/dummy/app/models/course.rb
740
744
  - spec/dummy/app/models/enrollment.rb
745
+ - spec/dummy/app/models/grading_period.rb
746
+ - spec/dummy/app/models/grading_period_group.rb
741
747
  - spec/dummy/app/models/group.rb
742
748
  - spec/dummy/app/models/group_membership.rb
743
749
  - spec/dummy/app/models/pseudonym.rb
@@ -746,6 +752,7 @@ test_files:
746
752
  - spec/dummy/app/models/submission.rb
747
753
  - spec/dummy/app/models/term.rb
748
754
  - spec/dummy/app/models/user.rb
755
+ - spec/dummy/app/models/user_observer.rb
749
756
  - spec/dummy/app/services/live_events/assignment_created_event.rb
750
757
  - spec/dummy/app/services/live_events/assignment_event.rb
751
758
  - spec/dummy/app/services/live_events/assignment_updated_event.rb
@@ -804,7 +811,12 @@ test_files:
804
811
  - spec/dummy/db/migrate/20200415171620_create_groups.rb
805
812
  - spec/dummy/db/migrate/20200416214248_create_group_memberships.rb
806
813
  - spec/dummy/db/migrate/20201016181346_create_pseudonyms.rb
814
+ - spec/dummy/db/migrate/20210907233329_create_user_observers.rb
815
+ - spec/dummy/db/migrate/20210907233330_create_grading_periods.rb
816
+ - spec/dummy/db/migrate/20210907233331_create_grading_period_groups.rb
807
817
  - spec/dummy/db/schema.rb
818
+ - spec/dummy/log/development.log
819
+ - spec/dummy/log/test.log
808
820
  - spec/factories/account_factory.rb
809
821
  - spec/factories/admin_factory.rb
810
822
  - spec/factories/assignment_factory.rb
@@ -848,6 +860,8 @@ test_files:
848
860
  - spec/support/fixtures/reports/context_modules.csv
849
861
  - spec/support/fixtures/reports/courses.csv
850
862
  - spec/support/fixtures/reports/enrollments.csv
863
+ - spec/support/fixtures/reports/grading_period_groups.csv
864
+ - spec/support/fixtures/reports/grading_periods.csv
851
865
  - spec/support/fixtures/reports/group_memberships.csv
852
866
  - spec/support/fixtures/reports/groups.csv
853
867
  - spec/support/fixtures/reports/provisioning_csv
@@ -855,5 +869,6 @@ test_files:
855
869
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
856
870
  - spec/support/fixtures/reports/sections.csv
857
871
  - spec/support/fixtures/reports/submissions.csv
872
+ - spec/support/fixtures/reports/user_observers.csv
858
873
  - spec/support/fixtures/reports/users.csv
859
874
  - spec/support/fixtures/reports/xlist.csv