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 +4 -4
- data/Gemfile.lock +1 -1
- data/csv2hash.gemspec +1 -1
- data/lib/csv2hash/validator.rb +5 -1
- data/lib/csv2hash/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4090ad5c8ae287a7993eaa7dd625fb7afbd3e550
|
4
|
+
data.tar.gz: 005e9fade78e3197a82bc90e22239447b678544a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6451cd53411bbcb95227fba3a24d3022b89e2d739564065a4d4de9aba9b9de341940a21f5437f4700991c011d5cba85ac4e924e4707d0c0bd6baca793c6680d6
|
7
|
+
data.tar.gz: 70e8675bf35dfa087805d02ac8cd370e1ab8598f8e5763b901b37a578ca7571b3029657fcdf9c8abffaf83c54d6bea5baa6bce595b105f4fe9e1a067f0841a16
|
data/Gemfile.lock
CHANGED
data/csv2hash.gemspec
CHANGED
data/lib/csv2hash/validator.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/csv2hash/version.rb
CHANGED