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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b201bea17abb482354c6f78d6a9d593bea969d1d9230a19f7fc4d4f57e61386
4
- data.tar.gz: 3dfee6b8202650db06b0b16ffa9635973a7fb6296a9071401e54061af859f8c4
3
+ metadata.gz: 26d20f796f74a141b1bbd0ade461af62aaa1e4910a9ef0852e0b4d763d21dac0
4
+ data.tar.gz: 48e06aed577794ee223251bf339c805a140a46c09cc842df1e7729f1b03d02b0
5
5
  SHA512:
6
- metadata.gz: 0cfe298ff1a28b1f7d1deaae12f802eb9eb2d33118c3c8aaf22b991847ed624a1684c8cd6e38a64b6d989685fa32be1406cf13ecb8e436930f3e8ea52c465672
7
- data.tar.gz: 3d00173997bb351a91a50b0d941f11ba76078579c84b87c652b0febf358ae712971cd5c429c661036ab452b59bf030c84fb7ca6c0272e4236113998eecff0e8e
6
+ metadata.gz: '08a72f46169385ce9c4577ce55792e6f0a3f31904e963c974ef4126cae580e4f7285df9922784058b39efd13a89b3dae82b2e86adb8b235abe177ae290a28f2b'
7
+ data.tar.gz: 3dbe69a543fad3646381737c9821b90585168c59722d4187a4a7b41ce6aaaf4a68bf5663b64324a81f88d898e2ec99cc85936c3a238fa8fd763dc500a6e33886
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.1] - 2023-08-28
4
+
5
+ - Add support for Psych < 4
6
+
3
7
  ## [0.1.0] - 2023-08-28
4
8
 
5
9
  - Initial release
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ConfigFileManager # rubocop:disable Style/StaticClass
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -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 = ::YAML.load(load_erb(*file_name), symbolize_names: symbolize) # rubocop:disable Security/YAMLLoad
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.0
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:
Binary file