canvas_sync 0.17.0.beta11 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb +7 -0
- data/lib/canvas_sync.rb +40 -7
- data/lib/canvas_sync/importers/bulk_importer.rb +9 -6
- data/lib/canvas_sync/job_batches/chain_builder.rb +22 -2
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +51 -3
- data/lib/canvas_sync/jobs/report_starter.rb +1 -0
- data/lib/canvas_sync/processors/assignment_groups_processor.rb +3 -2
- data/lib/canvas_sync/processors/assignments_processor.rb +3 -2
- data/lib/canvas_sync/processors/context_module_items_processor.rb +3 -2
- data/lib/canvas_sync/processors/context_modules_processor.rb +3 -2
- data/lib/canvas_sync/processors/normal_processor.rb +2 -1
- data/lib/canvas_sync/processors/provisioning_report_processor.rb +10 -2
- data/lib/canvas_sync/processors/submissions_processor.rb +3 -2
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/canvas_sync/canvas_sync_spec.rb +10 -10
- data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +5 -7
- data/spec/dummy/db/schema.rb +4 -1
- data/spec/dummy/log/development.log +474 -0
- data/spec/dummy/log/test.log +14962 -0
- metadata +5 -5
- data/lib/canvas_sync/concerns/role/launch_querying.rb +0 -42
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.17.0
|
4
|
+
version: 0.17.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: 2020-
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -364,13 +364,13 @@ files:
|
|
364
364
|
- db/migrate/20180725155729_add_job_id_to_canvas_sync_job_logs.rb
|
365
365
|
- db/migrate/20190916154829_add_fork_count_to_canvas_sync_job_logs.rb
|
366
366
|
- db/migrate/20201018210836_create_canvas_sync_sync_batches.rb
|
367
|
+
- db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb
|
367
368
|
- lib/canvas_sync.rb
|
368
369
|
- lib/canvas_sync/api_syncable.rb
|
369
370
|
- lib/canvas_sync/class_callback_executor.rb
|
370
371
|
- lib/canvas_sync/concerns/account/ancestry.rb
|
371
372
|
- lib/canvas_sync/concerns/api_syncable.rb
|
372
373
|
- lib/canvas_sync/concerns/legacy_columns.rb
|
373
|
-
- lib/canvas_sync/concerns/role/launch_querying.rb
|
374
374
|
- lib/canvas_sync/config.rb
|
375
375
|
- lib/canvas_sync/engine.rb
|
376
376
|
- lib/canvas_sync/generators/install_generator.rb
|
@@ -643,9 +643,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
643
643
|
version: '0'
|
644
644
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
645
645
|
requirements:
|
646
|
-
- - "
|
646
|
+
- - ">="
|
647
647
|
- !ruby/object:Gem::Version
|
648
|
-
version:
|
648
|
+
version: '0'
|
649
649
|
requirements: []
|
650
650
|
rubygems_version: 3.0.3
|
651
651
|
signing_key:
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module CanvasSync::Concerns
|
2
|
-
module Account
|
3
|
-
# Add some basic methods for querying for Roles and Permissions
|
4
|
-
# based on the LTI Launch parameters
|
5
|
-
module LaunchQuerying
|
6
|
-
extend ActiveSupport::Concern
|
7
|
-
|
8
|
-
included do
|
9
|
-
scope :built_in, -> { where(workflow_state: 'built_in') }
|
10
|
-
|
11
|
-
# Find Role(s) with the given label(s)
|
12
|
-
scope :with_label, ->(labels) {
|
13
|
-
labels = labels.split(',') if labels.is_a?(String)
|
14
|
-
|
15
|
-
built_in_labels = []
|
16
|
-
custom_labels = []
|
17
|
-
Array(labels).each do |l|
|
18
|
-
|
19
|
-
end
|
20
|
-
custom_labels = Array(labels).reject do |l|
|
21
|
-
if role_is_default?(l)
|
22
|
-
built_ins << l
|
23
|
-
elsif l == 'Account Admin'
|
24
|
-
built_ins << 'AccountMembership'
|
25
|
-
else
|
26
|
-
next
|
27
|
-
end
|
28
|
-
true
|
29
|
-
end
|
30
|
-
where(workflow_state: 'built_in', base_role_type: built_ins)
|
31
|
-
.or(where.not(workflow_state: 'built_in').where(label: custom_labels))
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
|
-
class_methods do
|
36
|
-
def all_permissions(labels)
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|