config_file_manager 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/config_file_manager/version.rb +1 -1
- data/lib/config_file_manager.rb +11 -1
- metadata +1 -2
- data/pkg/config_loader-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26d20f796f74a141b1bbd0ade461af62aaa1e4910a9ef0852e0b4d763d21dac0
|
4
|
+
data.tar.gz: 48e06aed577794ee223251bf339c805a140a46c09cc842df1e7729f1b03d02b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a72f46169385ce9c4577ce55792e6f0a3f31904e963c974ef4126cae580e4f7285df9922784058b39efd13a89b3dae82b2e86adb8b235abe177ae290a28f2b'
|
7
|
+
data.tar.gz: 3dbe69a543fad3646381737c9821b90585168c59722d4187a4a7b41ce6aaaf4a68bf5663b64324a81f88d898e2ec99cc85936c3a238fa8fd763dc500a6e33886
|
data/CHANGELOG.md
CHANGED
data/lib/config_file_manager.rb
CHANGED
@@ -173,7 +173,7 @@ class ConfigFileManager
|
|
173
173
|
# @return [Hash, Array]
|
174
174
|
def load_yaml(*file_name, env: @env, symbolize: true)
|
175
175
|
env = env.to_sym if env && symbolize
|
176
|
-
parsed =
|
176
|
+
parsed = ruby_load_yaml(load_erb(*file_name), symbolize_names: symbolize)
|
177
177
|
return parsed unless env
|
178
178
|
|
179
179
|
parsed[env]
|
@@ -218,6 +218,16 @@ class ConfigFileManager
|
|
218
218
|
|
219
219
|
private
|
220
220
|
|
221
|
+
if ::Psych::VERSION >= '4'
|
222
|
+
def ruby_load_yaml(content, **options) # rubocop:disable Style/DocumentationMethod
|
223
|
+
::YAML.load(content, aliases: true, **options) # rubocop:disable Security/YAMLLoad
|
224
|
+
end
|
225
|
+
else
|
226
|
+
def ruby_load_yaml(content, **options) # rubocop:disable Style/DocumentationMethod
|
227
|
+
::YAML.load(content, **options) # rubocop:disable Security/YAMLLoad
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
221
231
|
# @param original_name [String]
|
222
232
|
# @param new_name [String]
|
223
233
|
# @param print [Boolean]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_file_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Drewniak
|
@@ -38,7 +38,6 @@ files:
|
|
38
38
|
- Rakefile
|
39
39
|
- lib/config_file_manager.rb
|
40
40
|
- lib/config_file_manager/version.rb
|
41
|
-
- pkg/config_loader-0.1.0.gem
|
42
41
|
- sig/config_loader.rbs
|
43
42
|
homepage: https://github.com/Verseth/ruby-config-loader
|
44
43
|
licenses:
|
data/pkg/config_loader-0.1.0.gem
DELETED
Binary file
|