csv2hash 0.1 → 0.1.1

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: a139a39be73ed85cce068c4b1b34c564a7c5a7a7
4
- data.tar.gz: 26ad3fe5d1ce458dfcd8dd4269d519f419f79592
3
+ metadata.gz: 4090ad5c8ae287a7993eaa7dd625fb7afbd3e550
4
+ data.tar.gz: 005e9fade78e3197a82bc90e22239447b678544a
5
5
  SHA512:
6
- metadata.gz: 9270e2cf190351a68be08114049fb16392769da65b3fb8eb03206f699a898bf8a99e21d3cf6f6fd28196dfbd3197cb9f0918f3563205d2c1b0d1ddf3064a6b5c
7
- data.tar.gz: 55f28e1b266ca939c901d47d61bb6bd58b91d25506e764da2bab3ae62b9022ff190f630b29cb199a7a09f33714d367b7506e51c9d3a5c696095d5b58073de82c
6
+ metadata.gz: 6451cd53411bbcb95227fba3a24d3022b89e2d739564065a4d4de9aba9b9de341940a21f5437f4700991c011d5cba85ac4e924e4707d0c0bd6baca793c6680d6
7
+ data.tar.gz: 70e8675bf35dfa087805d02ac8cd370e1ab8598f8e5763b901b37a578ca7571b3029657fcdf9c8abffaf83c54d6bea5baa6bce595b105f4fe9e1a067f0841a16
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv2hash (0.1)
4
+ csv2hash (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/csv2hash.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |spec|
2
2
 
3
3
  spec.name = 'csv2hash'
4
- spec.version = '0.1'
4
+ spec.version = '0.1.1'
5
5
  spec.date = '2013-11-26'
6
6
  spec.summary = %q{Mapping a CSV to a Ruby Hash}
7
7
  spec.description = %q{DSL to map a CSV to a Ruby Hash}
@@ -25,7 +25,11 @@ class Csv2hash
25
25
  raise unless extra_validator.valid? rule, value
26
26
  else
27
27
  if value && (values = rule.fetch :values)
28
- raise unless values.include?(value)
28
+ if values.class == Range
29
+ raise unless values.include?(value.to_f)
30
+ else
31
+ raise unless values.include?(value)
32
+ end
29
33
  end
30
34
  end
31
35
  rescue => e
@@ -1,3 +1,3 @@
1
1
  module Cvs2hash
2
- VERSION = '0.1'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv2hash
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel AZEMAR