yml_reader 0.3 → 0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/yml_reader/version.rb +1 -1
- data/lib/yml_reader.rb +2 -1
- data/spec/yml_reader/yml_reader_spec.rb +1 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02cbb257c6369b29ce93ff614fb487520a7aca53
|
4
|
+
data.tar.gz: b3a4bd09228aaee3b51d7c736d65e93220015dbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22881fa997fdeb0b2e636b6c2c1ee8c043f309a4bd15d344bceb5371304150ca10bb160dc7fbbfdce7b674de651cdd55d2c00976f435d1026393e6b58f5fd7f9
|
7
|
+
data.tar.gz: e2997f2874ba23a8e92bc5fc3ebdb68812dc2129b251ef587280655da734901d3082eb95f57ed2334148d01122a9359139f72234ec8d269be505f7b5a8a16fb9
|
data/ChangeLog
CHANGED
data/lib/yml_reader/version.rb
CHANGED
data/lib/yml_reader.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "yml_reader/version"
|
2
|
+
require 'yaml'
|
2
3
|
|
3
4
|
module YmlReader
|
4
5
|
|
@@ -23,7 +24,7 @@ module YmlReader
|
|
23
24
|
# directory specified by a call to the yml_directory= method.
|
24
25
|
#
|
25
26
|
def load(filename)
|
26
|
-
@yml = YAML.load(ERB.new(File.read("#{yml_directory}/#{filename}")).result)
|
27
|
+
@yml = ::YAML.load(ERB.new(File.read("#{yml_directory}/#{filename}")).result)
|
27
28
|
end
|
28
29
|
|
29
30
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'yaml'
|
2
3
|
|
3
4
|
module MyModule
|
4
5
|
extend YmlReader
|
@@ -24,11 +25,4 @@ describe YmlReader do
|
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
27
|
-
context "when reading yml files" do
|
28
|
-
it "should read files from the yml_directory" do
|
29
|
-
MyModule.yml_directory = 'conf'
|
30
|
-
YAML.should_receive(:load_file).with('conf/test').and_return({})
|
31
|
-
MyModule.load('test')
|
32
|
-
end
|
33
|
-
end
|
34
28
|
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.
|
4
|
+
version: '0.4'
|
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: 2014-
|
11
|
+
date: 2014-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Sets a directory and reads yml files
|
14
14
|
email:
|