yaml_extend 1.1.4 → 1.2.0

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: 201e99bcd2bf59ad4ce96e1d3e8f33a1146c4bef133152cff94a91a8c61d0448
4
- data.tar.gz: 1c80344acb3e7f823259fdfb8c329927ffb4ef7a1166a48f0de27cfe8ab7a6cc
3
+ metadata.gz: 053aef54e93b410f7b2eb373834abff17b4f1a2627d292f2eacb479fb78d4d9b
4
+ data.tar.gz: 70dd53ab46254a6dfed23530c74e3668d14a81844792ac980d4c03b0fb141d24
5
5
  SHA512:
6
- metadata.gz: 492f4243fd80eb5ae57b0824d774a588af5722992171a0e3e732cab7b28c0b771dade6221b50e98050a14153477be0b8304894575ac2871c6b8adae77700e519
7
- data.tar.gz: b6c37c0eec5829fa359d9d0abc389f439c2382dc87914b76268a72ecfff4cd8821feefeb8301c35af96bcdc1047de226d06944ebed1ba617aae885e3ad3f6001
6
+ metadata.gz: 390f032971732ece98f75c58bf471da9ce8085918cbedcf40fd840087a30e45da8a0db7df2fc06030d965ac9b0dae170f2745cdcacb09cf30b2acbcfe9d4118a
7
+ data.tar.gz: de9bfd1e7e9e2bf45f6783f387284720fdc54db997a6ba9f0eacf4b03a57f6fd2deb9c3596b868e81695da39873c277beefaee3d99ad7b31ffee103d4e208cfd
@@ -1,3 +1,3 @@
1
1
  module YamlExtend
2
- VERSION = '1.1.4'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
data/lib/yaml_extend.rb CHANGED
@@ -69,7 +69,7 @@ module YAML
69
69
  # @option options [Boolean] :merge_debug Set to true to get console output of merge process for debugging - DEFAULT: false
70
70
  #
71
71
  # @param [Boolean] options Fallback for backward compatiblity: extend existing arrays instead of replacing them (deep_merge)
72
- # @return [Hash] the resulting yaml config
72
+ # @return [Hash] the resulting yaml config
73
73
  #
74
74
  def self.ext_load_file(yaml_path, inheritance_key = nil, options = {})
75
75
  YAML.ext_load_file_recursive(yaml_path, inheritance_key, options, {})
@@ -111,9 +111,9 @@ module YAML
111
111
 
112
112
  super_config =
113
113
  if yaml_path.match(/(\.erb\.|\.erb$)/)
114
- YAML.load(ERB.new(File.read(yaml_path)).result)
114
+ YAML.unsafe_load(ERB.new(File.read(yaml_path)).result)
115
115
  else
116
- YAML.load_file(File.open(yaml_path))
116
+ YAML.unsafe_load_file(File.open(yaml_path))
117
117
  end
118
118
 
119
119
  super_inheritance_files = yaml_value_by_key inheritance_key, super_config
@@ -138,8 +138,8 @@ module YAML
138
138
  total_config.deeper_merge!(super_config, deep_merge_options)
139
139
  end
140
140
 
141
- # some logic to ensure absolute file inheritance as well as
142
- # relative file inheritance in yaml files
141
+ # some logic to ensure absolute file inheritance as well as
142
+ # relative file inheritance in yaml files
143
143
  def self.make_absolute_path(file_path)
144
144
  private_class_method
145
145
  return file_path if YAML.absolute_path?(file_path) && File.exist?(file_path)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_extend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus Beyrle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-04 00:00:00.000000000 Z
11
+ date: 2022-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.1.4
110
+ rubygems_version: 3.3.7
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Extends YAML to support file based inheritance