cerulean 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cerulean.rb +2 -2
- 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: ff333f5e197758c6b4c0614f27179ca77824c62a
|
4
|
+
data.tar.gz: 598cb45f6432f5cb299ad14caad290cfed03a4c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a70d26556c3f14880db10ad313b3a90240db82699c840a9e9b2e574cb2c110f1162b821853a270f44de7cff41e7153f8436a35fe9affd515a77aee5dc33499
|
7
|
+
data.tar.gz: dd80aced8e677fce697dd9533465a7597806751306b490464c9a95ca4b66c10a1ed25f73c023b6fecba31133dcd4d0c38bcc67487476dd68097eb2293db18971
|
data/lib/cerulean.rb
CHANGED
@@ -87,7 +87,7 @@ module Cerulean
|
|
87
87
|
when 'Float'
|
88
88
|
Float(val) rescue false
|
89
89
|
when 'Boolean'
|
90
|
-
%w(true false).include?(val.downcase)
|
90
|
+
%w(true false).include?(val.to_s.downcase)
|
91
91
|
when 'Array[Integer]'
|
92
92
|
!val.any? { |el| !Integer(el) rescue true }
|
93
93
|
when 'Array[Float]'
|
@@ -127,7 +127,7 @@ module Cerulean
|
|
127
127
|
end
|
128
128
|
|
129
129
|
if opts.has_key?(:values)
|
130
|
-
unless opts[:values].include?(params[param])
|
130
|
+
unless opts[:values].map { |val| val.to_s }.include?(params[param])
|
131
131
|
raise "#{param} must be one of #{opts[:values]}"
|
132
132
|
end
|
133
133
|
end
|