canvas_sync 0.17.0.beta11 → 0.17.0.beta12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb +5 -0
- data/lib/canvas_sync.rb +14 -2
- data/lib/canvas_sync/importers/bulk_importer.rb +2 -2
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +37 -1
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/canvas_sync/jobs/sync_provisioning_report_job_spec.rb +5 -7
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/log/development.log +157 -0
- data/spec/dummy/log/test.log +7700 -0
- metadata +3 -3
- 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.beta12
|
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-10-
|
11
|
+
date: 2020-10-30 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
|
@@ -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
|