typed_params 1.2.5 → 1.2.6

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: 93817bebe3143e4a3114ee89f5c58c955fd4d4a23867be62ef20f93dd92ebd87
4
- data.tar.gz: b14419375705f406a269ba2e0867b3e055c2a2ab01a239a54d9b74584c161b8c
3
+ metadata.gz: 2b621fc5ea6362816239e4c5090b7fb9879d74fc7857b14a35f38f238f4152ac
4
+ data.tar.gz: ad6356fcd549587faa23baa5fd27a1d2dc515a49ef332aa2b10fb2eba025cbff
5
5
  SHA512:
6
- metadata.gz: e48186a002e8d9ddca748706cf6efad6728e498f46d7b818980305644b6d7f2d61f2fdb873c38680f5ddcbb812b99ac0b0655da97ee2533e4908bea0e66b661b
7
- data.tar.gz: 0a9162c973fc0ec300fb5d4b6e95eb444469dab45ac338715e25622278febf62b378d0f71a11d917792763d291c552290799764f80912c8c27cbf075bc52d2c7
6
+ metadata.gz: 83cc91b95282b83e264fcd085c2269eb090106ae8769231e2af36c4738fb950df57a4e08e4b6e922a157858e8850847df1952d8091882d4578edc453c22741cd
7
+ data.tar.gz: 8ebdf734c19540796192f1d87cf8088cf53e1d3abb4b25e9d51da7db20753fbce71ed1e997aae622493f763c3e739402ab45eb3a7545d6fc9d5237d17344538b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.6
4
+
5
+ - Fix issue where an empty param of type `hash` or `array` would not raise when a required but `allow_nil` child param was missing.
6
+
3
7
  ## 1.2.5
4
8
 
5
9
  - Fix issue where a `minimum` and `maximum` constraint combo was not asserted by the `length:` validator.
data/README.md CHANGED
@@ -44,7 +44,7 @@ Sponsored by:
44
44
  </div>
45
45
  </a>
46
46
 
47
- _An open, source-available software licensing and distribution API._
47
+ _A fair source software licensing and distribution API._
48
48
 
49
49
  __
50
50
 
@@ -6,7 +6,7 @@ module TypedParams
6
6
  class Validator < Mapper
7
7
  def call(params)
8
8
  raise InvalidParameterError.new('is missing', path: schema.path, source: schema.source) if
9
- params.nil? && schema.required? && !schema.allow_nil?
9
+ params.nil? && schema.required?
10
10
 
11
11
  depth_first_map(params) do |param|
12
12
  schema = param.schema
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TypedParams
4
- VERSION = '1.2.5'
4
+ VERSION = '1.2.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typed_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeke Gabrielse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2025-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.4.19
121
+ rubygems_version: 3.5.11
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Define structured and strongly-typed parameter schemas for your Rails controllers.