isomer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/isomer/sources/yaml.rb +2 -2
- data/lib/isomer/version.rb +1 -1
- data/spec/isomer/sources/yaml_spec.rb +5 -0
- metadata +3 -3
data/lib/isomer/sources/yaml.rb
CHANGED
@@ -4,8 +4,8 @@ class Isomer::Sources::Yaml < Isomer::Sources::Base
|
|
4
4
|
attr_reader :file, :base, :required
|
5
5
|
|
6
6
|
def initialize(parameters, options={})
|
7
|
-
@file = options[:file]
|
8
|
-
raise Isomer::Error, "YAML source requires the 'file' parameter" if file.
|
7
|
+
@file = options[:file].to_s
|
8
|
+
raise Isomer::Error, "YAML source requires the 'file' parameter" if file.empty?
|
9
9
|
|
10
10
|
@base = options[:base]
|
11
11
|
@required = !!options[:required]
|
data/lib/isomer/version.rb
CHANGED
@@ -7,6 +7,11 @@ describe Isomer::Sources::Yaml do
|
|
7
7
|
Isomer::Sources::Yaml.new(anything)
|
8
8
|
}.to raise_error(Isomer::Error, "YAML source requires the 'file' parameter")
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'always converts the file to a string' do
|
12
|
+
source = Isomer::Sources::Yaml.new(anything, file: :foo)
|
13
|
+
source.file.should == 'foo'
|
14
|
+
end
|
10
15
|
end
|
11
16
|
|
12
17
|
describe '#load' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -107,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
segments:
|
109
109
|
- 0
|
110
|
-
hash:
|
110
|
+
hash: 2110058437799830098
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
none: false
|
113
113
|
requirements:
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
segments:
|
118
118
|
- 0
|
119
|
-
hash:
|
119
|
+
hash: 2110058437799830098
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
122
|
rubygems_version: 1.8.25
|