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 +4 -4
- data/lib/yaml_extend/version.rb +1 -1
- data/lib/yaml_extend.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 053aef54e93b410f7b2eb373834abff17b4f1a2627d292f2eacb479fb78d4d9b
|
4
|
+
data.tar.gz: 70dd53ab46254a6dfed23530c74e3668d14a81844792ac980d4c03b0fb141d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 390f032971732ece98f75c58bf471da9ce8085918cbedcf40fd840087a30e45da8a0db7df2fc06030d965ac9b0dae170f2745cdcacb09cf30b2acbcfe9d4118a
|
7
|
+
data.tar.gz: de9bfd1e7e9e2bf45f6783f387284720fdc54db997a6ba9f0eacf4b03a57f6fd2deb9c3596b868e81695da39873c277beefaee3d99ad7b31ffee103d4e208cfd
|
data/lib/yaml_extend/version.rb
CHANGED
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.
|
114
|
+
YAML.unsafe_load(ERB.new(File.read(yaml_path)).result)
|
115
115
|
else
|
116
|
-
YAML.
|
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.
|
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:
|
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.
|
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
|