hanami-view 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f8990dc878c7a9761d609b1051b25044d6d5f9b33cefa4cb33bd4f02d0a3b00
4
- data.tar.gz: 2d61d1fc369af06ce6aa83a4e46a97f26cc024a095eb361276e8834b3713208f
3
+ metadata.gz: 6622b0b75e291a41cce8f7a9d41c41f22aef610a6ee1a3f87516d2c973c24f5e
4
+ data.tar.gz: 729928db32dee73dd372a220672ef1f447643f0661044079956492b892a04d51
5
5
  SHA512:
6
- metadata.gz: ab11aac3718b22e57bbb7165fa79f1498349b5e7c185c27d09ab68dd7bf8e21fa5ff093c163346c7cb9daf75ef1576b3dad8e234bd62e357aaad0c3000ca7006
7
- data.tar.gz: 2d2cc18703307b0624353946562cc33ae97374ab7a9c438e249174346365048d8d657b1cbefb4bbb0fb4a76068241d2e66e753aa6d8c0a3d07aa79ba231bae8a
6
+ metadata.gz: 1d422fca15d310702492a735112ade9f711ee18a0a8b578d358ad76e5bb252374ab64056842d8af42842a4e1c5804a8ef2ac5e5416333ca56fa54193e6a11fa2
7
+ data.tar.gz: d84007072de7c1b2d47bd3d1fcfcd5076e9f9c66f7ea3111d4f3679003626d26a0dc6bf6774a4891691bbd77080f58ab157caa26d9cba91a920cb50a1555ed6f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  View layer for Hanami
4
4
 
5
+ ## v2.3.1 - 2025-11-22
6
+
7
+ ### Fixed
8
+
9
+ - Pass through all input arguments when exposure procs receive a keyword splat. (@jaredcwhite in #269)
10
+
5
11
  ## v2.3.0 - 2025-11-12
6
12
 
7
13
  ### Fixed
@@ -12,7 +12,7 @@ module Hanami
12
12
  include Dry::Equalizer(:name, :proc, :object, :options)
13
13
 
14
14
  EXPOSURE_DEPENDENCY_PARAMETER_TYPES = %i[req opt].freeze
15
- INPUT_PARAMETER_TYPES = %i[key keyreq keyrest].freeze
15
+ KEYWORD_INPUT_PARAMETER_TYPES = %i[key keyreq].freeze
16
16
 
17
17
  # @api private
18
18
  # @since 2.1.0
@@ -70,7 +70,7 @@ module Hanami
70
70
  @input_keys ||=
71
71
  if proc
72
72
  proc.parameters.each_with_object([]) { |(type, name), keys|
73
- keys << name if INPUT_PARAMETER_TYPES.include?(type)
73
+ keys << name if KEYWORD_INPUT_PARAMETER_TYPES.include?(type)
74
74
  }
75
75
  else
76
76
  []
@@ -147,9 +147,17 @@ module Hanami
147
147
  end
148
148
 
149
149
  def proc_input_args(input)
150
- input_keys.each_with_object({}) { |key, args|
150
+ args = {}
151
+
152
+ if proc.parameters.any? { |(type, _name)| type == :keyrest }
153
+ args.merge! input.except(:context)
154
+ end
155
+
156
+ input_keys.each { |key|
151
157
  args[key] = input[key] if input.key?(key)
152
158
  }
159
+
160
+ args
153
161
  end
154
162
 
155
163
  def prepare_proc(proc, object)
@@ -4,6 +4,6 @@ module Hanami
4
4
  class View
5
5
  # @api public
6
6
  # @since 0.1.0
7
- VERSION = "2.3.0"
7
+ VERSION = "2.3.1"
8
8
  end
9
9
  end
data/lib/hanami/view.rb CHANGED
@@ -342,7 +342,7 @@ module Hanami
342
342
  # default values for these parameters to make the corresponding input
343
343
  # keys optional
344
344
  # - To receive the Context object, provide a `context:` keyword parameter
345
- # - To receive the view's input arguments in their entirey, provide a
345
+ # - To receive the view's input arguments in their entirety, provide a
346
346
  # keywords splat parameter (i.e. `**input`)
347
347
  #
348
348
  # @example Accessing input arguments
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanakai team