yaml_extend 1.1.3 → 1.1.4
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/lib/yaml_extend.rb +5 -2
- data/lib/yaml_extend/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201e99bcd2bf59ad4ce96e1d3e8f33a1146c4bef133152cff94a91a8c61d0448
|
4
|
+
data.tar.gz: 1c80344acb3e7f823259fdfb8c329927ffb4ef7a1166a48f0de27cfe8ab7a6cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 492f4243fd80eb5ae57b0824d774a588af5722992171a0e3e732cab7b28c0b771dade6221b50e98050a14153477be0b8304894575ac2871c6b8adae77700e519
|
7
|
+
data.tar.gz: b6c37c0eec5829fa359d9d0abc389f439c2382dc87914b76268a72ecfff4cd8821feefeb8301c35af96bcdc1047de226d06944ebed1ba617aae885e3ad3f6001
|
data/lib/yaml_extend.rb
CHANGED
@@ -50,7 +50,7 @@ module YAML
|
|
50
50
|
# Extended variant of the YAML.load_file method by providing the
|
51
51
|
# ability to inherit from other YAML file(s)
|
52
52
|
#
|
53
|
-
# @param [String] yaml_path the path to the yaml file to be loaded
|
53
|
+
# @param [String|Pathname] yaml_path the path to the yaml file to be loaded
|
54
54
|
# @param [String|Array] inheritance_key The key used in the yaml file to extend from another YAML file. Use an Array if you want to use a tree structure key like "options.extends" => ['options','extends']
|
55
55
|
# @param [Hash] options to pass, including deep_merge options as well as
|
56
56
|
# @option options [Boolean] :preserve_inheritance_key Preserve inheritance key(s) from resulting yaml, does most time not make sense especially in multiple inheritance - DEFAULT: false
|
@@ -77,10 +77,13 @@ module YAML
|
|
77
77
|
|
78
78
|
private
|
79
79
|
|
80
|
+
# Same doc as ext_load_file, but extended by additional parameter 'config'
|
80
81
|
#
|
81
|
-
# @param
|
82
|
+
# @param [Hash] config a hash to be merged into the result, usually only recursively called by the method itself
|
82
83
|
#
|
83
84
|
def self.ext_load_file_recursive(yaml_path, inheritance_key, options = {}, config)
|
85
|
+
# Allow also class Pathname instead of class String
|
86
|
+
yaml_path = yaml_path.to_s
|
84
87
|
# backward compatibility to 1.0.1
|
85
88
|
if options == true || options == false
|
86
89
|
options = {extend_existing_arrays: options}
|
data/lib/yaml_extend/version.rb
CHANGED