smarter_csv 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4426aea4be447cb000436980c4b8f34ac12d9683
4
- data.tar.gz: 5f15ed8a24db46241f02e672d099413445011238
3
+ metadata.gz: 48d8c593c902730176cc44664a1504ae041e984b
4
+ data.tar.gz: df04a687fb895502d6cebcc748a931dc060de4a7
5
5
  SHA512:
6
- metadata.gz: fbf06328d2e51caa2e66ba913b7a6b49d0db4d37caf932a7f66846db3a47207adc066be4d7df65c6b215bf20f3d6d5713f85b0c1e3e5cd1f930ca573949c69ff
7
- data.tar.gz: e098866b5d33c254136854853f5bd55bac89bcae93f286365518986a4d254d17ea116004a5367c5538a8dab6d8854bd6383109aac2889b503c20f86cc47c8f84
6
+ metadata.gz: 01582b2515dcad6d402ea6130ffafb5cadbbf04bc2bc13d8d57b73573642ad46fa8c5e3ca1b4d3b831a6bf1c46133fcba1149bce1635ad8d643af5aac1a83a86
7
+ data.tar.gz: d7c1b27060c6a8b1768b37f2fbad22e62cdc99d8c2deaff28753960a8bf5d31da7609d06bc7d799e3dbc940127672cf28d718362058564d997e4d020c0b01df0
data/README.md CHANGED
@@ -200,6 +200,9 @@ Or install it yourself as:
200
200
 
201
201
  ## Changes
202
202
 
203
+ #### 1.0.9 (2013-06-19)
204
+ * bugfix : fixed issue #13 with negative integers and floats not being correctly converted (thanks to Graham Wetzler)
205
+
203
206
  #### 1.0.8 (2013-06-01)
204
207
 
205
208
  * bugfix : fixed issue with nil values in inputs with quote-char (thanks to Félix Bellanger)
@@ -274,6 +277,7 @@ And a special thanks to those who contributed pull requests:
274
277
  * [Eustáquio Rangel](http://github.com/taq)
275
278
  * [Pavel](http://github.com/paxa)
276
279
  * [Félix Bellanger](https://github.com/Keeguon)
280
+ * [Graham Wetzler](https://github.com/grahamwetzler)
277
281
 
278
282
 
279
283
  ## Contributing
@@ -99,10 +99,10 @@ module SmarterCSV
99
99
  if options[:convert_values_to_numeric]
100
100
  hash.each do |k,v|
101
101
  case v
102
- when /^\d+$/
103
- hash[k] = v.to_i
104
- when /^\d+\.\d+$/
102
+ when /^[+-]?\d+\.\d+$/
105
103
  hash[k] = v.to_f
104
+ when /^[+-]?\d+$/
105
+ hash[k] = v.to_i
106
106
  end
107
107
  end
108
108
  end
@@ -1,3 +1,3 @@
1
1
  module SmarterCSV
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarter_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - |
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2013-06-01 00:00:00 Z
14
+ date: 2013-06-19 00:00:00 Z
15
15
  dependencies: []
16
16
 
17
17
  description: Ruby Gem for smarter importing of CSV Files as Array(s) of Hashes, with optional features for processing large files in parallel, embedded comments, unusual field- and record-separators, flexible mapping of CSV-headers to Hash-keys