sinatra-param-validator 0.16.0 → 0.16.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: c6ca19a9842af1724e306e23e2f35e7c68a7a3f51033a511ab0a373804782d02
4
- data.tar.gz: c7d4e25ed4955248102c235bcf34b6cb8372b34315d0fc79d2e5cffb7588efa8
3
+ metadata.gz: 78acd25fda0c630a67c5ce3e2b24a9300c70432b40621a1ebd2822e4d63a549b
4
+ data.tar.gz: 6ad51ab220feb9b3ec422532d1ae46bc2b812ec9969eec4e3b7a5b6b0387f4a6
5
5
  SHA512:
6
- metadata.gz: e39d7290c4df32d5eb7a93c7c7098e129b3c7e818de68c6e78af95c0a7ca3c15bcce15d447751b1c87962ec53fc7a9f4d002e3bea07764fc5e03bb2e5e0cbf34
7
- data.tar.gz: dba6a7b0a516f7bb182628c57e8e88c2385ffa630552b81fb443cb0cb20e7e3c1f3866e6dfe802bdfc91b8d24be965c868ce8a5eb712ff37459fba1892562b8b
6
+ metadata.gz: 224a086b11dc650444326980951756850ae049e4f09b17dac6ae73881327ae694ca2c38f3855887300ebeeed6a9fc36d61651d61884cbe237f057d964858e6e2
7
+ data.tar.gz: 1b80d184a2e078f22a265cfcc3d38aa083f4cb6ad0e0850d193b5c39ef2bbe190ea87c7edbd628c9b3121472b7704367d58e9e9a8c4b357338daf14c0e70d8cf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.16.1] - 2022-07-19
4
+
5
+ - Fix URIs in gemspec
6
+
3
7
  ## [0.16.0] - 2022-07-19
4
8
 
5
9
  - Set default value for nil parameters
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinatra-param-validator (0.16.0)
4
+ sinatra-param-validator (0.16.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -59,11 +59,19 @@ module Sinatra
59
59
 
60
60
  def _update_params_hash(key, parameter, default)
61
61
  if params.key?(key) && !params[key].nil?
62
- params[key] = parameter.coerced unless parameter.coerced.nil?
62
+ _set_param_to_coerced key, parameter
63
63
  elsif !default.nil?
64
- params[key] = default.respond_to?(:call) ? default.call : default
64
+ _set_param_to_default key, default
65
65
  end
66
66
  end
67
+
68
+ def _set_param_to_coerced(key, parameter)
69
+ params[key] = parameter.coerced unless parameter.coerced.nil?
70
+ end
71
+
72
+ def _set_param_to_default(key, default)
73
+ params[key] = default.respond_to?(:call) ? default.call : default
74
+ end
67
75
  end
68
76
  end
69
77
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sinatra
4
4
  module ParamValidator
5
- VERSION = '0.16.0'
5
+ VERSION = '0.16.1'
6
6
  end
7
7
  end
@@ -9,13 +9,13 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ['rick@selby-family.co.uk']
10
10
 
11
11
  spec.summary = 'Validation of parameters for Sinatra'
12
- spec.homepage = 'https://github.com/rickselby/sinatra-param_validator-validator'
12
+ spec.homepage = 'https://github.com/rickselby/sinatra-param-validator'
13
13
  spec.license = 'MIT'
14
14
  spec.required_ruby_version = '>= 2.6.0'
15
15
 
16
- spec.metadata['changelog_uri'] = 'https://github.com/rickselby/sinatra-param_validator-validator/CHANGELOG.md'
16
+ spec.metadata['changelog_uri'] = 'https://github.com/rickselby/sinatra-para-validator/CHANGELOG.md'
17
17
  spec.metadata['homepage_uri'] = spec.homepage
18
- spec.metadata['source_code_uri'] = 'https://github.com/rickselby/sinatra-param_validator-validator'
18
+ spec.metadata['source_code_uri'] = 'https://github.com/rickselby/sinatra-param-validator'
19
19
  spec.metadata['rubygems_mfa_required'] = 'true'
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
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.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Selby
@@ -166,13 +166,13 @@ files:
166
166
  - lib/sinatra/param_validator/validator/url_param.rb
167
167
  - lib/sinatra/param_validator/version.rb
168
168
  - sinatra-param-validator.gemspec
169
- homepage: https://github.com/rickselby/sinatra-param_validator-validator
169
+ homepage: https://github.com/rickselby/sinatra-param-validator
170
170
  licenses:
171
171
  - MIT
172
172
  metadata:
173
- changelog_uri: https://github.com/rickselby/sinatra-param_validator-validator/CHANGELOG.md
174
- homepage_uri: https://github.com/rickselby/sinatra-param_validator-validator
175
- source_code_uri: https://github.com/rickselby/sinatra-param_validator-validator
173
+ changelog_uri: https://github.com/rickselby/sinatra-para-validator/CHANGELOG.md
174
+ homepage_uri: https://github.com/rickselby/sinatra-param-validator
175
+ source_code_uri: https://github.com/rickselby/sinatra-param-validator
176
176
  rubygems_mfa_required: 'true'
177
177
  post_install_message:
178
178
  rdoc_options: []