canvas_sync 0.23.1 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/canvas_sync/generators/templates/migrations/create_courses.rb +2 -0
- data/lib/canvas_sync/generators/templates/models/course.rb +3 -0
- data/lib/canvas_sync/processors/model_mappings.yml +3 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/dummy/app/models/course.rb +4 -0
- data/spec/dummy/db/migrate/20190702203621_create_courses.rb +2 -0
- data/spec/dummy/db/schema.rb +4 -3
- data/spec/support/fixtures/reports/courses.csv +3 -3
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495042b458760ac9d123e1fcfc73cad8c7c1640cba2c8cff673e34cb7d45edf2
|
4
|
+
data.tar.gz: 24f64b9a41657cd52c0ab6923144c41ac0d9ebc57d5c4e6463d1570441777eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e1a87705f451799f279e3ba9e5f283f5f1dc545b6a826a49576cbba80f3f09d5893725d8cfce1393e64597ddc7f061556102f777e9f282be3016d6e0301ed14
|
7
|
+
data.tar.gz: 2defa1a43da32a920a9cb499551de9ec366061f5fb26b2afeb79c17ed1507c68e47a083d28a87e2f9fda72608d09ffb7b6c72160fe144ba0cbe1594f25e8e495
|
@@ -34,7 +34,10 @@ class Course < ApplicationRecord
|
|
34
34
|
canvas_account_id: :account_id,
|
35
35
|
start_at: :start_at,
|
36
36
|
end_at: :end_at,
|
37
|
+
# If opting in the public_description, make sure to also add the 'include' array in the api call
|
38
|
+
# public_description: :public_description,
|
37
39
|
}, -> (api) { api.course(canvas_id) })
|
40
|
+
# }, -> (api) { api.course(canvas_id, { include: ['public_description'] }) })
|
38
41
|
|
39
42
|
scope :active, -> { where(workflow_state: 'active') }
|
40
43
|
|
data/lib/canvas_sync/version.rb
CHANGED
@@ -40,7 +40,11 @@ class Course < ApplicationRecord
|
|
40
40
|
canvas_account_id: :account_id,
|
41
41
|
start_at: :start_at,
|
42
42
|
end_at: :end_at,
|
43
|
+
# If opting in the public_description, make sure to also add the 'include' array in the api call
|
44
|
+
# public_description: :public_description,
|
43
45
|
}, -> (api) { api.course(canvas_id) })
|
46
|
+
# }, -> (api) { api.course(canvas_id, { include: ['public_description'] }) })
|
47
|
+
|
44
48
|
|
45
49
|
scope :active, -> { where(workflow_state: 'active') }
|
46
50
|
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema[7.1].define(version:
|
13
|
+
ActiveRecord::Schema[7.1].define(version: 2025_07_30_124426) do
|
14
14
|
# These are extensions that must be enabled in order to support this database
|
15
15
|
enable_extension "plpgsql"
|
16
16
|
|
@@ -214,6 +214,7 @@ ActiveRecord::Schema[7.1].define(version: 2025_06_26_194330) do
|
|
214
214
|
t.datetime "start_at", precision: nil
|
215
215
|
t.datetime "end_at", precision: nil
|
216
216
|
t.bigint "grading_standard_id"
|
217
|
+
t.string "public_description"
|
217
218
|
t.datetime "created_at", precision: nil, null: false
|
218
219
|
t.datetime "updated_at", precision: nil, null: false
|
219
220
|
t.index ["canvas_id"], name: "index_courses_on_canvas_id", unique: true
|
@@ -363,10 +364,10 @@ ActiveRecord::Schema[7.1].define(version: 2025_06_26_194330) do
|
|
363
364
|
end
|
364
365
|
|
365
366
|
create_table "roles", force: :cascade do |t|
|
366
|
-
t.
|
367
|
+
t.bigint "canvas_id", null: false
|
367
368
|
t.string "label"
|
368
369
|
t.string "base_role_type"
|
369
|
-
t.
|
370
|
+
t.bigint "canvas_account_id"
|
370
371
|
t.string "workflow_state"
|
371
372
|
t.json "permissions"
|
372
373
|
t.datetime "created_at", precision: nil, null: false
|
@@ -1,3 +1,3 @@
|
|
1
|
-
canvas_course_id,course_id,integration_id,short_name,long_name,canvas_account_id,account_id,canvas_term_id,term_id,status,start_date,end_date,course_format,created_by_sis
|
2
|
-
1,course_sis_id_1,,C1,Course #1,1,,1,term_sis_id_1,active,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE
|
3
|
-
2,course_sis_id_2,,C2,Course #2,1,,1,term_sis_id_2,unpublished,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE,5
|
1
|
+
canvas_course_id,course_id,integration_id,short_name,long_name,canvas_account_id,account_id,canvas_term_id,term_id,status,start_date,end_date,course_format,created_by_sis,public_description
|
2
|
+
1,course_sis_id_1,,C1,Course #1,1,,1,term_sis_id_1,active,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE,"Description 1"
|
3
|
+
2,course_sis_id_2,,C2,Course #2,1,,1,term_sis_id_2,unpublished,2017-03-27T15:53:18-06:00,2017-04-27T06:21:18-06:00,,FALSE,5,"Description 2"
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.23.
|
4
|
+
version: 0.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure CustomDev
|
8
|
+
autorequire:
|
8
9
|
bindir: bin
|
9
10
|
cert_chain: []
|
10
|
-
date:
|
11
|
+
date: 2025-08-13 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: rails
|
@@ -415,6 +416,7 @@ dependencies:
|
|
415
416
|
- - ">="
|
416
417
|
- !ruby/object:Gem::Version
|
417
418
|
version: '0'
|
419
|
+
description:
|
418
420
|
email:
|
419
421
|
- pseng@instructure.com
|
420
422
|
executables: []
|
@@ -870,6 +872,7 @@ files:
|
|
870
872
|
homepage: https://instructure.com
|
871
873
|
licenses: []
|
872
874
|
metadata: {}
|
875
|
+
post_install_message:
|
873
876
|
rdoc_options: []
|
874
877
|
require_paths:
|
875
878
|
- lib
|
@@ -884,7 +887,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
884
887
|
- !ruby/object:Gem::Version
|
885
888
|
version: '0'
|
886
889
|
requirements: []
|
887
|
-
rubygems_version: 3.
|
890
|
+
rubygems_version: 3.3.27
|
891
|
+
signing_key:
|
888
892
|
specification_version: 4
|
889
893
|
summary: Gem for generating Canvas models and migrations and syncing data from Canvas
|
890
894
|
test_files:
|
@@ -1002,7 +1006,6 @@ test_files:
|
|
1002
1006
|
- spec/dummy/app/services/live_events/user_event.rb
|
1003
1007
|
- spec/dummy/app/services/live_events/user_updated_event.rb
|
1004
1008
|
- spec/dummy/bin/rails
|
1005
|
-
- spec/dummy/config.ru
|
1006
1009
|
- spec/dummy/config/application.rb
|
1007
1010
|
- spec/dummy/config/boot.rb
|
1008
1011
|
- spec/dummy/config/database.yml
|
@@ -1014,6 +1017,7 @@ test_files:
|
|
1014
1017
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
1015
1018
|
- spec/dummy/config/routes.rb
|
1016
1019
|
- spec/dummy/config/secrets.yml
|
1020
|
+
- spec/dummy/config.ru
|
1017
1021
|
- spec/dummy/db/migrate/20190702203621_create_courses.rb
|
1018
1022
|
- spec/dummy/db/migrate/20190702203622_create_accounts.rb
|
1019
1023
|
- spec/dummy/db/migrate/20190702203623_create_terms.rb
|