rack 3.2.0 → 3.2.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: 17b6834d4c6a07c5cf23757814f450f39e32589ef0a6300310c7ab111a8c99c2
4
- data.tar.gz: db3d1475837e3d45082994af134b5ceb9e0b83f400244c33262c343f421798f0
3
+ metadata.gz: 32413bcd1f96d1cc6283491c3a7cf4b0301d9eb84d7d334895586d42981f0858
4
+ data.tar.gz: ecd4aaba754ab7de09ced1dab1efb3366242933edeb1e549aaa14cdec1ff3cfc
5
5
  SHA512:
6
- metadata.gz: 36b2bb65194e71b496e946090552bc97f3367426d4c169b0da384ee284068dd809d9d89fc585a49caa313a48e73eea3ce4f1dd47f2a5f103da9ac006f9f6d12a
7
- data.tar.gz: 934940c91b89ebcf4a3015d3876e850f470d97ac82e189a390ff07efed1664d153a28546f8576fa99d6e6361f168ab1c6ffd8541509ddfe709436bd649cca29d
6
+ metadata.gz: bdf1806a0951c9523e75fe5a4be2eed0536c9e313b6f6808bb0ec7c43d62d489d63f75cb1e2a2a6741468d9fd2b34bb4ff22f0f8d32b5c3a0d3271faf2b11e73
7
+ data.tar.gz: 98183f1e7637e3e9fa3a2b32908c8b00acdf294b526c413393eaff99daf6bf4e103c5501efe87fea54435747b7a782801e54dfbd89781513557ed56f047a1f1a
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. For info on
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## [3.2.1] -- 2025-09-02
8
+
9
+ ### Added
10
+
11
+ - Add support for streaming bodies when using `Rack::Events`. ([#2375](github.com/rack/rack/pull/2375), [@unflxw](https://github.com/unflxw))
12
+
13
+ ### Fixed
14
+
15
+ - Fix an issue where a `NoMethodError` would be raised when using `Rack::Events` with streaming bodies. ([#2375](github.com/rack/rack/pull/2375), [@unflxw](https://github.com/unflxw))
16
+
7
17
  ## [3.2.0] - 2025-07-31
8
18
 
9
19
  This release continues Rack's evolution toward a cleaner, more efficient foundation while maintaining backward compatibility for most applications. The breaking changes primarily affect deprecated functionality, so most users should experience a smooth upgrade with improved performance and standards compliance.
data/lib/rack/events.rb CHANGED
@@ -29,12 +29,13 @@ module Rack
29
29
  #
30
30
  # * on_send(request, response)
31
31
  #
32
- # The webserver has started iterating over the response body and presumably
33
- # has started sending data over the wire. This method is always called with
34
- # a request object and the response object. The response object is
35
- # constructed from the rack triple that the application returned. Changes
36
- # SHOULD NOT be made to the response object as the webserver has already
37
- # started sending data. Any mutations will likely result in an exception.
32
+ # The webserver has started iterating over the response body, or has called
33
+ # the streaming body, and presumably has started sending data over the
34
+ # wire. This method is always called with a request object and the response
35
+ # object. The response object is constructed from the rack triple that the
36
+ # application returned. Changes SHOULD NOT be made to the response object
37
+ # as the webserver has already started sending data. Any mutations will
38
+ # likely result in an exception.
38
39
  #
39
40
  # * on_finish(request, response)
40
41
  #
@@ -90,6 +91,20 @@ module Rack
90
91
  @handlers.reverse_each { |handler| handler.on_send request, response }
91
92
  super
92
93
  end
94
+
95
+ def call(stream)
96
+ @handlers.reverse_each { |handler| handler.on_send request, response }
97
+ super
98
+ end
99
+
100
+ def respond_to?(method_name, include_all = false)
101
+ case method_name
102
+ when :each, :call
103
+ @body.respond_to?(method_name, include_all)
104
+ else
105
+ super
106
+ end
107
+ end
93
108
  end
94
109
 
95
110
  class BufferedResponse < Rack::Response::Raw # :nodoc:
data/lib/rack/version.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  # See MIT-LICENSE or https://opensource.org/licenses/MIT.
7
7
 
8
8
  module Rack
9
- VERSION = "3.2.0"
9
+ VERSION = "3.2.1"
10
10
 
11
11
  RELEASE = VERSION
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubygems_version: 3.6.7
159
+ rubygems_version: 3.6.9
160
160
  specification_version: 4
161
161
  summary: A modular Ruby webserver interface.
162
162
  test_files: []