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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/fittings.gemspec +1 -1
  3. data/lib/setting.rb +8 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb552f67b4eefc231c0224a7e5ed90ce9fcc4e3847239120d01fab7f9bf1b8c5
4
- data.tar.gz: 4752bf8ddeb6f27ce2a72c54eec183683b1591075b06ea8221a0fd8ea76131f8
3
+ metadata.gz: e5026c63a940c5db219159494e18492b7b581f461db35356ae49c9ddca6539c4
4
+ data.tar.gz: 295435698db4d94c21b6b5f7f0610df7aa38da36be0d803e472131fd9d0543fb
5
5
  SHA512:
6
- metadata.gz: dca71a88cd6861c792307c0e903c17a97247f8c2d0b49cb5a04d423174e3c9d8817bfb56be52f3ab7b50c3ee724046fd26ea0e7d691e3616556a1dce53380163
7
- data.tar.gz: 0bfac3cb8d6db784f6b9ebd685b0944aea36170f9fb30da664e8abf4c90154df766943fbc981e7f730a9082c83922cb2aa1d261af36c0073d93e8f0df685cbee
6
+ metadata.gz: 0f68a954f93898276c2101dc2983819cca292ea437fa0970b56a9d647359e075de87a556e5d804838c95c2d3d8875a114d04594267ac9aeaefe8f7183ccbdd59
7
+ data.tar.gz: 8b196dfeec05a698eeb9162862494813b55de72cc531fba8df5d4cc90960c77bf90a5e9fd1c10f0af3344103a266fdfdd08be2b3977897923a3c4bdead5db2ee
data/fittings.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fittings"
3
- s.version = "0.2.3"
3
+ s.version = "0.2.4.RC1"
4
4
 
5
5
  s.authors = ["Edwin Cruz", "Colin Shield"]
6
6
  s.date = %q{2011-09-06}
data/lib/setting.rb CHANGED
@@ -180,7 +180,14 @@ class Setting
180
180
 
181
181
  files.flatten.each do |file|
182
182
  begin
183
- @available_settings.recursive_merge!(YAML::unsafe_load(ERB.new(IO.read(file)).result) || {}) if File.exists?(file)
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.3
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: '0'
115
+ version: 1.3.1
116
116
  requirements: []
117
- rubygems_version: 3.2.7
117
+ rubygems_version: 3.2.5
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Manage settings per environment