mileszs-importex 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  class Integer
2
2
  def self.importex_value(str)
3
3
  unless str.blank?
4
- if str =~ /^[.\d]+$/
4
+ if str =~ /^[-]{0,1}[.\d]+$/
5
5
  str.to_i
6
6
  else
7
7
  raise Importex::InvalidCell, "Not a number."
@@ -13,7 +13,7 @@ end
13
13
  class Float
14
14
  def self.importex_value(str)
15
15
  unless str.blank?
16
- if str =~ /^[.\d]+$/
16
+ if str =~ /^[-]{0,1}[.\d]+$/
17
17
  str.to_f
18
18
  else
19
19
  raise Importex::InvalidCell, "Not a number."
data/lib/importex.rb CHANGED
@@ -2,6 +2,7 @@ require 'spreadsheet'
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/importex/base')
4
4
  require File.expand_path(File.dirname(__FILE__) + '/importex/column')
5
+ require File.expand_path(File.dirname(__FILE__) + '/importex/core_ext/blank.rb')
5
6
  require File.expand_path(File.dirname(__FILE__) + '/importex/core_ext/importex_value.rb')
6
7
 
7
8
  module Importex
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Bates