isomer 0.1.0 → 0.1.1

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.
@@ -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.nil? || file.empty?
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]
@@ -1,3 +1,3 @@
1
1
  module Isomer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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: 1846134878671279424
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: 1846134878671279424
119
+ hash: 2110058437799830098
120
120
  requirements: []
121
121
  rubyforge_project:
122
122
  rubygems_version: 1.8.25