hanami-controller 2.1.0.rc1 → 2.1.0.rc3

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: 478fabc4a6d3fa4f5d541747469531cd9f1c66464926f3601788bd022c4ac3e9
4
+ data.tar.gz: 4a8c91e858931eedaca394a3ab0edb7d93964ee7d0d86ae057ed7cb47d536679
5
5
  SHA512:
6
- metadata.gz: af07362be43e8174a48f90abb1c77fecc4abb221f95c4e38db0a7f9848e5763e58f3d03e56adfc4fd14892b8e81ee0dd3860731c4c26c8b5ff1df3214cc16d38
7
- data.tar.gz: 750e1b4d42ca5433041c654d5a417f3c4408241387f4af13e1464af9f1eca20f4085c163ee2657fd7129af45405ca15ffd82a89d721fa65eb02680b0de4bd789
6
+ metadata.gz: 413668c4bf764d2b8f5578c11bca85a963ebd8ba4988ae6ec503e7bbe5944451ba70b7c0177ad326c5a68e58f2368471636cc922785b4b1b67b9fbe349ddf685
7
+ data.tar.gz: 7437bfda0d780f394b9c7dbeb3bdeda9aaf98ea369b6ee319777de402ed1ee3bf2fb69584d855efece1fd54c19a0eb5dc7b60107ac10b5e94d1a69dffc45c80a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Complete, fast and testable actions for Rack
4
4
 
5
+ ## v2.1.0.rc3 - 2024-02-16
6
+
7
+ ## v2.1.0.rc2 - 2023-11-08
8
+
5
9
  ## v2.1.0.rc1 - 2023-11-01
6
10
 
7
11
  ### 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.rc3"
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.rc3
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: 2024-02-16 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
@@ -218,11 +218,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
218
218
  version: '3.0'
219
219
  required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  requirements:
221
- - - ">"
221
+ - - ">="
222
222
  - !ruby/object:Gem::Version
223
- version: 1.3.1
223
+ version: '0'
224
224
  requirements: []
225
- rubygems_version: 3.4.13
225
+ rubygems_version: 3.5.6
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Complete, fast and testable actions for Rack and Hanami