panda_pal 5.4.0.beta3 → 5.4.0.beta8
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/app/assets/config/panda_pal_manifest.js +1 -1
- data/app/models/panda_pal/organization.rb +4 -0
- data/app/models/panda_pal/organization_concerns/task_scheduling.rb +14 -1
- data/lib/panda_pal.rb +25 -0
- data/lib/panda_pal/engine.rb +4 -0
- data/lib/panda_pal/helpers/session_replacement.rb +6 -2
- data/lib/panda_pal/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81c9272664817b0ae4db2101c6f1452c3745dae5df95b0d3af61608957d190d8
|
4
|
+
data.tar.gz: fa2e658b36a2b04ea717f248595f7c512dbcfc9e4992afd4c5bd7897aeeb211b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc207504f0e723f53ee0b8b3b7ed4d5c1fc83152e4d314642aa619c95f46a57852621de2aa513cbe46bcc3a4cddd9913e6bce946aa54f85d059d3245072681fc
|
7
|
+
data.tar.gz: 1e91981cf664f4b1a2d9dbd2a471eb63a1db0ddac62f7f18d7104aae58d8663143c42e1dd591696213e4cf30fe7188af151490d76c85c0cda5c4c3180420ca3e
|
@@ -1,4 +1,17 @@
|
|
1
|
-
|
1
|
+
unless defined?(Sidekiq.schedule)
|
2
|
+
module PandaPal
|
3
|
+
module OrganizationConcerns
|
4
|
+
module TaskScheduling
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
raise "The PandaPal TaskScheduling requires Sidekiq-scheduler to be installed"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
return
|
14
|
+
end
|
2
15
|
|
3
16
|
require_relative 'settings_validation'
|
4
17
|
|
data/lib/panda_pal.rb
CHANGED
@@ -13,6 +13,7 @@ module PandaPal
|
|
13
13
|
@@lti_properties = {}
|
14
14
|
@@lti_environments = {}
|
15
15
|
@@lti_custom_params = {}
|
16
|
+
@@extensions = {}
|
16
17
|
@@lti_private_key = nil
|
17
18
|
|
18
19
|
def self.lti_options= lti_options
|
@@ -70,8 +71,30 @@ module PandaPal
|
|
70
71
|
@@lti_private_key = k
|
71
72
|
end
|
72
73
|
|
74
|
+
def self.register_extension(type, modul)
|
75
|
+
type = normalize_ext_type(type)
|
76
|
+
@@extensions[type] ||= []
|
77
|
+
@@extensions[type] << modul
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.extensions_for(type)
|
81
|
+
(@@extensions[normalize_ext_type(type)] || []).uniq
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.resolved_extensions_for(type)
|
85
|
+
extensions_for(type).map do |ext|
|
86
|
+
ext.to_s.safe_constantize
|
87
|
+
end.compact
|
88
|
+
end
|
89
|
+
|
73
90
|
private
|
74
91
|
|
92
|
+
def self.normalize_ext_type(type)
|
93
|
+
type = type.to_s
|
94
|
+
type = "#{self.to_s}::#{type}" unless type.starts_with?('::') || type.starts_with?(self.to_s)
|
95
|
+
type
|
96
|
+
end
|
97
|
+
|
75
98
|
def self.validate_pandapal_config!
|
76
99
|
errors = []
|
77
100
|
validate_lti_navigation(errors)
|
@@ -89,3 +112,5 @@ module PandaPal
|
|
89
112
|
errors
|
90
113
|
end
|
91
114
|
end
|
115
|
+
|
116
|
+
PandaPal.register_extension 'Organization', '::OrganizationExtension'
|
data/lib/panda_pal/engine.rb
CHANGED
@@ -43,6 +43,10 @@ module PandaPal
|
|
43
43
|
ActiveSupport.on_load(:active_record) do
|
44
44
|
if defined?(Sidekiq) && Sidekiq.server? && PandaPal::Organization.respond_to?(:sync_schedules)
|
45
45
|
PandaPal::Organization.sync_schedules
|
46
|
+
|
47
|
+
ActiveSupport::Reloader.to_prepare do
|
48
|
+
PandaPal::Organization.sync_schedules
|
49
|
+
end
|
46
50
|
end
|
47
51
|
end
|
48
52
|
end
|
@@ -13,9 +13,13 @@ module PandaPal::Helpers
|
|
13
13
|
end
|
14
14
|
|
15
15
|
class_methods do
|
16
|
-
def link_nonce_type(value = :not_given)
|
16
|
+
def link_nonce_type(value = :not_given, use_non_app: false)
|
17
17
|
if value == :not_given
|
18
|
-
|
18
|
+
if use_non_app || !defined?(::ApplicationController) || self <= ::ApplicationController
|
19
|
+
@link_nonce_type || superclass.try(:link_nonce_type, use_non_app: true) || :nonce
|
20
|
+
else
|
21
|
+
::ApplicationController.link_nonce_type(value, use_non_app: true)
|
22
|
+
end
|
19
23
|
else
|
20
24
|
@link_nonce_type = value
|
21
25
|
end
|
data/lib/panda_pal/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_pal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.0.
|
4
|
+
version: 5.4.0.beta8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure ProServe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|