canvas_sync 0.17.41 → 0.17.42
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6637b97dd9b51f6d3babe9b022904d9e77b1c886e62707fb857db5caba909fc3
|
4
|
+
data.tar.gz: 1bfa80e171b9b92b12ebad2fdc732b558e59fe9271175ce7d1dd2680a81e2b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0af624f526294b480e6b24814ab9156f3970056160eb59e0aafdd9af2849984ef34668099cce16f978257b6311c5fbfe69e2fe9e0bfd52224034c7e8018afbfc
|
7
|
+
data.tar.gz: 2d2d89dc832f3cb4d901641f00c930f929ca410f86b2890689909f43fea3fb29d56584fa72c5871382101d946ff7d50fde3d044375ae03d1b8de230bba13788b
|
data/lib/canvas_sync/engine.rb
CHANGED
@@ -8,6 +8,7 @@ module CanvasSync
|
|
8
8
|
initializer "canvas_sync.safe_yaml_classes" do |app|
|
9
9
|
app.config.active_record.yaml_column_permitted_classes ||= []
|
10
10
|
app.config.active_record.yaml_column_permitted_classes |= [Symbol, ActiveSupport::HashWithIndifferentAccess]
|
11
|
+
ActiveRecord::Base.yaml_column_permitted_classes |= app.config.active_record.yaml_column_permitted_classes
|
11
12
|
rescue
|
12
13
|
end
|
13
14
|
|
@@ -40,12 +41,14 @@ module CanvasSync
|
|
40
41
|
|
41
42
|
require 'panda_pal'
|
42
43
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
class ::Object
|
45
|
+
def canvas_sync_client(account_id = nil)
|
46
|
+
Bearcat::Client.new(
|
47
|
+
prefix: current_organization.canvas_url,
|
48
|
+
token: current_organization.canvas_api_token,
|
49
|
+
master_rate_limit: (Rails.env.production? && !!defined?(Redis) && ENV['REDIS_URL'].present?),
|
50
|
+
)
|
51
|
+
end
|
49
52
|
end
|
50
53
|
rescue LoadError
|
51
54
|
end
|
@@ -6,6 +6,10 @@ module CanvasSync
|
|
6
6
|
def perform(chain_definition, globals = {})
|
7
7
|
@globals = globals
|
8
8
|
|
9
|
+
if globals[:updated_after] == nil && Rails.env.development?
|
10
|
+
globals[:updated_after] = false
|
11
|
+
end
|
12
|
+
|
9
13
|
if globals[:updated_after] == false
|
10
14
|
globals[:updated_after] = nil
|
11
15
|
elsif !globals[:updated_after].present? || globals[:updated_after] == true
|
@@ -35,7 +35,11 @@ module CanvasSync
|
|
35
35
|
|
36
36
|
protected
|
37
37
|
|
38
|
-
|
38
|
+
# Ruby 3 changed how kwargs are handled. _kw_placeholder allows for backwards compatibility
|
39
|
+
# In Ruby 2, merge_report_params(options, params) would parse as merge_report_params(options, params={}, **params) (wtf?), so
|
40
|
+
# merge_report_params(options, params, {}) is used. That doesn't work in Ruby 3.
|
41
|
+
# In order to maintain compatibility with 2 and with any apps, this oddness is needed
|
42
|
+
def merge_report_params(options, params={}, _kw_placeholder=nil, term_scope: true)
|
39
43
|
term_scope = options[:canvas_term_id] || batch_context[:canvas_term_id] if term_scope == true
|
40
44
|
if term_scope.present?
|
41
45
|
params[:enrollment_term_id] = term_scope
|
data/lib/canvas_sync/version.rb
CHANGED
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.
|
4
|
+
version: 0.17.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Collings
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -276,6 +276,20 @@ dependencies:
|
|
276
276
|
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: open-uri
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :runtime
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
279
293
|
- !ruby/object:Gem::Dependency
|
280
294
|
name: activejob
|
281
295
|
requirement: !ruby/object:Gem::Requirement
|