util-params 0.2.13 → 0.2.14

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: 10f2fcbe620b6702655380199db9949d984173e3f1b80297f19c2fa8d5194a04
4
- data.tar.gz: c3cba740cd65c588c2c20f801695e553c5da9b6c13efcf28f6d6cd07c10fcd6b
3
+ metadata.gz: 4bbfd6fcaaf880b55406350dc06479b44c9baff72e3e650727e6aebc36bbf4ac
4
+ data.tar.gz: f7f8435b2333617454ae7c8726fbc308dca5607e539c639e8eb9c30e1aea1a02
5
5
  SHA512:
6
- metadata.gz: 5fa8adff458905f4ed04bc54cebc154fbf11d6461c0502b1953749451b072f40b9ed3a994b0225000dde390c08c76afb44a444ab008bb92a4e187a061e93116d
7
- data.tar.gz: f8650eb9a9ac89351578f378edd021230a8d1157b6228cd8e170f666ca6c4d32cea3096c3dc51441219e8bd7c9a04e02a9fc3f0f782d3f0bcefe624d7154870a
6
+ metadata.gz: 3e61ae2fd083797359649d85983936fa19d2cdd56022264f6d36c8a8d6782e077e73541b7f2e3421e5dcc7e88800b3a3760ffcbc87bc1ef3ba4c3e8d6c53b5fe
7
+ data.tar.gz: 74f29c417a7da06ce6b7a4f73bdadefee685026793322383afe7e66d810942445114c7ed308f301a65c0da9c1e5d1bd5b0baa38be47cc18e74093591ea712235
@@ -26,7 +26,10 @@ module Util
26
26
  key = options[:key]
27
27
  val = _load_val params.permit!.to_h, key, options[:default], options[:require]
28
28
 
29
- _push_error "*[#{key.to_s}] == nil" unless options[:null]
29
+ unless options[:null]
30
+ _push_error "*[#{key.to_s}] == nil" if val.nil?
31
+ end
32
+
30
33
  return nil if val.nil?
31
34
 
32
35
  _validate key, options[:type], val, options
@@ -1,5 +1,5 @@
1
1
  module Util
2
2
  module Params
3
- VERSION = "0.2.13"
3
+ VERSION = "0.2.14"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: util-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - unchi