canvas_sync 0.22.5 → 0.22.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6fbc16dd889dae43881098a80d91c68ec64412b1ce872b51f176f89a0d2ce8fe
4
- data.tar.gz: f202ff4cae0337f6a34872654b55371b5fdfabdccd1358fc7fceb14397549425
3
+ metadata.gz: 61d4f6b7e0c7f8201ee2dccdeea7e9f3149f112d35ea4ab72903ddbee892c079
4
+ data.tar.gz: 72a6a5553aa892680ee6ce2dacba9ce98d200cc44bd17a40dc5648b028b63868
5
5
  SHA512:
6
- metadata.gz: 35c21c3717c63c372fd840b511b2b51161f1114b4e9f8a8140d38ee0d4ca6393950d842b9619ded9731ae32b0abda8ef147ceaacba76f8bcc77d5b6966898b9f
7
- data.tar.gz: a1b9a4f2129f9f441786237ed2bc69ff58009343d67d74f5724376f2fc77c0797fd3f932ea404d6b993d26ba210beeeafc1a9b0ad1025ad11169ebf7767f84af
6
+ metadata.gz: 5eb771935ecaa392a2fd6442136cadbe7972912381de6028c145de4e45419904de56a694a636dde1cabcbfda67fbeedfdcecd38993031194dab85f75ed529b98
7
+ data.tar.gz: fd8a0c64457a2190783527dcbfff67d34ec17f6f9249b1e0f4147a0e3ef8d5b9ae66ad4e132982b341ace536db78f39b95dbd5c7447f6099d765b83c8ef897ce
data/README.md CHANGED
File without changes
@@ -3,6 +3,7 @@
3
3
  # CourseProgress is not a Canvas model. It is a table built from the Custom Report
4
4
  class CourseProgress < ApplicationRecord
5
5
  include CanvasSync::Record
6
+ include CanvasSync::Concerns::ApiSyncable
6
7
 
7
8
  canvas_sync_features :defaults
8
9
 
@@ -11,4 +12,11 @@ class CourseProgress < ApplicationRecord
11
12
 
12
13
  validates_presence_of :canvas_user_id, :canvas_course_id
13
14
  validates_uniqueness_of :canvas_user_id, scope: :canvas_course_id
15
+
16
+ api_syncable({
17
+ requirement_count: :requirement_count,
18
+ requirement_completed_count: :requirement_completed_count,
19
+ # provisioning report has completion_date instead of completed_at in the API
20
+ completion_date: :completed_at
21
+ }, -> (api) { api.course_progress(canvas_course_id, canvas_user_id) })
14
22
  end
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module CanvasSync
2
- VERSION = "0.22.5".freeze
2
+ VERSION = "0.22.6".freeze
3
3
  end
File without changes
@@ -9,6 +9,7 @@
9
9
  # CourseProgress is not a Canvas model. It is a table built from the Custom Report
10
10
  class CourseProgress < ApplicationRecord
11
11
  include CanvasSync::Record
12
+ include CanvasSync::Concerns::ApiSyncable
12
13
 
13
14
  canvas_sync_features :defaults
14
15
 
@@ -17,4 +18,11 @@ class CourseProgress < ApplicationRecord
17
18
 
18
19
  validates_presence_of :canvas_user_id, :canvas_course_id
19
20
  validates_uniqueness_of :canvas_user_id, scope: :canvas_course_id
21
+
22
+ api_syncable({
23
+ requirement_count: :requirement_count,
24
+ requirement_completed_count: :requirement_completed_count,
25
+ # provisioning report has completion_date instead of completed_at in the API
26
+ completion_date: :completed_at
27
+ }, -> (api) { api.course_progress(canvas_course_id, canvas_user_id) })
20
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canvas_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.5
4
+ version: 0.22.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure CustomDev
@@ -366,14 +366,14 @@ dependencies:
366
366
  requirements:
367
367
  - - ">="
368
368
  - !ruby/object:Gem::Version
369
- version: 1.5.8
369
+ version: 1.5.34
370
370
  type: :runtime
371
371
  prerelease: false
372
372
  version_requirements: !ruby/object:Gem::Requirement
373
373
  requirements:
374
374
  - - ">="
375
375
  - !ruby/object:Gem::Version
376
- version: 1.5.8
376
+ version: 1.5.34
377
377
  - !ruby/object:Gem::Dependency
378
378
  name: activerecord-import
379
379
  requirement: !ruby/object:Gem::Requirement