canvas_sync 0.3.14 → 0.3.15

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 +5 -3
  3. data/lib/canvas_sync.rb +3 -1
  4. data/lib/canvas_sync/generators/templates/models/assignment.rb +1 -0
  5. data/lib/canvas_sync/generators/templates/models/assignment_group.rb +7 -0
  6. data/lib/canvas_sync/generators/templates/models/course.rb +1 -0
  7. data/lib/canvas_sync/generators/templates/models/create_assignment_groups.rb +24 -0
  8. data/lib/canvas_sync/generators/templates/models/create_assignments.rb +1 -1
  9. data/lib/canvas_sync/jobs/sync_assignment_groups_job.rb +28 -0
  10. data/lib/canvas_sync/processors/assignment_groups_processor.rb +24 -0
  11. data/lib/canvas_sync/processors/model_mappings.yml +38 -1
  12. data/lib/canvas_sync/version.rb +1 -1
  13. data/spec/canvas_sync/canvas_sync_spec.rb +15 -0
  14. data/spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb +17 -0
  15. data/spec/canvas_sync/models/assignment_group_spec.rb +24 -0
  16. data/spec/canvas_sync/{assignment_spec.rb → models/assignment_spec.rb} +6 -0
  17. data/spec/canvas_sync/models/course_spec.rb +6 -0
  18. data/spec/canvas_sync/{submission_spec.rb → models/submission_spec.rb} +0 -0
  19. data/spec/canvas_sync/processors/assignment_groups_processor_spec.rb +13 -0
  20. data/spec/dummy/app/models/assignment.rb +1 -0
  21. data/spec/dummy/app/models/assignment_group.rb +13 -0
  22. data/spec/dummy/app/models/course.rb +1 -0
  23. data/spec/dummy/db/migrate/{20180212204530_create_assignments.rb → 20180215214227_create_assignments.rb} +1 -1
  24. data/spec/dummy/db/migrate/20180215220605_create_assignment_groups.rb +30 -0
  25. data/spec/dummy/db/schema.rb +20 -2
  26. data/spec/dummy/log/development.log +511 -0
  27. data/spec/dummy/log/test.log +1970 -0
  28. data/spec/factories/assignment_group_factory.rb +9 -0
  29. data/spec/support/fixtures/reports/assignment_groups.csv +3 -0
  30. metadata +26 -8
@@ -0,0 +1,9 @@
1
+ FactoryGirl.define do
2
+ factory :assignment_group do
3
+ sequence(:canvas_assignment_group_id) { |n| n }
4
+ name 'Dummy Assignment Group'
5
+ workflow_state 'available'
6
+ canvas_created_at {1.week.ago}
7
+ canvas_updated_at {1.day.ago}
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ id,name,rules,default_assignment_name,position,assignment_weighting_scheme,group_weight,canvas_course_id,workflow_state,created_at,updated_at
2
+ 1,Assignments,"drop_lowest:1\nnever_drop:36\n",Assignment,1,,50,1,available,"2017-09-08 01:37:33 UTC","2017-09-08 01:37:33 UTC"
3
+ 2,Tests,,Test,1,,50,1,available,"2017-09-08 01:37:33 UTC","2017-09-08 01:37:33 UTC"
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.3.14
4
+ version: 0.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Collings
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-14 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -309,8 +309,10 @@ files:
309
309
  - lib/canvas_sync/generators/install_live_events_generator.rb
310
310
  - lib/canvas_sync/generators/templates/models/admin.rb
311
311
  - lib/canvas_sync/generators/templates/models/assignment.rb
312
+ - lib/canvas_sync/generators/templates/models/assignment_group.rb
312
313
  - lib/canvas_sync/generators/templates/models/course.rb
313
314
  - lib/canvas_sync/generators/templates/models/create_admins.rb
315
+ - lib/canvas_sync/generators/templates/models/create_assignment_groups.rb
314
316
  - lib/canvas_sync/generators/templates/models/create_assignments.rb
315
317
  - lib/canvas_sync/generators/templates/models/create_courses.rb
316
318
  - lib/canvas_sync/generators/templates/models/create_enrollments.rb
@@ -352,25 +354,27 @@ files:
352
354
  - lib/canvas_sync/jobs/report_processor_job.rb
353
355
  - lib/canvas_sync/jobs/report_starter.rb
354
356
  - lib/canvas_sync/jobs/sync_admins_job.rb
357
+ - lib/canvas_sync/jobs/sync_assignment_groups_job.rb
355
358
  - lib/canvas_sync/jobs/sync_assignments_job.rb
356
359
  - lib/canvas_sync/jobs/sync_provisioning_report_job.rb
357
360
  - lib/canvas_sync/jobs/sync_roles_job.rb
358
361
  - lib/canvas_sync/jobs/sync_submissions_job.rb
359
362
  - lib/canvas_sync/jobs/sync_terms_job.rb
360
363
  - lib/canvas_sync/jobs/sync_users_job.rb
364
+ - lib/canvas_sync/processors/assignment_groups_processor.rb
361
365
  - lib/canvas_sync/processors/assignments_processor.rb
362
366
  - lib/canvas_sync/processors/model_mappings.yml
363
367
  - lib/canvas_sync/processors/provisioning_report_processor.rb
364
368
  - lib/canvas_sync/processors/report_processor.rb
365
369
  - lib/canvas_sync/processors/submissions_processor.rb
366
370
  - lib/canvas_sync/version.rb
367
- - spec/canvas_sync/assignment_spec.rb
368
371
  - spec/canvas_sync/canvas_sync_spec.rb
369
372
  - spec/canvas_sync/jobs/job_spec.rb
370
373
  - spec/canvas_sync/jobs/report_checker_spec.rb
371
374
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
372
375
  - spec/canvas_sync/jobs/report_starter_spec.rb
373
376
  - spec/canvas_sync/jobs/sync_admins_job_spec.rb
377
+ - spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb
374
378
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
375
379
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
376
380
  - spec/canvas_sync/jobs/sync_roles_job_spec.rb
@@ -378,21 +382,25 @@ files:
378
382
  - spec/canvas_sync/jobs/sync_terms_job_spec.rb
379
383
  - spec/canvas_sync/jobs/sync_users_job_spec.rb
380
384
  - spec/canvas_sync/models/admins_spec.rb
385
+ - spec/canvas_sync/models/assignment_group_spec.rb
386
+ - spec/canvas_sync/models/assignment_spec.rb
381
387
  - spec/canvas_sync/models/course_spec.rb
382
388
  - spec/canvas_sync/models/enrollment_spec.rb
383
389
  - spec/canvas_sync/models/roles_spec.rb
384
390
  - spec/canvas_sync/models/section_spec.rb
391
+ - spec/canvas_sync/models/submission_spec.rb
385
392
  - spec/canvas_sync/models/term_spec.rb
386
393
  - spec/canvas_sync/models/user_spec.rb
394
+ - spec/canvas_sync/processors/assignment_groups_processor_spec.rb
387
395
  - spec/canvas_sync/processors/assignments_processor_spec.rb
388
396
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
389
397
  - spec/canvas_sync/processors/submissions_processor_spec.rb
390
- - spec/canvas_sync/submission_spec.rb
391
398
  - spec/dummy/README.rdoc
392
399
  - spec/dummy/Rakefile
393
400
  - spec/dummy/app/models/admin.rb
394
401
  - spec/dummy/app/models/application_record.rb
395
402
  - spec/dummy/app/models/assignment.rb
403
+ - spec/dummy/app/models/assignment_group.rb
396
404
  - spec/dummy/app/models/course.rb
397
405
  - spec/dummy/app/models/enrollment.rb
398
406
  - spec/dummy/app/models/role.rb
@@ -420,14 +428,16 @@ files:
420
428
  - spec/dummy/db/migrate/20171107213207_create_sections.rb
421
429
  - spec/dummy/db/migrate/20180103162102_create_roles.rb
422
430
  - spec/dummy/db/migrate/20180109210452_create_admins.rb
423
- - spec/dummy/db/migrate/20180212204530_create_assignments.rb
424
431
  - spec/dummy/db/migrate/20180213235544_create_submissions.rb
432
+ - spec/dummy/db/migrate/20180215214227_create_assignments.rb
433
+ - spec/dummy/db/migrate/20180215220605_create_assignment_groups.rb
425
434
  - spec/dummy/db/schema.rb
426
435
  - spec/dummy/db/test.sqlite3
427
436
  - spec/dummy/log/development.log
428
437
  - spec/dummy/log/test.log
429
438
  - spec/factories/admin_factory.rb
430
439
  - spec/factories/assignment_factory.rb
440
+ - spec/factories/assignment_group_factory.rb
431
441
  - spec/factories/course_factory.rb
432
442
  - spec/factories/enrollment_factory.rb
433
443
  - spec/factories/role_factory.rb
@@ -440,6 +450,7 @@ files:
440
450
  - spec/support/fixtures/canvas_responses/admins.json
441
451
  - spec/support/fixtures/canvas_responses/roles.json
442
452
  - spec/support/fixtures/canvas_responses/terms.json
453
+ - spec/support/fixtures/reports/assignment_groups.csv
443
454
  - spec/support/fixtures/reports/assignments.csv
444
455
  - spec/support/fixtures/reports/courses.csv
445
456
  - spec/support/fixtures/reports/enrollments.csv
@@ -474,13 +485,13 @@ signing_key:
474
485
  specification_version: 4
475
486
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
476
487
  test_files:
477
- - spec/canvas_sync/assignment_spec.rb
478
488
  - spec/canvas_sync/canvas_sync_spec.rb
479
489
  - spec/canvas_sync/jobs/job_spec.rb
480
490
  - spec/canvas_sync/jobs/report_checker_spec.rb
481
491
  - spec/canvas_sync/jobs/report_processor_job_spec.rb
482
492
  - spec/canvas_sync/jobs/report_starter_spec.rb
483
493
  - spec/canvas_sync/jobs/sync_admins_job_spec.rb
494
+ - spec/canvas_sync/jobs/sync_assignment_groups_job_spec.rb
484
495
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
485
496
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
486
497
  - spec/canvas_sync/jobs/sync_roles_job_spec.rb
@@ -488,21 +499,25 @@ test_files:
488
499
  - spec/canvas_sync/jobs/sync_terms_job_spec.rb
489
500
  - spec/canvas_sync/jobs/sync_users_job_spec.rb
490
501
  - spec/canvas_sync/models/admins_spec.rb
502
+ - spec/canvas_sync/models/assignment_group_spec.rb
503
+ - spec/canvas_sync/models/assignment_spec.rb
491
504
  - spec/canvas_sync/models/course_spec.rb
492
505
  - spec/canvas_sync/models/enrollment_spec.rb
493
506
  - spec/canvas_sync/models/roles_spec.rb
494
507
  - spec/canvas_sync/models/section_spec.rb
508
+ - spec/canvas_sync/models/submission_spec.rb
495
509
  - spec/canvas_sync/models/term_spec.rb
496
510
  - spec/canvas_sync/models/user_spec.rb
511
+ - spec/canvas_sync/processors/assignment_groups_processor_spec.rb
497
512
  - spec/canvas_sync/processors/assignments_processor_spec.rb
498
513
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
499
514
  - spec/canvas_sync/processors/submissions_processor_spec.rb
500
- - spec/canvas_sync/submission_spec.rb
501
515
  - spec/dummy/README.rdoc
502
516
  - spec/dummy/Rakefile
503
517
  - spec/dummy/app/models/admin.rb
504
518
  - spec/dummy/app/models/application_record.rb
505
519
  - spec/dummy/app/models/assignment.rb
520
+ - spec/dummy/app/models/assignment_group.rb
506
521
  - spec/dummy/app/models/course.rb
507
522
  - spec/dummy/app/models/enrollment.rb
508
523
  - spec/dummy/app/models/role.rb
@@ -530,14 +545,16 @@ test_files:
530
545
  - spec/dummy/db/migrate/20171107213207_create_sections.rb
531
546
  - spec/dummy/db/migrate/20180103162102_create_roles.rb
532
547
  - spec/dummy/db/migrate/20180109210452_create_admins.rb
533
- - spec/dummy/db/migrate/20180212204530_create_assignments.rb
534
548
  - spec/dummy/db/migrate/20180213235544_create_submissions.rb
549
+ - spec/dummy/db/migrate/20180215214227_create_assignments.rb
550
+ - spec/dummy/db/migrate/20180215220605_create_assignment_groups.rb
535
551
  - spec/dummy/db/schema.rb
536
552
  - spec/dummy/db/test.sqlite3
537
553
  - spec/dummy/log/development.log
538
554
  - spec/dummy/log/test.log
539
555
  - spec/factories/admin_factory.rb
540
556
  - spec/factories/assignment_factory.rb
557
+ - spec/factories/assignment_group_factory.rb
541
558
  - spec/factories/course_factory.rb
542
559
  - spec/factories/enrollment_factory.rb
543
560
  - spec/factories/role_factory.rb
@@ -550,6 +567,7 @@ test_files:
550
567
  - spec/support/fixtures/canvas_responses/admins.json
551
568
  - spec/support/fixtures/canvas_responses/roles.json
552
569
  - spec/support/fixtures/canvas_responses/terms.json
570
+ - spec/support/fixtures/reports/assignment_groups.csv
553
571
  - spec/support/fixtures/reports/assignments.csv
554
572
  - spec/support/fixtures/reports/courses.csv
555
573
  - spec/support/fixtures/reports/enrollments.csv