rails-settings-cached 2.8.1 → 2.8.2

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: 0405e5cfca63f64b56ba7e95817c52803184afc191c837ef312df41e368dd9e4
4
- data.tar.gz: 54a968cf325c616142394892943ffdd6a9893234acc98c381122f878696e1547
3
+ metadata.gz: 2cdcbd12a2a3eb29491036b8c865a18bd098174324981e85498217bc708d2770
4
+ data.tar.gz: 6abfb107f6453ad4d221c6accc4a5c04a78da731cdb39cef1a4fc72149d5e63a
5
5
  SHA512:
6
- metadata.gz: 171e47f07b71053d5b1218118992b3e5723f3118abe5a2b31a7b799f05354fac3e4ec28734ddf33790dead573948f2b59ff811cc0edec18ee688dedbd3d724f0
7
- data.tar.gz: 5f8aa09f8980dfb7b100aaa1ac2c5fdb65185511c7fb21e96343e29b4d63280fc5e2ef1ce5a930e69dcd543ce5bd0c4bb0fb15185db72ca3c7276b09ee27bf1e
6
+ metadata.gz: 4c7acbc5ff62818c2b526301748019926c33611db3ee8b77a7b6d4d14b582874483cd401eadffc9580083f8c4bcf363893851e4a1b6eeb90ddb0266b7b52f2ab
7
+ data.tar.gz: 5a31aed5bcda620d0540e8c0f90afbdfdfdb4f1504fd1677916f1437d94719fb856cab7159d6ccad20ec4dd871e6c7e21ec66c6de039035ace56492ab9443af3
data/README.md CHANGED
@@ -142,7 +142,7 @@ Setting.keys
142
142
  => ["app_name", "host", "default_locale", "readonly_item"]
143
143
 
144
144
  # Get editable keys
145
- Settng.editable_keys
145
+ Setting.editable_keys
146
146
  => ["app_name", "default_locale"]
147
147
 
148
148
  # Get readonly keys
@@ -15,7 +15,11 @@ module RailsSettings
15
15
  # get the value field, YAML decoded
16
16
  def value
17
17
  # rubocop:disable Security/YAMLLoad
18
- YAML.load(self[:value]) if self[:value].present?
18
+ payload = self[:value]
19
+
20
+ if payload.present?
21
+ YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(payload) : YAML.load(payload)
22
+ end
19
23
  end
20
24
 
21
25
  # set the value field, YAML encoded
@@ -3,7 +3,7 @@
3
3
  module RailsSettings
4
4
  class << self
5
5
  def version
6
- "2.8.1"
6
+ "2.8.2"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-settings-cached
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-24 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -107,7 +107,7 @@ homepage: https://github.com/huacnlee/rails-settings-cached
107
107
  licenses:
108
108
  - MIT
109
109
  metadata: {}
110
- post_install_message:
110
+ post_install_message:
111
111
  rdoc_options: []
112
112
  require_paths:
113
113
  - lib
@@ -122,8 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.1.4
126
- signing_key:
125
+ rubygems_version: 3.3.3
126
+ signing_key:
127
127
  specification_version: 4
128
128
  summary: The best solution for store global settings in Rails applications.
129
129
  test_files: []