evnt 3.7.0 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evnt/command.rb +8 -8
- data/lib/evnt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb29bb9eec0adfac7fc889e5f0dc86eaf8863e84083f68a3ded39c45e369bec
|
4
|
+
data.tar.gz: 9a864208218df24499811d4b68318959c199d83f6c69bafd2d87287aa72f2016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a468042f19b2f15e45c0779c85e6f3239240fd19a3f20adb3df71963980e0e79d218b3c5c8e23b66e153835f23996862b484a1f32d0201d52d695125cbb24f9d
|
7
|
+
data.tar.gz: 225ae9bd0463a58430f02043984d549ba6b33de0a99969ae7e64b77917b62710e57bbc6da87670836167496f52511c2cc19910fa84e586a13ef642f4c4f30ef1
|
data/lib/evnt/command.rb
CHANGED
@@ -144,18 +144,18 @@ module Evnt
|
|
144
144
|
value_to_validate = _value_to_validate(val)
|
145
145
|
validator = Evnt::Validator.new(value_to_validate, val[:options])
|
146
146
|
|
147
|
-
passed
|
148
|
-
passed = false if !validator.passed?
|
149
|
-
passed = false if val[:options][:do] && !send(val[:options][:do])
|
150
|
-
|
151
|
-
if passed
|
152
|
-
@params[val[:param]] = validator.value
|
153
|
-
else
|
147
|
+
unless validator.passed?
|
154
148
|
error = val[:options][:err] || "#{val[:param].capitalize} value not accepted"
|
155
149
|
err_code = val[:options][:err_code] || val[:param].to_sym
|
156
|
-
err(error, code: err_code)
|
150
|
+
err(error, code: err_code)
|
151
|
+
break
|
152
|
+
end
|
153
|
+
|
154
|
+
if val[:options][:do] && !send(val[:options][:do])
|
157
155
|
break
|
158
156
|
end
|
157
|
+
|
158
|
+
@params[val[:param]] = validator.value
|
159
159
|
end
|
160
160
|
|
161
161
|
@params
|
data/lib/evnt/version.rb
CHANGED