sinatra-param-validator 0.15.0 → 0.16.0

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: 0635a378cefa1851f127f94720dbcdb8a6abe12093af7fcdafcccb5066c3a10d
4
- data.tar.gz: 2a8fe28e566133d4e72aa0188824f184a02984475dc1f79796d3d7a98e914957
3
+ metadata.gz: c6ca19a9842af1724e306e23e2f35e7c68a7a3f51033a511ab0a373804782d02
4
+ data.tar.gz: c7d4e25ed4955248102c235bcf34b6cb8372b34315d0fc79d2e5cffb7588efa8
5
5
  SHA512:
6
- metadata.gz: 4ff032b54cf35d989b81613ee6b965a40a8b18699d183fdeef32c08a5b0d8a520415ec43a270c6b84d288446bae8813fd17a8eb9f1d5c77fcee3ad8b8eb5bb63
7
- data.tar.gz: adc4c502ff12a8730598c28c13871ecd52e4c8749bbe4c5ea7b9256727cd3997b9b31152e4d22c3e908ae39eca8c40b236a65ebf8c7e5ff1dfa41fd75b632b7d
6
+ metadata.gz: e39d7290c4df32d5eb7a93c7c7098e129b3c7e818de68c6e78af95c0a7ca3c15bcce15d447751b1c87962ec53fc7a9f4d002e3bea07764fc5e03bb2e5e0cbf34
7
+ data.tar.gz: dba6a7b0a516f7bb182628c57e8e88c2385ffa630552b81fb443cb0cb20e7e3c1f3866e6dfe802bdfc91b8d24be965c868ce8a5eb712ff37459fba1892562b8b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.16.0] - 2022-07-19
4
+
5
+ - Set default value for nil parameters
6
+
3
7
  ## [0.15.0] - 2022-07-19
4
8
 
5
9
  - Pass message to raised exception
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinatra-param-validator (0.15.0)
4
+ sinatra-param-validator (0.16.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -58,7 +58,7 @@ module Sinatra
58
58
  end
59
59
 
60
60
  def _update_params_hash(key, parameter, default)
61
- if params.key?(key)
61
+ if params.key?(key) && !params[key].nil?
62
62
  params[key] = parameter.coerced unless parameter.coerced.nil?
63
63
  elsif !default.nil?
64
64
  params[key] = default.respond_to?(:call) ? default.call : default
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sinatra
4
4
  module ParamValidator
5
- VERSION = '0.15.0'
5
+ VERSION = '0.16.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-param-validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Selby