marmalade 0.0.3 → 0.0.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.
@@ -22,7 +22,7 @@ module Marmalade
22
22
  private
23
23
 
24
24
  def read_line(file_handle, options)
25
- line = file_handle.gets.strip
25
+ line = (file_handle.gets || '').strip
26
26
  integers = [:int, :integer].include?(options[:type])
27
27
  if options[:split]
28
28
  line_a = line.split(' ')
@@ -1,3 +1,3 @@
1
1
  module Marmalade
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -22,6 +22,11 @@ describe Marmalade::FileReader do
22
22
  reader = build_reader("\thello world ")
23
23
  reader.read(:foo).should == { :foo => "hello world" }
24
24
  end
25
+
26
+ it "will read an empty line as an empty string" do
27
+ reader = build_reader(nil)
28
+ reader.read(:empty).should == { :empty => "" }
29
+ end
25
30
  end
26
31
 
27
32
  context "reading integers" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marmalade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-08 00:00:00.000000000 Z
12
+ date: 2013-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: trollop