hanami-controller 2.2.0.rc1 → 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: c1d4e9b1af736129911e894a09fe5d61c1a56c50ac56ef31d4e2a2d6da27b4dc
4
- data.tar.gz: 9cb8f020dcd2fe5b7e5880293058c85b8fa6b74d49982035dbffcf5c0234ff06
3
+ metadata.gz: d36e2731984ff92e89c99426d31d8e7e2fdb99712bae1b8aaaab7d2eaa46bb5d
4
+ data.tar.gz: 130d03fa13e2c842c957b29122e8787b6d93d09fda984261b917ca8dc39cc25a
5
5
  SHA512:
6
- metadata.gz: 24b661dcdd3a9a75cb7842a12cd6fc8ad94a1aa814e0cb38cc89021583b9da5d5ae3d98a60fc43365b52ca537226e8a67c5bb572c9d6d884ad96a885e478e6f8
7
- data.tar.gz: 9862fcb6a0f57e4dbaf5ceeb965df3c93d2b33e61da735b4ca906253dd7d3ff59dce188b545e939da23069ed8a984b80434200afebc575534ac4745a77dac976
6
+ metadata.gz: 75223bbc1df85cd7bd7edd396a1962c0b2c87bc1c08d1afec36918b845b701899ee25ec504b72d601b793f96138da46a3a2725f67730288b8093b75890d2b1b9
7
+ data.tar.gz: 4cb14463bb01959827b13e2975d82860dca97587f87e1d940956376bfe295279d591baed2179c34c943a3c0e44ed8761c10f0685421c89ae79bb2178c546fc9e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Complete, fast and testable actions for Rack
4
4
 
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
+
5
11
  ## v2.2.0.rc1 - 2024-10-29
6
12
 
7
13
  ## v2.2.0.beta2 - 2024-09-25
@@ -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.rc"
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.rc1"
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.rc1
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-10-29 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.rc
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.rc
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-configurable
43
43
  requirement: !ruby/object:Gem::Requirement