rack 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rack might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c02c25dfc02deefcbf95de53b538f14db0fa0a4c06d73755ce68062959cfd74f
4
- data.tar.gz: e333965aa9cc102988178745dea18821e05b19f49a0d0fc7d5b7fc266f40d20e
3
+ metadata.gz: 188a0efbbd783c3fb499725bf81b141a40fbf5a6e47b41b401bdbfd270beba96
4
+ data.tar.gz: fbbb869dab4d6946155e977bb2814768dc245a1c1a37472f072df9d5d9d638bd
5
5
  SHA512:
6
- metadata.gz: f99ef35191516b033f16271abae7a3b5acce3d774c761c41ce0d1f29aa10b4e3e4c530a2495a7ad5bfed10073f19a7c87cec7b526bc33c57e2ff8623e528ea24
7
- data.tar.gz: e498a5646da200b21ce1ce48893f5c59de580bddf1f33f8c85c3a344afb6ae37979259564b38bce50f6d699fcd574b8bcd08eb4e277d0926bcfcfc6762886909
6
+ metadata.gz: 22d9827dfb149e42232b10fccceb117d25513776e017e0221d81e980e30ab06285a55f05297808958c830dd023b43c38f098a1245a24ba8b11362d6ede4fe03b
7
+ data.tar.gz: 30cf292f7c1a19dba1988d4637afedb68acd97c9adb60040f157c7eedc3ac20a0a79ef1330759d5c09da77c17aed818885c19665840b26a0b68089f9722a529d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [3.0.1] - 2022-11-18
6
+
7
+ ### Fixed
8
+
9
+ - `MethodOverride` does not look for an override if a request does not include form/parseable data.
10
+ - `Rack::Lint::Wrapper` correctly handles `respond_to?` with `to_ary`, `each`, `call` and `to_path`, forwarding to the body. ([#1981](https://github.com/rack/rack/pull/1981), [@ioquatix])
11
+
5
12
  ## [3.0.0] - 2022-09-06
6
13
 
7
14
  - No changes
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ![Rack](contrib/logo.webp)
2
2
 
3
- > **_NOTE:_** Rack v3.0.0.beta1 was recently released. Please check the [Upgrade
3
+ > **_NOTE:_** Rack v3.0.0 was recently released. Please check the [Upgrade
4
4
  > Guide](UPGRADE-GUIDE.md) for more details about migrating your existing
5
5
  > servers, middlewares and applications. For detailed information on specific
6
6
  > changes, check the [Change Log](CHANGELOG.md).
@@ -23,7 +23,7 @@ by a [supported web framework](#supported-web-frameworks):
23
23
  $ gem install rack --pre
24
24
 
25
25
  # or, add it to your current application gemfile:
26
- $ bundle add rack --version 3.0.0.beta1
26
+ $ bundle add rack --version 3.0.0
27
27
  ```
28
28
 
29
29
  If you need features from `Rack::Session` or `bin/rackup` please add those gems separately.
data/lib/rack/lint.rb CHANGED
@@ -817,8 +817,14 @@ module Rack
817
817
  verify_to_path
818
818
  end
819
819
 
820
+ BODY_METHODS = {to_ary: true, each: true, call: true, to_path: true}
821
+
822
+ def to_path
823
+ @body.to_path
824
+ end
825
+
820
826
  def respond_to?(name, *)
821
- if name == :to_ary
827
+ if BODY_METHODS.key?(name)
822
828
  @body.respond_to?(name)
823
829
  else
824
830
  super
@@ -46,7 +46,7 @@ module Rack
46
46
  end
47
47
 
48
48
  def method_override_param(req)
49
- req.POST[METHOD_OVERRIDE_PARAM_KEY]
49
+ req.POST[METHOD_OVERRIDE_PARAM_KEY] if req.form_data? || req.parseable_data?
50
50
  rescue Utils::InvalidParameterError, Utils::ParameterTypeError
51
51
  req.get_header(RACK_ERRORS).puts "Invalid or incomplete POST params"
52
52
  rescue EOFError
data/lib/rack/version.rb CHANGED
@@ -25,7 +25,7 @@ module Rack
25
25
  VERSION
26
26
  end
27
27
 
28
- RELEASE = "3.0.0"
28
+ RELEASE = "3.0.1"
29
29
 
30
30
  # Return the Rack release as a dotted string.
31
31
  def self.release
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-06 00:00:00.000000000 Z
11
+ date: 2022-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.3.3
167
+ rubygems_version: 3.3.7
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: A modular Ruby webserver interface.