yml_reader 0.6 → 0.7

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
  SHA1:
3
- metadata.gz: abcb76b45e302e5d4d1f023f67736d74c61f6b3a
4
- data.tar.gz: 18bd608be37156033de23f7615de98ab03ba44e3
3
+ metadata.gz: d84ccd4325bd47330e821aa20216c28e276d4e53
4
+ data.tar.gz: 378a328ddcdddcb7ef9b92f34f10873a672d392d
5
5
  SHA512:
6
- metadata.gz: 2973bc536c44157cf875ec8b349f42eaf7d4c16df7ebd71e73e14b04ed5ab08df554bee41c94f8ba0526f7c5da1fd0e28366f644346eb248b389502a0b611d88
7
- data.tar.gz: 7e7c0621650e06e3e080ff1d386c34217adf1f80f4d867a3c7c8a15b6f51f723298f893d513244f512927e82dff0b006d051ddc7f859bec5809227b9597244ca
6
+ metadata.gz: 4f8300193986f71e8985f6a1359489e0c9d273d1f51591a46bf4b9a8646d944ec6d54440226c03ba24fe93ec5aa7f926a039d65bc1fa3643c32fb48d17fb6c84
7
+ data.tar.gz: 33aab24c6deddc6746b17ad1340445a1ed81cd4b68a87e3675cbd6b1aa19a2673795b22012d9a504c189b914e955cb1c362fb27b8363ffcafaa2ed97f7392587
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ === Version 0.7 / 2016-1-6
2
+ * Enhancements
3
+ * Added ability to supply multiple files to load via the load method (Thanks Justin Commu)
4
+
1
5
  === Version 0.6 / 2015-12-1
2
6
  * Enhancements
3
7
  * Added include_yml keyword to allow inclusion of one file within another (thanks Donavan Stanley)
@@ -23,11 +23,16 @@ module YmlReader
23
23
  #
24
24
  # Loads the requested file. It will look for the file in the
25
25
  # directory specified by a call to the yml_directory= method.
26
+ # The parameter can also be a comma delimited list of files to
27
+ # load and merge.
26
28
  #
27
29
  def load(filename)
28
- @yml = ::YAML.load(ERB.new(File.read("#{yml_directory}/#{filename}")).result(binding))
30
+ files= filename.include?(',') ? filename.split(',') : [filename]
31
+ @yml = files.inject({}) do |total_merge,file|
32
+ total_merge.merge!(::YAML.load(ERB.new(File.read("#{yml_directory}/#{file}")).result(binding)))
33
+ end
29
34
  end
30
-
35
+
31
36
  def include_yml(filename)
32
37
  ERB.new(IO.read("#{yml_directory}/#{filename}")).result
33
38
  end
@@ -1,3 +1,3 @@
1
1
  module YmlReader
2
- VERSION = "0.6"
2
+ VERSION = "0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yml_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: '0.7'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeffrey S. Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-01 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Sets a directory and reads yml files
14
14
  email: