panda_pal 5.4.8 → 5.4.11
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: 405f20d636bb1ef29c5f115bb91679f0a0cb951155bd6d9633c96ec72dcd4a43
|
4
|
+
data.tar.gz: 19cb62856f5a5a2184624218fa1a70de353c7a4abc5135133e18089dc99305a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57524bab33e144b0ba8b8f2a2e792aec57a437234141b65ecb4dcf20c44c7f48989cf1f889802163756824f3cf12af4587f23627931e441f13b3240f68818806
|
7
|
+
data.tar.gz: db533926d6f3687bbf233099d904e11b6b507b410ad215e1f8f595450f3bcb1ae486d5cdd04b5bd8beb1f0f7535dc824c98e666c5891e6465cedc5718432e6d7
|
@@ -13,8 +13,6 @@ unless defined?(Sidekiq.schedule)
|
|
13
13
|
return
|
14
14
|
end
|
15
15
|
|
16
|
-
require_relative 'settings_validation'
|
17
|
-
|
18
16
|
module PandaPal
|
19
17
|
module OrganizationConcerns
|
20
18
|
module TaskScheduling
|
@@ -68,6 +66,10 @@ module PandaPal
|
|
68
66
|
}
|
69
67
|
end
|
70
68
|
|
69
|
+
def task_scheduled?(name_or_method)
|
70
|
+
_schedule_descriptors.key?(name_or_method.to_s)
|
71
|
+
end
|
72
|
+
|
71
73
|
def remove_scheduled_task(name_or_method)
|
72
74
|
dval = _schedule_descriptors.delete(name_or_method.to_s)
|
73
75
|
Rails.logger.warn("No task with key '#{name_or_method}' to delete!") unless dval.present?
|
@@ -8,6 +8,34 @@ module PandaPal
|
|
8
8
|
self.session_key ||= SecureRandom.urlsafe_base64(60)
|
9
9
|
end
|
10
10
|
|
11
|
-
|
11
|
+
class DataSerializer
|
12
|
+
def self.load(str)
|
13
|
+
return {} unless str.present?
|
14
|
+
begin
|
15
|
+
parsed = JSON.parse(str)
|
16
|
+
rescue JSON::ParserError
|
17
|
+
parsed = yaml_load(str)
|
18
|
+
end
|
19
|
+
parsed.is_a?(Hash) ? HashWithIndifferentAccess.new(parsed) : parsed
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.dump(obj)
|
23
|
+
JSON.dump(obj)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
if YAML.respond_to?(:unsafe_load)
|
29
|
+
def self.yaml_load(payload)
|
30
|
+
YAML.unsafe_load(payload)
|
31
|
+
end
|
32
|
+
else
|
33
|
+
def self.yaml_load(payload)
|
34
|
+
YAML.load(payload)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
serialize :data, DataSerializer
|
12
40
|
end
|
13
41
|
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.
|
4
|
+
version: 5.4.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure ProServe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|