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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10653bd834aa1d969eae811a6b28678294d9803eb7d5a80c104cedbbb4ce23bc
4
- data.tar.gz: 37b98892bd8d09f495175b1b7951054d29027490d4a6c3c9f3c8f476125f4b56
3
+ metadata.gz: 201e99bcd2bf59ad4ce96e1d3e8f33a1146c4bef133152cff94a91a8c61d0448
4
+ data.tar.gz: 1c80344acb3e7f823259fdfb8c329927ffb4ef7a1166a48f0de27cfe8ab7a6cc
5
5
  SHA512:
6
- metadata.gz: 666439b434d0c0d29462d4a71489eb59ee899250bb06f58dff732cf422b06b6314f7af6171705e266debfc030d9ccb521c8cbf26b9ea6aeff31d0f0320b075d5
7
- data.tar.gz: ac940216127d089503b9b515e17d60656a31d33187b0f3ab475162c20b27e7b49a14eb6ecc5305d56939273825af2d9ceefb8389ec4aacdb706362d1aef56681
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 config [Hash] a hash to be merged into the result, usually only recursivly called by the method itself
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}
@@ -1,3 +1,3 @@
1
1
  module YamlExtend
2
- VERSION = '1.1.3'.freeze
2
+ VERSION = '1.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_extend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthäus Beyrle