panda_pal 5.9.8 → 5.9.9
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bcf4f72e56b52fdec3f6e6b537e91225ea9effba4d091876a505be4a5a2743
|
4
|
+
data.tar.gz: 5de224cfbc6895b735a4e26e427e470b8f8fe42bc5c486a3837e0b2c79ba2ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6cc863556e1acd683b74a765aef84493004fb3af25dade1f6dafac035523fa63009c929a58cd0129d5a7899673ded1fb5170dff56da81e3d628969675c7e58d
|
7
|
+
data.tar.gz: 5f0f6c2d59ed052b0494a7d983bfb13550a6dffa1a1b4e2410eaa828fd58c143337f58739423fecbbe023df4ff64542f8af42a0fca6090f64284d44bb55d05d8
|
@@ -6,9 +6,25 @@ module PandaPal
|
|
6
6
|
self.session_key ||= SecureRandom.urlsafe_base64(60)
|
7
7
|
end
|
8
8
|
|
9
|
+
def [](key)
|
10
|
+
if column_names.include?(key.to_s)
|
11
|
+
super
|
12
|
+
else
|
13
|
+
data[key]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def []=(key, value)
|
18
|
+
if column_names.include?(key.to_s)
|
19
|
+
super
|
20
|
+
else
|
21
|
+
data[key] = value
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
9
25
|
def cache(key, &blk)
|
10
|
-
|
11
|
-
|
26
|
+
data[:cache] ||= {}
|
27
|
+
data[:cache][key] ||= blk.call
|
12
28
|
end
|
13
29
|
|
14
30
|
def launch_params
|
@@ -8,8 +8,15 @@ module PandaPal::Concerns
|
|
8
8
|
def panda_pal_session
|
9
9
|
@panda_pal_session ||= begin
|
10
10
|
raise "Ability class needs to set @panda_pal_session or @controller to use this feature" unless @controller.present?
|
11
|
-
@controller.current_session
|
11
|
+
@controller.current_session(create_missing: false)
|
12
12
|
end
|
13
|
+
|
14
|
+
if @panda_pal_session.is_a?(Hash)
|
15
|
+
# This is a breaking-change to CanvasSync, but not to PandaPal
|
16
|
+
raise "Ability#panda_pal_session/@panda_pal_session should now return a PandaPal::Session object, not a Hash"
|
17
|
+
end
|
18
|
+
|
19
|
+
@panda_pal_session
|
13
20
|
end
|
14
21
|
|
15
22
|
def rails_session
|
@@ -19,16 +26,15 @@ module PandaPal::Concerns
|
|
19
26
|
end
|
20
27
|
end
|
21
28
|
|
29
|
+
# Delegate legacy AbilityHelper methods to panda_pal_session. TODO Should such direct usage be considered deprecated?
|
30
|
+
delegate :launch_params, :get_lti_cust_param, :lti_launch_placement, :canvas_site_admin?, :lti_roles, :canvas_role_labels, :canvas_account_role_labels, to: :panda_pal_session
|
31
|
+
|
22
32
|
def is_lti_launch?
|
23
33
|
panda_pal_session.present?
|
24
34
|
end
|
25
35
|
|
26
|
-
def
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
def canvas_site_admin?
|
31
|
-
panda_pal_session.canvas_site_admin?
|
36
|
+
def cache_on_session(*args, **kwargs, &blk)
|
37
|
+
panda_pal_session.cache(*args, **kwargs, &blk)
|
32
38
|
end
|
33
39
|
end
|
34
40
|
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.9.
|
4
|
+
version: 5.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure CustomDev
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -282,7 +282,7 @@ dependencies:
|
|
282
282
|
- - '='
|
283
283
|
- !ruby/object:Gem::Version
|
284
284
|
version: 2.7.1
|
285
|
-
description:
|
285
|
+
description:
|
286
286
|
email:
|
287
287
|
- pseng@instructure.com
|
288
288
|
executables: []
|
@@ -394,7 +394,7 @@ homepage: http://instructure.com
|
|
394
394
|
licenses:
|
395
395
|
- MIT
|
396
396
|
metadata: {}
|
397
|
-
post_install_message:
|
397
|
+
post_install_message:
|
398
398
|
rdoc_options: []
|
399
399
|
require_paths:
|
400
400
|
- lib
|
@@ -409,52 +409,52 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
409
|
- !ruby/object:Gem::Version
|
410
410
|
version: '0'
|
411
411
|
requirements: []
|
412
|
-
rubygems_version: 3.
|
413
|
-
signing_key:
|
412
|
+
rubygems_version: 3.1.6
|
413
|
+
signing_key:
|
414
414
|
specification_version: 4
|
415
415
|
summary: LTI mountable engine
|
416
416
|
test_files:
|
417
|
+
- spec/rails_helper.rb
|
418
|
+
- spec/models/panda_pal/api_call_spec.rb
|
419
|
+
- spec/models/panda_pal/organization_spec.rb
|
420
|
+
- spec/models/panda_pal/session_spec.rb
|
421
|
+
- spec/models/panda_pal/organization/settings_validation_spec.rb
|
422
|
+
- spec/models/panda_pal/organization/task_scheduling_spec.rb
|
417
423
|
- spec/controllers/panda_pal/api_call_controller_spec.rb
|
418
|
-
- spec/
|
424
|
+
- spec/spec_helper.rb
|
425
|
+
- spec/dummy/db/schema.rb
|
426
|
+
- spec/dummy/public/422.html
|
427
|
+
- spec/dummy/public/favicon.ico
|
428
|
+
- spec/dummy/public/404.html
|
429
|
+
- spec/dummy/public/500.html
|
419
430
|
- spec/dummy/Rakefile
|
420
|
-
- spec/dummy/app/
|
421
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
431
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
422
432
|
- spec/dummy/app/controllers/application_controller.rb
|
423
433
|
- spec/dummy/app/helpers/application_helper.rb
|
424
|
-
- spec/dummy/app/
|
425
|
-
- spec/dummy/
|
426
|
-
- spec/dummy/
|
427
|
-
- spec/dummy/bin/rake
|
428
|
-
- spec/dummy/bin/setup
|
434
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
435
|
+
- spec/dummy/app/assets/javascripts/application.js
|
436
|
+
- spec/dummy/config/secrets.yml
|
429
437
|
- spec/dummy/config/application.rb
|
430
|
-
- spec/dummy/config/boot.rb
|
431
|
-
- spec/dummy/config/database.yml
|
432
|
-
- spec/dummy/config/environment.rb
|
433
|
-
- spec/dummy/config/environments/development.rb
|
434
|
-
- spec/dummy/config/environments/production.rb
|
435
|
-
- spec/dummy/config/environments/test.rb
|
436
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
437
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
438
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
439
|
-
- spec/dummy/config/initializers/inflections.rb
|
440
|
-
- spec/dummy/config/initializers/mime_types.rb
|
441
438
|
- spec/dummy/config/initializers/session_store.rb
|
442
439
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
443
|
-
- spec/dummy/config/
|
440
|
+
- spec/dummy/config/initializers/inflections.rb
|
441
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
442
|
+
- spec/dummy/config/initializers/mime_types.rb
|
443
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
444
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
445
|
+
- spec/dummy/config/environments/development.rb
|
446
|
+
- spec/dummy/config/environments/test.rb
|
447
|
+
- spec/dummy/config/environments/production.rb
|
448
|
+
- spec/dummy/config/database.yml
|
449
|
+
- spec/dummy/config/boot.rb
|
444
450
|
- spec/dummy/config/routes.rb
|
445
|
-
- spec/dummy/config/
|
451
|
+
- spec/dummy/config/environment.rb
|
452
|
+
- spec/dummy/config/locales/en.yml
|
453
|
+
- spec/dummy/README.rdoc
|
446
454
|
- spec/dummy/config.ru
|
447
|
-
- spec/dummy/
|
448
|
-
- spec/dummy/
|
449
|
-
- spec/dummy/
|
450
|
-
- spec/dummy/
|
451
|
-
- spec/dummy/public/favicon.ico
|
455
|
+
- spec/dummy/bin/bundle
|
456
|
+
- spec/dummy/bin/rake
|
457
|
+
- spec/dummy/bin/setup
|
458
|
+
- spec/dummy/bin/rails
|
452
459
|
- spec/factories/panda_pal_organizations.rb
|
453
460
|
- spec/factories/panda_pal_sessions.rb
|
454
|
-
- spec/models/panda_pal/api_call_spec.rb
|
455
|
-
- spec/models/panda_pal/organization/settings_validation_spec.rb
|
456
|
-
- spec/models/panda_pal/organization/task_scheduling_spec.rb
|
457
|
-
- spec/models/panda_pal/organization_spec.rb
|
458
|
-
- spec/models/panda_pal/session_spec.rb
|
459
|
-
- spec/rails_helper.rb
|
460
|
-
- spec/spec_helper.rb
|