canvas_sync 0.3.23 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +2 -0
  3. data/lib/canvas_sync.rb +11 -1
  4. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_created_event.rb +5 -4
  5. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_event.rb +40 -49
  6. data/lib/canvas_sync/generators/templates/services/live_events/assignment/assignment_updated_event.rb +5 -3
  7. data/lib/canvas_sync/generators/templates/services/live_events/base_event.rb +12 -19
  8. data/lib/canvas_sync/generators/templates/services/live_events/course/course_created_event.rb +5 -3
  9. data/lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb +32 -38
  10. data/lib/canvas_sync/generators/templates/services/live_events/course/course_updated_event.rb +5 -3
  11. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_created_event.rb +5 -3
  12. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_event.rb +53 -56
  13. data/lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_updated_event.rb +5 -3
  14. data/lib/canvas_sync/generators/templates/services/live_events/grade/grade_changed_event.rb +5 -3
  15. data/lib/canvas_sync/generators/templates/services/live_events/grade/grade_event.rb +47 -48
  16. data/lib/canvas_sync/generators/templates/services/live_events/module/module_created_event.rb +6 -0
  17. data/lib/canvas_sync/generators/templates/services/live_events/module/module_event.rb +39 -0
  18. data/lib/canvas_sync/generators/templates/services/live_events/module/module_updated_event.rb +6 -0
  19. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_created_event.rb +5 -3
  20. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_event.rb +40 -45
  21. data/lib/canvas_sync/generators/templates/services/live_events/submission/submission_updated_event.rb +5 -3
  22. data/lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_event.rb +29 -30
  23. data/lib/canvas_sync/generators/templates/services/live_events/syllabus/syllabus_updated_event.rb +4 -2
  24. data/lib/canvas_sync/generators/templates/services/live_events/user/user_created_event.rb +5 -3
  25. data/lib/canvas_sync/generators/templates/services/live_events/user/user_event.rb +5 -8
  26. data/lib/canvas_sync/generators/templates/services/live_events/user/user_updated_event.rb +5 -3
  27. data/lib/canvas_sync/version.rb +1 -1
  28. data/spec/canvas_sync/services/module_event_spec.rb +42 -0
  29. data/spec/dummy/app/services/live_events/assignment_created_event.rb +12 -0
  30. data/spec/dummy/app/services/live_events/assignment_event.rb +60 -0
  31. data/spec/dummy/app/services/live_events/assignment_updated_event.rb +12 -0
  32. data/spec/dummy/app/services/live_events/base_event.rb +22 -0
  33. data/spec/dummy/app/services/live_events/course_created_event.rb +12 -0
  34. data/spec/dummy/app/services/live_events/course_event.rb +42 -0
  35. data/spec/dummy/app/services/live_events/course_updated_event.rb +12 -0
  36. data/spec/dummy/app/services/live_events/enrollment_created_event.rb +12 -0
  37. data/spec/dummy/app/services/live_events/enrollment_event.rb +61 -0
  38. data/spec/dummy/app/services/live_events/enrollment_updated_event.rb +12 -0
  39. data/spec/dummy/app/services/live_events/grade_changed_event.rb +12 -0
  40. data/spec/dummy/app/services/live_events/grade_event.rb +61 -0
  41. data/spec/dummy/app/services/live_events/module_created_event.rb +12 -0
  42. data/spec/dummy/app/services/live_events/module_event.rb +45 -0
  43. data/spec/dummy/app/services/live_events/module_updated_event.rb +12 -0
  44. data/spec/dummy/app/services/live_events/submission_created_event.rb +12 -0
  45. data/spec/dummy/app/services/live_events/submission_event.rb +58 -0
  46. data/spec/dummy/app/services/live_events/submission_updated_event.rb +12 -0
  47. data/spec/dummy/app/services/live_events/syllabus_event.rb +40 -0
  48. data/spec/dummy/app/services/live_events/syllabus_updated_event.rb +12 -0
  49. data/spec/dummy/app/services/live_events/user_created_event.rb +12 -0
  50. data/spec/dummy/app/services/live_events/user_event.rb +38 -0
  51. data/spec/dummy/app/services/live_events/user_updated_event.rb +12 -0
  52. data/spec/dummy/log/development.log +666 -0
  53. data/spec/dummy/log/test.log +3758 -0
  54. data/spec/support/fake_canvas.rb +4 -0
  55. data/spec/support/fixtures/canvas_responses/module.json +12 -0
  56. metadata +57 -4
@@ -20,6 +20,10 @@ class FakeCanvas < Sinatra::Base
20
20
  json_response 200, 'terms.json'
21
21
  end
22
22
 
23
+ get '/api/v1/courses/1/modules/1' do
24
+ json_response 200, 'module.json'
25
+ end
26
+
23
27
  private
24
28
 
25
29
  def json_response(response_code, file_name)
@@ -0,0 +1,12 @@
1
+ {
2
+ "id":1,
3
+ "name":"Module 2",
4
+ "position":1337,
5
+ "unlock_at":null,
6
+ "require_sequential_progress":false,
7
+ "publish_final_grade":false,
8
+ "prerequisite_module_ids":[],
9
+ "published":true,
10
+ "items_count":3,
11
+ "items_url":"http://localhost:3000/api/v1/courses/784/modules/20/items"
12
+ }
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.23
4
+ version: 0.4.0
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-04-12 00:00:00.000000000 Z
11
+ date: 2018-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - ">="
256
256
  - !ruby/object:Gem::Version
257
- version: '0'
257
+ version: 1.3.22
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - ">="
263
263
  - !ruby/object:Gem::Version
264
- version: '0'
264
+ version: 1.3.22
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: activerecord-import
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -345,6 +345,9 @@ files:
345
345
  - lib/canvas_sync/generators/templates/services/live_events/enrollment/enrollment_updated_event.rb
346
346
  - lib/canvas_sync/generators/templates/services/live_events/grade/grade_changed_event.rb
347
347
  - lib/canvas_sync/generators/templates/services/live_events/grade/grade_event.rb
348
+ - lib/canvas_sync/generators/templates/services/live_events/module/module_created_event.rb
349
+ - lib/canvas_sync/generators/templates/services/live_events/module/module_event.rb
350
+ - lib/canvas_sync/generators/templates/services/live_events/module/module_updated_event.rb
348
351
  - lib/canvas_sync/generators/templates/services/live_events/submission/submission_created_event.rb
349
352
  - lib/canvas_sync/generators/templates/services/live_events/submission/submission_event.rb
350
353
  - lib/canvas_sync/generators/templates/services/live_events/submission/submission_updated_event.rb
@@ -412,6 +415,7 @@ files:
412
415
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
413
416
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
414
417
  - spec/canvas_sync/processors/submissions_processor_spec.rb
418
+ - spec/canvas_sync/services/module_event_spec.rb
415
419
  - spec/dummy/README.rdoc
416
420
  - spec/dummy/Rakefile
417
421
  - spec/dummy/app/models/account.rb
@@ -428,6 +432,29 @@ files:
428
432
  - spec/dummy/app/models/submission.rb
429
433
  - spec/dummy/app/models/term.rb
430
434
  - spec/dummy/app/models/user.rb
435
+ - spec/dummy/app/services/live_events/assignment_created_event.rb
436
+ - spec/dummy/app/services/live_events/assignment_event.rb
437
+ - spec/dummy/app/services/live_events/assignment_updated_event.rb
438
+ - spec/dummy/app/services/live_events/base_event.rb
439
+ - spec/dummy/app/services/live_events/course_created_event.rb
440
+ - spec/dummy/app/services/live_events/course_event.rb
441
+ - spec/dummy/app/services/live_events/course_updated_event.rb
442
+ - spec/dummy/app/services/live_events/enrollment_created_event.rb
443
+ - spec/dummy/app/services/live_events/enrollment_event.rb
444
+ - spec/dummy/app/services/live_events/enrollment_updated_event.rb
445
+ - spec/dummy/app/services/live_events/grade_changed_event.rb
446
+ - spec/dummy/app/services/live_events/grade_event.rb
447
+ - spec/dummy/app/services/live_events/module_created_event.rb
448
+ - spec/dummy/app/services/live_events/module_event.rb
449
+ - spec/dummy/app/services/live_events/module_updated_event.rb
450
+ - spec/dummy/app/services/live_events/submission_created_event.rb
451
+ - spec/dummy/app/services/live_events/submission_event.rb
452
+ - spec/dummy/app/services/live_events/submission_updated_event.rb
453
+ - spec/dummy/app/services/live_events/syllabus_event.rb
454
+ - spec/dummy/app/services/live_events/syllabus_updated_event.rb
455
+ - spec/dummy/app/services/live_events/user_created_event.rb
456
+ - spec/dummy/app/services/live_events/user_event.rb
457
+ - spec/dummy/app/services/live_events/user_updated_event.rb
431
458
  - spec/dummy/bin/rails
432
459
  - spec/dummy/config.ru
433
460
  - spec/dummy/config/application.rb
@@ -475,6 +502,7 @@ files:
475
502
  - spec/spec_helper.rb
476
503
  - spec/support/fake_canvas.rb
477
504
  - spec/support/fixtures/canvas_responses/admins.json
505
+ - spec/support/fixtures/canvas_responses/module.json
478
506
  - spec/support/fixtures/canvas_responses/roles.json
479
507
  - spec/support/fixtures/canvas_responses/terms.json
480
508
  - spec/support/fixtures/reports/assignment_groups.csv
@@ -548,6 +576,7 @@ test_files:
548
576
  - spec/canvas_sync/processors/context_modules_processor_spec.rb
549
577
  - spec/canvas_sync/processors/provisioning_report_processor_spec.rb
550
578
  - spec/canvas_sync/processors/submissions_processor_spec.rb
579
+ - spec/canvas_sync/services/module_event_spec.rb
551
580
  - spec/dummy/README.rdoc
552
581
  - spec/dummy/Rakefile
553
582
  - spec/dummy/app/models/account.rb
@@ -564,6 +593,29 @@ test_files:
564
593
  - spec/dummy/app/models/submission.rb
565
594
  - spec/dummy/app/models/term.rb
566
595
  - spec/dummy/app/models/user.rb
596
+ - spec/dummy/app/services/live_events/assignment_created_event.rb
597
+ - spec/dummy/app/services/live_events/assignment_event.rb
598
+ - spec/dummy/app/services/live_events/assignment_updated_event.rb
599
+ - spec/dummy/app/services/live_events/base_event.rb
600
+ - spec/dummy/app/services/live_events/course_created_event.rb
601
+ - spec/dummy/app/services/live_events/course_event.rb
602
+ - spec/dummy/app/services/live_events/course_updated_event.rb
603
+ - spec/dummy/app/services/live_events/enrollment_created_event.rb
604
+ - spec/dummy/app/services/live_events/enrollment_event.rb
605
+ - spec/dummy/app/services/live_events/enrollment_updated_event.rb
606
+ - spec/dummy/app/services/live_events/grade_changed_event.rb
607
+ - spec/dummy/app/services/live_events/grade_event.rb
608
+ - spec/dummy/app/services/live_events/module_created_event.rb
609
+ - spec/dummy/app/services/live_events/module_event.rb
610
+ - spec/dummy/app/services/live_events/module_updated_event.rb
611
+ - spec/dummy/app/services/live_events/submission_created_event.rb
612
+ - spec/dummy/app/services/live_events/submission_event.rb
613
+ - spec/dummy/app/services/live_events/submission_updated_event.rb
614
+ - spec/dummy/app/services/live_events/syllabus_event.rb
615
+ - spec/dummy/app/services/live_events/syllabus_updated_event.rb
616
+ - spec/dummy/app/services/live_events/user_created_event.rb
617
+ - spec/dummy/app/services/live_events/user_event.rb
618
+ - spec/dummy/app/services/live_events/user_updated_event.rb
567
619
  - spec/dummy/bin/rails
568
620
  - spec/dummy/config.ru
569
621
  - spec/dummy/config/application.rb
@@ -611,6 +663,7 @@ test_files:
611
663
  - spec/spec_helper.rb
612
664
  - spec/support/fake_canvas.rb
613
665
  - spec/support/fixtures/canvas_responses/admins.json
666
+ - spec/support/fixtures/canvas_responses/module.json
614
667
  - spec/support/fixtures/canvas_responses/roles.json
615
668
  - spec/support/fixtures/canvas_responses/terms.json
616
669
  - spec/support/fixtures/reports/assignment_groups.csv