panda_pal 5.4.7 → 5.4.10

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: 2f1be48801ad434039bdca5a2a0a9f5c46ecb367487c773c66bc302cf1d218f7
4
- data.tar.gz: fdc202caaf5132714191559b206809b553f49daf801f6c3e7f7dcba35bfa57e0
3
+ metadata.gz: 67af1ecc28a193ad6ff80379c433a273c6b8b85cc809aa2eb1eb6ae636cd0502
4
+ data.tar.gz: e02a97fcfa42738a4ed1bafccecee40236c70dd4ba8c84e216b0ed065ec81eba
5
5
  SHA512:
6
- metadata.gz: 10e708bb0f43c4ab219b0577237e221336ca5ca4759829757c009ea81e6e35528988e84f51d1bdaea2cae4a73d1d865fd896347171c7d27b1f6b9d9d4a9ece0c
7
- data.tar.gz: f78cc8ee0232484e4133a9b3300c44748a310573be24b74813c2c57f35fbc1d174631e6d587a5be0c12fe5b9f1ea9ff5b51cbed463e83a0f6ddf0a8231484508
6
+ metadata.gz: f84b73988355b2bc76a2f5b2a27baceda59dd2e761f55e4f79b973669c3c272f5581ea4e0640159d6402c1c00bd79974cb1fd4a6753217c647948a3b8e2d609a
7
+ data.tar.gz: 2fe8dca8891705940d2f41013ce6a90b88c6043f86f64254ec16e0a8d36fefb4a6b7b3726660a2c1159c0b06f42d8fef227a8fb835837acb6c8c73fc4dddd315
@@ -8,6 +8,34 @@ module PandaPal
8
8
  self.session_key ||= SecureRandom.urlsafe_base64(60)
9
9
  end
10
10
 
11
- serialize :data, Hash
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
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.4.7"
2
+ VERSION = "5.4.10"
3
3
  end
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.7
4
+ version: 5.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure ProServe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-26 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -178,7 +178,7 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
- description:
181
+ description:
182
182
  email:
183
183
  - pseng@instructure.com
184
184
  executables: []
@@ -280,7 +280,7 @@ homepage: http://instructure.com
280
280
  licenses:
281
281
  - MIT
282
282
  metadata: {}
283
- post_install_message:
283
+ post_install_message:
284
284
  rdoc_options: []
285
285
  require_paths:
286
286
  - lib
@@ -296,49 +296,49 @@ required_rubygems_version: !ruby/object:Gem::Requirement
296
296
  version: '0'
297
297
  requirements: []
298
298
  rubygems_version: 3.0.3
299
- signing_key:
299
+ signing_key:
300
300
  specification_version: 4
301
301
  summary: LTI mountable engine
302
302
  test_files:
303
- - spec/rails_helper.rb
304
- - spec/models/panda_pal/organization_spec.rb
305
- - spec/models/panda_pal/session_spec.rb
306
- - spec/models/panda_pal/organization/settings_validation_spec.rb
307
- - spec/models/panda_pal/organization/task_scheduling_spec.rb
308
303
  - spec/spec_helper.rb
309
- - spec/dummy/db/schema.rb
310
- - spec/dummy/public/422.html
311
- - spec/dummy/public/favicon.ico
312
- - spec/dummy/public/404.html
313
- - spec/dummy/public/500.html
314
- - spec/dummy/Rakefile
315
- - spec/dummy/app/views/layouts/application.html.erb
316
304
  - spec/dummy/app/controllers/application_controller.rb
317
- - spec/dummy/app/helpers/application_helper.rb
318
- - spec/dummy/app/assets/stylesheets/application.css
305
+ - spec/dummy/app/views/layouts/application.html.erb
319
306
  - spec/dummy/app/assets/javascripts/application.js
307
+ - spec/dummy/app/assets/stylesheets/application.css
308
+ - spec/dummy/app/helpers/application_helper.rb
309
+ - spec/dummy/bin/rake
310
+ - spec/dummy/bin/setup
311
+ - spec/dummy/bin/bundle
312
+ - spec/dummy/bin/rails
320
313
  - spec/dummy/config/secrets.yml
321
- - spec/dummy/config/application.rb
322
- - spec/dummy/config/initializers/session_store.rb
323
- - spec/dummy/config/initializers/wrap_parameters.rb
324
- - spec/dummy/config/initializers/inflections.rb
325
- - spec/dummy/config/initializers/filter_parameter_logging.rb
326
- - spec/dummy/config/initializers/mime_types.rb
327
- - spec/dummy/config/initializers/backtrace_silencers.rb
328
- - spec/dummy/config/initializers/cookies_serializer.rb
314
+ - spec/dummy/config/routes.rb
315
+ - spec/dummy/config/locales/en.yml
316
+ - spec/dummy/config/environments/production.rb
329
317
  - spec/dummy/config/environments/development.rb
330
318
  - spec/dummy/config/environments/test.rb
331
- - spec/dummy/config/environments/production.rb
319
+ - spec/dummy/config/environment.rb
320
+ - spec/dummy/config/application.rb
332
321
  - spec/dummy/config/database.yml
333
322
  - spec/dummy/config/boot.rb
334
- - spec/dummy/config/routes.rb
335
- - spec/dummy/config/environment.rb
336
- - spec/dummy/config/locales/en.yml
337
- - spec/dummy/README.rdoc
323
+ - spec/dummy/config/initializers/backtrace_silencers.rb
324
+ - spec/dummy/config/initializers/mime_types.rb
325
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
326
+ - spec/dummy/config/initializers/session_store.rb
327
+ - spec/dummy/config/initializers/wrap_parameters.rb
328
+ - spec/dummy/config/initializers/cookies_serializer.rb
329
+ - spec/dummy/config/initializers/inflections.rb
338
330
  - spec/dummy/config.ru
339
- - spec/dummy/bin/bundle
340
- - spec/dummy/bin/rake
341
- - spec/dummy/bin/setup
342
- - spec/dummy/bin/rails
343
- - spec/factories/panda_pal_organizations.rb
331
+ - spec/dummy/Rakefile
332
+ - spec/dummy/public/favicon.ico
333
+ - spec/dummy/public/422.html
334
+ - spec/dummy/public/500.html
335
+ - spec/dummy/public/404.html
336
+ - spec/dummy/db/schema.rb
337
+ - spec/dummy/README.rdoc
338
+ - spec/models/panda_pal/organization/settings_validation_spec.rb
339
+ - spec/models/panda_pal/organization/task_scheduling_spec.rb
340
+ - spec/models/panda_pal/session_spec.rb
341
+ - spec/models/panda_pal/organization_spec.rb
344
342
  - spec/factories/panda_pal_sessions.rb
343
+ - spec/factories/panda_pal_organizations.rb
344
+ - spec/rails_helper.rb