hanami-controller 2.1.0.rc1 → 2.1.0.rc2

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: daf2c6091f7e6fbff6ffbdd826b548250b32b0e52a475b8c7c9c1997fb307fa8
4
- data.tar.gz: 43729833cfcac37032afafbab8172b82b00e5280b1e5c3e5a28432a25b4c17db
3
+ metadata.gz: a9d4981a4c7901ff4be64ae0a339886817da04a071e7490f440f745d971e4212
4
+ data.tar.gz: ffc574ca14b030a7e23b2b035f3df04f83c4b20aaca203c76dea61971cbb86e2
5
5
  SHA512:
6
- metadata.gz: af07362be43e8174a48f90abb1c77fecc4abb221f95c4e38db0a7f9848e5763e58f3d03e56adfc4fd14892b8e81ee0dd3860731c4c26c8b5ff1df3214cc16d38
7
- data.tar.gz: 750e1b4d42ca5433041c654d5a417f3c4408241387f4af13e1464af9f1eca20f4085c163ee2657fd7129af45405ca15ffd82a89d721fa65eb02680b0de4bd789
6
+ metadata.gz: 9a579c0418d491bf872afddd9143043702d0f6f96b7b3bc47f5f56c6600f74da9da0cb8370b6cd103ad0c616285e2035b4cddd7cb94c0fcc0e78e4b7ae61311d
7
+ data.tar.gz: e4acfb84cd8610a9b81139e12730880484a5e6a7ec96fe518942256579bcaa6cd6fffe62221032633e26574e46d9bfaa38c1bd1fd46bec7e672e44d9490b4cdd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Complete, fast and testable actions for Rack
4
4
 
5
+ ## v2.1.0.rc2 - 2023-11-08
6
+
5
7
  ## v2.1.0.rc1 - 2023-11-01
6
8
 
7
9
  ### Fixed
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = ">= 3.0"
22
22
 
23
23
  spec.add_dependency "rack", "~> 2.0"
24
- spec.add_dependency "hanami-utils", "~> 2.0"
24
+ spec.add_dependency "hanami-utils", "~> 2.1.rc"
25
25
  spec.add_dependency "dry-configurable", "~> 1.0", "< 2"
26
26
  spec.add_dependency "dry-core", "~> 1.0"
27
27
  spec.add_dependency "zeitwerk", "~> 2.6"
@@ -80,7 +80,7 @@ module Hanami
80
80
  end
81
81
  end
82
82
 
83
- # Set the response status
83
+ # Sets the response status.
84
84
  #
85
85
  # @param code [Integer, Symbol] the status code
86
86
  #
@@ -101,11 +101,21 @@ module Hanami
101
101
  super(Http::Status.lookup(code))
102
102
  end
103
103
 
104
- # This is NOT RELEASED with 2.0.0
104
+ # Sets the response body from the rendered view.
105
105
  #
106
- # @api private
107
- def render(view, **options)
108
- self.body = view.(**view_options.(request, self), **exposures.merge(options)).to_str
106
+ # @param view [Hanami::View] the view to render
107
+ # @param input [Hash] keyword arguments to pass to the view's `#call` method
108
+ #
109
+ # @api public
110
+ # @since 2.1.0
111
+ def render(view, **input)
112
+ view_input = {
113
+ **view_options.call(request, self),
114
+ **exposures,
115
+ **input
116
+ }
117
+
118
+ self.body = view.call(**view_input).to_str
109
119
  end
110
120
 
111
121
  # Returns the format for the response.
@@ -8,6 +8,6 @@ module Hanami
8
8
  #
9
9
  # @since 0.1.0
10
10
  # @api public
11
- VERSION = "2.1.0.rc1"
11
+ VERSION = "2.1.0.rc2"
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.rc1
4
+ version: 2.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-01 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: 2.1.rc
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: 2.1.rc
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-configurable
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  - !ruby/object:Gem::Version
223
223
  version: 1.3.1
224
224
  requirements: []
225
- rubygems_version: 3.4.13
225
+ rubygems_version: 3.4.21
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Complete, fast and testable actions for Rack and Hanami