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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19a7acc9d64b98809081a762d0cd9dfe2ac415107acfb0d0160ccae7f3f755c5
4
- data.tar.gz: d963460e9578d90d2e7991a7b8b97ca976b161af1e5aa6b2dc7e8cd558b09401
3
+ metadata.gz: adb29bb9eec0adfac7fc889e5f0dc86eaf8863e84083f68a3ded39c45e369bec
4
+ data.tar.gz: 9a864208218df24499811d4b68318959c199d83f6c69bafd2d87287aa72f2016
5
5
  SHA512:
6
- metadata.gz: b9b1650f5aad74d4ea0f5eea769ff8387b360fcfb52722e06b6c1c106ba7f8d3ce6bd57f562cf9466267d0a763e16ec42ab3e4cc5d5a258bef922eb428b18174
7
- data.tar.gz: 5f2e52f10970c91be2476dcef02b5aa09835e658eb7dfc6f820387a07417709cf86f2e119967e72334a6eca7f500fc2b4650aeac027728cc9738ab749289d062
6
+ metadata.gz: a468042f19b2f15e45c0779c85e6f3239240fd19a3f20adb3df71963980e0e79d218b3c5c8e23b66e153835f23996862b484a1f32d0201d52d695125cbb24f9d
7
+ data.tar.gz: 225ae9bd0463a58430f02043984d549ba6b33de0a99969ae7e64b77917b62710e57bbc6da87670836167496f52511c2cc19910fa84e586a13ef642f4c4f30ef1
@@ -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 = true
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) if !val[:options][:do]
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
@@ -3,6 +3,6 @@
3
3
  # Evnt.
4
4
  module Evnt
5
5
 
6
- VERSION = '3.7.0'
6
+ VERSION = '3.7.1'
7
7
 
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evnt
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ideonetwork