fittings 0.2.3 → 0.2.4.RC1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fittings.gemspec +1 -1
- data/lib/setting.rb +8 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5026c63a940c5db219159494e18492b7b581f461db35356ae49c9ddca6539c4
|
4
|
+
data.tar.gz: 295435698db4d94c21b6b5f7f0610df7aa38da36be0d803e472131fd9d0543fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f68a954f93898276c2101dc2983819cca292ea437fa0970b56a9d647359e075de87a556e5d804838c95c2d3d8875a114d04594267ac9aeaefe8f7183ccbdd59
|
7
|
+
data.tar.gz: 8b196dfeec05a698eeb9162862494813b55de72cc531fba8df5d4cc90960c77bf90a5e9fd1c10f0af3344103a266fdfdd08be2b3977897923a3c4bdead5db2ee
|
data/fittings.gemspec
CHANGED
data/lib/setting.rb
CHANGED
@@ -180,7 +180,14 @@ class Setting
|
|
180
180
|
|
181
181
|
files.flatten.each do |file|
|
182
182
|
begin
|
183
|
-
|
183
|
+
# Ruby versions before 3.0.3 include Psych < 3.3.2, which does not include `unsafe_load`. In those versions,
|
184
|
+
# `load` is the behavior we want (in later versions, `load` uses `safe_load`, which doesn't support aliases and
|
185
|
+
# requires allowlisting classes used in files.
|
186
|
+
if Psych::VERSION < '3.3.2'
|
187
|
+
@available_settings.recursive_merge!(YAML::load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
|
188
|
+
else
|
189
|
+
@available_settings.recursive_merge!(YAML::unsafe_load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
|
190
|
+
end
|
184
191
|
rescue Exception => e
|
185
192
|
raise FileError.new("Error parsing file #{file}, with: #{e.message}")
|
186
193
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fittings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4.RC1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edwin Cruz
|
@@ -110,11 +110,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- - "
|
113
|
+
- - ">"
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
115
|
+
version: 1.3.1
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.2.
|
117
|
+
rubygems_version: 3.2.5
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Manage settings per environment
|