panda_pal 5.4.0.beta4 → 5.4.0.beta9
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/models/panda_pal/organization.rb +4 -0
- data/app/models/panda_pal/organization_concerns/task_scheduling.rb +14 -1
- data/lib/panda_pal.rb +26 -0
- data/lib/panda_pal/engine.rb +4 -0
- data/lib/panda_pal/helpers.rb +1 -0
- data/lib/panda_pal/{ability_mixin.rb → helpers/ability_mixin.rb} +0 -0
- data/lib/panda_pal/helpers/session_replacement.rb +6 -2
- data/lib/panda_pal/jobs.rb +3 -0
- data/lib/panda_pal/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83ce940ea822b2d77eaeb63a8d6ba7e5ef213151c881a1b1fa872527adac42fd
|
4
|
+
data.tar.gz: cc4439a2431281e657deb7c61eaedc9dd0b647593657c8c9e112774cd4b9897f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ae381028c6bbac74c6084dc3aa914e50da57c6126bf394f7150e5e98744c8ec5d025abe3111e18a97f076e31fd2b63f1dec5d2496d1cc3032b6e0a8351d1f6a
|
7
|
+
data.tar.gz: cda153e9bedb6253d5ab5375657989567ae4cf5e542838d16516a64b1c20cfc2058895504aad10e0e56dfb6a7330c43a467a71be78f192f0c4a221d16ab26f9c
|
@@ -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
@@ -1,6 +1,7 @@
|
|
1
1
|
require "panda_pal/engine"
|
2
2
|
require 'panda_pal/plugins'
|
3
3
|
require 'panda_pal/helpers'
|
4
|
+
require 'panda_pal/jobs'
|
4
5
|
require 'oauth/request_proxy/rack_request'
|
5
6
|
require 'oauth/request_proxy/action_dispatch_request'
|
6
7
|
|
@@ -13,6 +14,7 @@ module PandaPal
|
|
13
14
|
@@lti_properties = {}
|
14
15
|
@@lti_environments = {}
|
15
16
|
@@lti_custom_params = {}
|
17
|
+
@@extensions = {}
|
16
18
|
@@lti_private_key = nil
|
17
19
|
|
18
20
|
def self.lti_options= lti_options
|
@@ -70,8 +72,30 @@ module PandaPal
|
|
70
72
|
@@lti_private_key = k
|
71
73
|
end
|
72
74
|
|
75
|
+
def self.register_extension(type, modul)
|
76
|
+
type = normalize_ext_type(type)
|
77
|
+
@@extensions[type] ||= []
|
78
|
+
@@extensions[type] << modul.to_s
|
79
|
+
end
|
80
|
+
|
81
|
+
def self.extensions_for(type)
|
82
|
+
(@@extensions[normalize_ext_type(type)] || []).uniq
|
83
|
+
end
|
84
|
+
|
85
|
+
def self.resolved_extensions_for(type)
|
86
|
+
extensions_for(type).map do |ext|
|
87
|
+
ext.safe_constantize
|
88
|
+
end.compact
|
89
|
+
end
|
90
|
+
|
73
91
|
private
|
74
92
|
|
93
|
+
def self.normalize_ext_type(type)
|
94
|
+
type = type.to_s
|
95
|
+
type = "#{self.to_s}::#{type}" unless type.starts_with?('::') || type.starts_with?(self.to_s)
|
96
|
+
type
|
97
|
+
end
|
98
|
+
|
75
99
|
def self.validate_pandapal_config!
|
76
100
|
errors = []
|
77
101
|
validate_lti_navigation(errors)
|
@@ -89,3 +113,5 @@ module PandaPal
|
|
89
113
|
errors
|
90
114
|
end
|
91
115
|
end
|
116
|
+
|
117
|
+
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
|
data/lib/panda_pal/helpers.rb
CHANGED
File without changes
|
@@ -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.beta9
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -244,13 +244,14 @@ files:
|
|
244
244
|
- db/migrate/20171205183457_encrypt_organization_settings.rb
|
245
245
|
- db/migrate/20171205194657_remove_old_organization_settings.rb
|
246
246
|
- lib/panda_pal.rb
|
247
|
-
- lib/panda_pal/ability_mixin.rb
|
248
247
|
- lib/panda_pal/engine.rb
|
249
248
|
- lib/panda_pal/helpers.rb
|
249
|
+
- lib/panda_pal/helpers/ability_mixin.rb
|
250
250
|
- lib/panda_pal/helpers/controller_helper.rb
|
251
251
|
- lib/panda_pal/helpers/route_helper.rb
|
252
252
|
- lib/panda_pal/helpers/secure_headers.rb
|
253
253
|
- lib/panda_pal/helpers/session_replacement.rb
|
254
|
+
- lib/panda_pal/jobs.rb
|
254
255
|
- lib/panda_pal/jobs/grade_passback_job.rb
|
255
256
|
- lib/panda_pal/plugins.rb
|
256
257
|
- lib/panda_pal/version.rb
|