panda_pal 5.9.9 → 5.9.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/panda_pal/session.rb +2 -2
- data/lib/panda_pal/concerns/ability_helper.rb +10 -8
- 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: 7c75994a45a1847fd90718c94cd9ddb089f2d34d30fd3bc88f30c68cdaa3c104
|
4
|
+
data.tar.gz: ecd5df18b57808c26031538eac7be097b8c35a711a11fd37be482e6bc0c18747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369d8763153074cb274afba5cf386c1c17596de59ac96d1e5686ba0471c8cdd6caac3a37e373b5e1897c8fc4dbb8440f92fca8ac57dfe3c69d018fa681511b70
|
7
|
+
data.tar.gz: f6b11146aaeb36170918144667ae22c49cf925cd3cb7dffab0c963e016f9da328fbc5d17b8f638f5c1c6a554571e394a7191daefc6785503347a036ac7fd5f79
|
@@ -7,7 +7,7 @@ module PandaPal
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def [](key)
|
10
|
-
if column_names.include?(key.to_s)
|
10
|
+
if self.class.column_names.include?(key.to_s)
|
11
11
|
super
|
12
12
|
else
|
13
13
|
data[key]
|
@@ -15,7 +15,7 @@ module PandaPal
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def []=(key, value)
|
18
|
-
if column_names.include?(key.to_s)
|
18
|
+
if self.class.column_names.include?(key.to_s)
|
19
19
|
super
|
20
20
|
else
|
21
21
|
data[key] = value
|
@@ -6,10 +6,11 @@ module PandaPal::Concerns
|
|
6
6
|
|
7
7
|
# @return PandaPal::Session
|
8
8
|
def panda_pal_session
|
9
|
-
@panda_pal_session
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
unless defined?(@panda_pal_session) || @controller.present? || method(:panda_pal_session).owner == PandaPal::Concerns::AbilityHelper
|
10
|
+
raise "Ability class needs to set @panda_pal_session or @controller to use this feature"
|
11
|
+
end
|
12
|
+
|
13
|
+
@panda_pal_session = @controller.current_session(create_missing: false) unless defined?(@panda_pal_session)
|
13
14
|
|
14
15
|
if @panda_pal_session.is_a?(Hash)
|
15
16
|
# This is a breaking-change to CanvasSync, but not to PandaPal
|
@@ -20,10 +21,11 @@ module PandaPal::Concerns
|
|
20
21
|
end
|
21
22
|
|
22
23
|
def rails_session
|
23
|
-
@rails_session
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
unless defined?(@rails_session) || @controller.present? || method(:rails_session).owner == PandaPal::Concerns::AbilityHelper
|
25
|
+
raise "Ability class needs to set @rails_session or @controller to use this feature"
|
26
|
+
end
|
27
|
+
|
28
|
+
@rails_session ||= @controller.session unless defined?(@rails_session)
|
27
29
|
end
|
28
30
|
|
29
31
|
# Delegate legacy AbilityHelper methods to panda_pal_session. TODO Should such direct usage be considered deprecated?
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure CustomDev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|