canvas_sync 0.3.13 → 0.3.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +4 -1
  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/course.rb +1 -0
  6. data/lib/canvas_sync/generators/templates/models/create_submissions.rb +23 -0
  7. data/lib/canvas_sync/generators/templates/models/submission.rb +8 -0
  8. data/lib/canvas_sync/generators/templates/models/user.rb +1 -0
  9. data/lib/canvas_sync/jobs/sync_submissions_job.rb +28 -0
  10. data/lib/canvas_sync/processors/model_mappings.yml +28 -0
  11. data/lib/canvas_sync/processors/submissions_processor.rb +24 -0
  12. data/lib/canvas_sync/version.rb +1 -1
  13. data/spec/canvas_sync/{models/assignments_spec.rb → assignment_spec.rb} +6 -0
  14. data/spec/canvas_sync/canvas_sync_spec.rb +15 -0
  15. data/spec/canvas_sync/jobs/sync_submissions_job_spec.rb +17 -0
  16. data/spec/canvas_sync/models/course_spec.rb +5 -0
  17. data/spec/canvas_sync/models/user_spec.rb +6 -0
  18. data/spec/canvas_sync/processors/submissions_processor_spec.rb +13 -0
  19. data/spec/canvas_sync/submission_spec.rb +31 -0
  20. data/spec/dummy/app/models/assignment.rb +1 -0
  21. data/spec/dummy/app/models/course.rb +1 -0
  22. data/spec/dummy/app/models/submission.rb +14 -0
  23. data/spec/dummy/app/models/user.rb +1 -0
  24. data/spec/dummy/db/migrate/20180213235544_create_submissions.rb +29 -0
  25. data/spec/dummy/db/schema.rb +18 -1
  26. data/spec/dummy/db/test.sqlite3 +0 -0
  27. data/spec/dummy/log/development.log +389 -822
  28. data/spec/dummy/log/test.log +29886 -13563
  29. data/spec/factories/submission_factory.rb +9 -0
  30. data/spec/support/fixtures/reports/submissions.csv +3 -0
  31. metadata +23 -7
  32. data/spec/dummy/db/development.sqlite3 +0 -0
@@ -0,0 +1,9 @@
1
+ FactoryGirl.define do
2
+ factory :submission do
3
+ sequence(:canvas_submission_id) { |n| n }
4
+ submitted_at { 1.week.ago }
5
+ graded_at { 1.day.ago }
6
+ score { 5 }
7
+ points_possible { 10 }
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ "canvas user id","sis user id","user name","canvas course id","sis course id","course name","assignment id","assignment name","submission date","graded date","score","points possible","submission id"
2
+ 1,1,userName,1,1,courseName,1,assignmentName,2017-09-21 18:28:15 UTC,2017-09-21 19:36:23 UTC,5,10,1
3
+ 1,1,userName,1,1,courseName,2,assignment2Name,2017-09-21 18:28:15 UTC,2017-09-21 19:36:23 UTC,5,10,2
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.13
4
+ version: 0.3.14
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-12 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -316,11 +316,13 @@ files:
316
316
  - lib/canvas_sync/generators/templates/models/create_enrollments.rb
317
317
  - lib/canvas_sync/generators/templates/models/create_roles.rb
318
318
  - lib/canvas_sync/generators/templates/models/create_sections.rb
319
+ - lib/canvas_sync/generators/templates/models/create_submissions.rb
319
320
  - lib/canvas_sync/generators/templates/models/create_terms.rb
320
321
  - lib/canvas_sync/generators/templates/models/create_users.rb
321
322
  - lib/canvas_sync/generators/templates/models/enrollment.rb
322
323
  - lib/canvas_sync/generators/templates/models/role.rb
323
324
  - lib/canvas_sync/generators/templates/models/section.rb
325
+ - lib/canvas_sync/generators/templates/models/submission.rb
324
326
  - lib/canvas_sync/generators/templates/models/term.rb
325
327
  - lib/canvas_sync/generators/templates/models/user.rb
326
328
  - lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_created_event.rb
@@ -353,13 +355,16 @@ files:
353
355
  - lib/canvas_sync/jobs/sync_assignments_job.rb
354
356
  - lib/canvas_sync/jobs/sync_provisioning_report_job.rb
355
357
  - lib/canvas_sync/jobs/sync_roles_job.rb
358
+ - lib/canvas_sync/jobs/sync_submissions_job.rb
356
359
  - lib/canvas_sync/jobs/sync_terms_job.rb
357
360
  - lib/canvas_sync/jobs/sync_users_job.rb
358
361
  - lib/canvas_sync/processors/assignments_processor.rb
359
362
  - lib/canvas_sync/processors/model_mappings.yml
360
363
  - lib/canvas_sync/processors/provisioning_report_processor.rb
361
364
  - lib/canvas_sync/processors/report_processor.rb
365
+ - lib/canvas_sync/processors/submissions_processor.rb
362
366
  - lib/canvas_sync/version.rb
367
+ - spec/canvas_sync/assignment_spec.rb
363
368
  - spec/canvas_sync/canvas_sync_spec.rb
364
369
  - spec/canvas_sync/jobs/job_spec.rb
365
370
  - spec/canvas_sync/jobs/report_checker_spec.rb
@@ -369,10 +374,10 @@ files:
369
374
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
370
375
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
371
376
  - spec/canvas_sync/jobs/sync_roles_job_spec.rb
377
+ - spec/canvas_sync/jobs/sync_submissions_job_spec.rb
372
378
  - spec/canvas_sync/jobs/sync_terms_job_spec.rb
373
379
  - spec/canvas_sync/jobs/sync_users_job_spec.rb
374
380
  - spec/canvas_sync/models/admins_spec.rb
375
- - spec/canvas_sync/models/assignments_spec.rb
376
381
  - spec/canvas_sync/models/course_spec.rb
377
382
  - spec/canvas_sync/models/enrollment_spec.rb
378
383
  - spec/canvas_sync/models/roles_spec.rb
@@ -381,6 +386,8 @@ files:
381
386
  - spec/canvas_sync/models/user_spec.rb
382
387
  - spec/canvas_sync/processors/assignments_processor_spec.rb
383
388
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
389
+ - spec/canvas_sync/processors/submissions_processor_spec.rb
390
+ - spec/canvas_sync/submission_spec.rb
384
391
  - spec/dummy/README.rdoc
385
392
  - spec/dummy/Rakefile
386
393
  - spec/dummy/app/models/admin.rb
@@ -390,6 +397,7 @@ files:
390
397
  - spec/dummy/app/models/enrollment.rb
391
398
  - spec/dummy/app/models/role.rb
392
399
  - spec/dummy/app/models/section.rb
400
+ - spec/dummy/app/models/submission.rb
393
401
  - spec/dummy/app/models/term.rb
394
402
  - spec/dummy/app/models/user.rb
395
403
  - spec/dummy/bin/rails
@@ -405,7 +413,6 @@ files:
405
413
  - spec/dummy/config/initializers/wrap_parameters.rb
406
414
  - spec/dummy/config/routes.rb
407
415
  - spec/dummy/config/secrets.yml
408
- - spec/dummy/db/development.sqlite3
409
416
  - spec/dummy/db/migrate/20170905192509_create_enrollments.rb
410
417
  - spec/dummy/db/migrate/20170906193506_create_terms.rb
411
418
  - spec/dummy/db/migrate/20170914181345_create_courses.rb
@@ -414,6 +421,7 @@ files:
414
421
  - spec/dummy/db/migrate/20180103162102_create_roles.rb
415
422
  - spec/dummy/db/migrate/20180109210452_create_admins.rb
416
423
  - spec/dummy/db/migrate/20180212204530_create_assignments.rb
424
+ - spec/dummy/db/migrate/20180213235544_create_submissions.rb
417
425
  - spec/dummy/db/schema.rb
418
426
  - spec/dummy/db/test.sqlite3
419
427
  - spec/dummy/log/development.log
@@ -424,6 +432,7 @@ files:
424
432
  - spec/factories/enrollment_factory.rb
425
433
  - spec/factories/role_factory.rb
426
434
  - spec/factories/section_factory.rb
435
+ - spec/factories/submission_factory.rb
427
436
  - spec/factories/term_factory.rb
428
437
  - spec/factories/user_factory.rb
429
438
  - spec/spec_helper.rb
@@ -438,6 +447,7 @@ files:
438
447
  - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
439
448
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
440
449
  - spec/support/fixtures/reports/sections.csv
450
+ - spec/support/fixtures/reports/submissions.csv
441
451
  - spec/support/fixtures/reports/users.csv
442
452
  - spec/support/fixtures/reports/xlist.csv
443
453
  homepage: https://instructure.com
@@ -459,11 +469,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
459
469
  version: '0'
460
470
  requirements: []
461
471
  rubyforge_project:
462
- rubygems_version: 2.7.3
472
+ rubygems_version: 2.6.12
463
473
  signing_key:
464
474
  specification_version: 4
465
475
  summary: Gem for generating Canvas models and migrations and syncing data from Canvas
466
476
  test_files:
477
+ - spec/canvas_sync/assignment_spec.rb
467
478
  - spec/canvas_sync/canvas_sync_spec.rb
468
479
  - spec/canvas_sync/jobs/job_spec.rb
469
480
  - spec/canvas_sync/jobs/report_checker_spec.rb
@@ -473,10 +484,10 @@ test_files:
473
484
  - spec/canvas_sync/jobs/sync_assignments_job_spec.rb
474
485
  - spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb
475
486
  - spec/canvas_sync/jobs/sync_roles_job_spec.rb
487
+ - spec/canvas_sync/jobs/sync_submissions_job_spec.rb
476
488
  - spec/canvas_sync/jobs/sync_terms_job_spec.rb
477
489
  - spec/canvas_sync/jobs/sync_users_job_spec.rb
478
490
  - spec/canvas_sync/models/admins_spec.rb
479
- - spec/canvas_sync/models/assignments_spec.rb
480
491
  - spec/canvas_sync/models/course_spec.rb
481
492
  - spec/canvas_sync/models/enrollment_spec.rb
482
493
  - spec/canvas_sync/models/roles_spec.rb
@@ -485,6 +496,8 @@ test_files:
485
496
  - spec/canvas_sync/models/user_spec.rb
486
497
  - spec/canvas_sync/processors/assignments_processor_spec.rb
487
498
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
499
+ - spec/canvas_sync/processors/submissions_processor_spec.rb
500
+ - spec/canvas_sync/submission_spec.rb
488
501
  - spec/dummy/README.rdoc
489
502
  - spec/dummy/Rakefile
490
503
  - spec/dummy/app/models/admin.rb
@@ -494,6 +507,7 @@ test_files:
494
507
  - spec/dummy/app/models/enrollment.rb
495
508
  - spec/dummy/app/models/role.rb
496
509
  - spec/dummy/app/models/section.rb
510
+ - spec/dummy/app/models/submission.rb
497
511
  - spec/dummy/app/models/term.rb
498
512
  - spec/dummy/app/models/user.rb
499
513
  - spec/dummy/bin/rails
@@ -509,7 +523,6 @@ test_files:
509
523
  - spec/dummy/config/initializers/wrap_parameters.rb
510
524
  - spec/dummy/config/routes.rb
511
525
  - spec/dummy/config/secrets.yml
512
- - spec/dummy/db/development.sqlite3
513
526
  - spec/dummy/db/migrate/20170905192509_create_enrollments.rb
514
527
  - spec/dummy/db/migrate/20170906193506_create_terms.rb
515
528
  - spec/dummy/db/migrate/20170914181345_create_courses.rb
@@ -518,6 +531,7 @@ test_files:
518
531
  - spec/dummy/db/migrate/20180103162102_create_roles.rb
519
532
  - spec/dummy/db/migrate/20180109210452_create_admins.rb
520
533
  - spec/dummy/db/migrate/20180212204530_create_assignments.rb
534
+ - spec/dummy/db/migrate/20180213235544_create_submissions.rb
521
535
  - spec/dummy/db/schema.rb
522
536
  - spec/dummy/db/test.sqlite3
523
537
  - spec/dummy/log/development.log
@@ -528,6 +542,7 @@ test_files:
528
542
  - spec/factories/enrollment_factory.rb
529
543
  - spec/factories/role_factory.rb
530
544
  - spec/factories/section_factory.rb
545
+ - spec/factories/submission_factory.rb
531
546
  - spec/factories/term_factory.rb
532
547
  - spec/factories/user_factory.rb
533
548
  - spec/spec_helper.rb
@@ -542,5 +557,6 @@ test_files:
542
557
  - spec/support/fixtures/reports/provisioning_csv_unzipped/courses.csv
543
558
  - spec/support/fixtures/reports/provisioning_csv_unzipped/users.csv
544
559
  - spec/support/fixtures/reports/sections.csv
560
+ - spec/support/fixtures/reports/submissions.csv
545
561
  - spec/support/fixtures/reports/users.csv
546
562
  - spec/support/fixtures/reports/xlist.csv