hanami-controller 2.2.0.beta2 → 2.2.0

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: 60b2a7ff4db376b8ef573c5141910b643630febd016d1019d5df4f17a2b29c76
4
- data.tar.gz: 3c721bd675ef9cfbb397666dc21080fa8c2c4d2cc771f43dec87eef84511dc1b
3
+ metadata.gz: d36e2731984ff92e89c99426d31d8e7e2fdb99712bae1b8aaaab7d2eaa46bb5d
4
+ data.tar.gz: 130d03fa13e2c842c957b29122e8787b6d93d09fda984261b917ca8dc39cc25a
5
5
  SHA512:
6
- metadata.gz: 7a1aa20043ecad3e5e79a008f142bc9274f6df4d1ebae9929454263214ecbec0c9449016b376879d296737f5df69e2bfbf5be4da5d5c0bbb128a38fea5d84203
7
- data.tar.gz: 543ef54c68b7f0280dce88da5ceb2ca7917a49c045ca7285946c44604023243f16f92b16e57c347c5c1387d475783a6856f8e014d95795285c82f63c2968e959
6
+ metadata.gz: 75223bbc1df85cd7bd7edd396a1962c0b2c87bc1c08d1afec36918b845b701899ee25ec504b72d601b793f96138da46a3a2725f67730288b8093b75890d2b1b9
7
+ data.tar.gz: 4cb14463bb01959827b13e2975d82860dca97587f87e1d940956376bfe295279d591baed2179c34c943a3c0e44ed8761c10f0685421c89ae79bb2178c546fc9e
data/CHANGELOG.md CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  Complete, fast and testable actions for Rack
4
4
 
5
- ## v2.2.0.beta1 - 2024-09-25
5
+ ## v2.2.0 - 2024-11-05
6
+
7
+ ### Added
8
+
9
+ - [Tom de Bruijn, Tim Riley] When an action is called, add the action instance to the Rack environment under the `"hanami.action_instance"` key (#446)
10
+
11
+ ## v2.2.0.rc1 - 2024-10-29
12
+
13
+ ## v2.2.0.beta2 - 2024-09-25
6
14
 
7
15
  ### Added
8
16
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = ">= 3.1"
22
22
 
23
23
  spec.add_dependency "rack", "~> 2.0"
24
- spec.add_dependency "hanami-utils", "~> 2.2.beta"
24
+ spec.add_dependency "hanami-utils", "~> 2.2"
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"
@@ -245,5 +245,9 @@ module Hanami
245
245
  # @since 2.0.0
246
246
  # @api private
247
247
  DEFAULT_CHARSET = "utf-8"
248
+
249
+ # @since 2.2.0
250
+ # @api private
251
+ ACTION_INSTANCE = "hanami.action_instance"
248
252
  end
249
253
  end
data/lib/hanami/action.rb CHANGED
@@ -332,6 +332,10 @@ module Hanami
332
332
  _handle_exception(request, response, exception)
333
333
  end
334
334
 
335
+ # Before finishing, put ourself into the Rack env for third-party instrumentation tools to
336
+ # integrate with actions
337
+ env[ACTION_INSTANCE] = self
338
+
335
339
  finish(request, response, halted)
336
340
  end
337
341
 
@@ -8,6 +8,6 @@ module Hanami
8
8
  #
9
9
  # @since 0.1.0
10
10
  # @api public
11
- VERSION = "2.2.0.beta2"
11
+ VERSION = "2.2.0"
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.2.0.beta2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-25 00:00:00.000000000 Z
11
+ date: 2024-11-05 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.2.beta
33
+ version: '2.2'
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.2.beta
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-configurable
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 3.5.16
224
+ rubygems_version: 3.5.22
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: Complete, fast and testable actions for Rack and Hanami