hanami-view 2.3.0.beta2 → 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: ef12d146f11db5e424f5fe5ac0190cca1608076939d0d4be6c775c6493374f8f
4
- data.tar.gz: 1879049d2b4af376bc3e0788f759ea6032b68a979f38ab0191f1584b227ed3d9
3
+ metadata.gz: 6622b0b75e291a41cce8f7a9d41c41f22aef610a6ee1a3f87516d2c973c24f5e
4
+ data.tar.gz: 729928db32dee73dd372a220672ef1f447643f0661044079956492b892a04d51
5
5
  SHA512:
6
- metadata.gz: 7f5155e6506b1d8fc3ea372360463ca52cf3ac75fe9136ba445f21ae544dab140c1d091e2cab191824400f45f78127daf4086ea908d900f5bbd447b85127e1d7
7
- data.tar.gz: 9e5ea33dc5d2022296ddc1ae0215688a98855b58fb5b973615bc441cba15b271fae26f0ed8e46edfe8ffd6919949463b483674cdd572ac44b44d158e54e31728
6
+ metadata.gz: 1d422fca15d310702492a735112ade9f711ee18a0a8b578d358ad76e5bb252374ab64056842d8af42842a4e1c5804a8ef2ac5e5416333ca56fa54193e6a11fa2
7
+ data.tar.gz: d84007072de7c1b2d47bd3d1fcfcd5076e9f9c66f7ea3111d4f3679003626d26a0dc6bf6774a4891691bbd77080f58ab157caa26d9cba91a920cb50a1555ed6f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
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
+
11
+ ## v2.3.0 - 2025-11-12
12
+
13
+ ### Fixed
14
+
15
+ - Avoid warnings (from deprecated `URI::RFC3986_PARSER.extract`) in escape helper. (@timriley in #267)
16
+
5
17
  ## v2.3.0.beta2 - 2025-10-17
6
18
 
7
19
  ### Changed
data/README.md CHANGED
@@ -6,8 +6,6 @@ A view layer for [Hanami](http://hanamirb.org)
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/hanami-view.svg)](https://badge.fury.io/rb/hanami-view)
8
8
  [![CI](https://github.com/hanami/view/actions/workflows/ci.yml/badge.svg)](https://github.com/hanami/view/actions?query=workflow%3Aci+branch%3Amain)
9
- [![Test Coverage](https://codecov.io/gh/hanami/view/branch/main/graph/badge.svg)](https://codecov.io/gh/hanami/view)
10
- [![Depfu](https://badges.depfu.com/badges/7cd17419fba78b726be1353118fb01de/overview.svg)](https://depfu.com/github/hanami/view?project=Bundler)
11
9
 
12
10
  ## Contact
13
11
 
@@ -20,8 +18,6 @@ A view layer for [Hanami](http://hanamirb.org)
20
18
 
21
19
  ## Rubies
22
20
 
23
- __Hanami::View__ supports Ruby (MRI) 3.1+
24
-
25
21
  ## Installation
26
22
 
27
23
  Add this line to your application's Gemfile:
data/hanami-view.gemspec CHANGED
@@ -6,14 +6,14 @@ require 'hanami/view/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'hanami-view'
9
- spec.authors = ["Tim Riley", "Piotr Solnica"]
10
- spec.email = ["tim@icelab.com.au", "piotr.solnica@gmail.com"]
9
+ spec.authors = ["Hanakai team"]
10
+ spec.email = ["info@hanakai.org"]
11
11
  spec.license = 'MIT'
12
12
  spec.version = Hanami::View::VERSION.dup
13
13
 
14
14
  spec.summary = "A complete, standalone view rendering system that gives you everything you need to write well-factored view code"
15
15
  spec.description = spec.summary
16
- spec.homepage = 'https://dry-rb.org/gems/hanami-view'
16
+ spec.homepage = 'https://hanamirb.org'
17
17
  spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "hanami-view.gemspec", "lib/**/*"]
18
18
  spec.bindir = 'bin'
19
19
  spec.executables = []
@@ -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)
@@ -120,12 +120,19 @@ module Hanami
120
120
  def sanitize_url(input, permitted_schemes = PERMITTED_URL_SCHEMES)
121
121
  return input if input.html_safe?
122
122
 
123
- URI::DEFAULT_PARSER.extract(
123
+ URI_PARSER.extract(
124
124
  URI.decode_www_form_component(input.to_s),
125
125
  permitted_schemes
126
126
  ).first.to_s.html_safe
127
127
  end
128
128
 
129
+ # Use the RFC2396_PARSER if available. Modern Rubies should have RFC2396_PARSER available.
130
+ # Otherwise, fall back to the DEFAULT_PARSER (which may still raise deprecation warnings).
131
+ #
132
+ # @api private
133
+ URI_PARSER = URI.const_defined?(:RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER
134
+ private_constant :URI_PARSER
135
+
129
136
  # @api private
130
137
  # @since 2.1.0
131
138
  PERMITTED_URL_SCHEMES = %w[http https mailto].freeze
@@ -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.beta2"
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,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.beta2
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
- - Tim Riley
8
- - Piotr Solnica
7
+ - Hanakai team
9
8
  bindir: bin
10
9
  cert_chain: []
11
10
  date: 1980-01-02 00:00:00.000000000 Z
@@ -151,8 +150,7 @@ dependencies:
151
150
  description: A complete, standalone view rendering system that gives you everything
152
151
  you need to write well-factored view code
153
152
  email:
154
- - tim@icelab.com.au
155
- - piotr.solnica@gmail.com
153
+ - info@hanakai.org
156
154
  executables: []
157
155
  extensions: []
158
156
  extra_rdoc_files: []
@@ -192,7 +190,7 @@ files:
192
190
  - lib/hanami/view/tilt/haml_adapter.rb
193
191
  - lib/hanami/view/tilt/slim_adapter.rb
194
192
  - lib/hanami/view/version.rb
195
- homepage: https://dry-rb.org/gems/hanami-view
193
+ homepage: https://hanamirb.org
196
194
  licenses:
197
195
  - MIT
198
196
  metadata: