Upgrade to version 7.0.4
This commit is contained in:
parent
4cdbfcedc2
commit
844a5c3e47
Binary file not shown.
Binary file not shown.
BIN
actionpack-7.0.4.gem
Normal file
BIN
actionpack-7.0.4.gem
Normal file
Binary file not shown.
Binary file not shown.
140
rubygem-actionpack-7.0.2.3-Fix-tests-for-minitest-5.16.patch
Normal file
140
rubygem-actionpack-7.0.2.3-Fix-tests-for-minitest-5.16.patch
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
From 9766eb4a833c26c64012230b96dd1157ebb8e8a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: eileencodes <eileencodes@gmail.com>
|
||||||
|
Date: Wed, 15 Jun 2022 12:44:11 -0400
|
||||||
|
Subject: [PATCH] Fix tests for minitest 5.16
|
||||||
|
|
||||||
|
In minitest/minitest@6e06ac9 minitest changed such that it now accepts
|
||||||
|
`kwargs` instead of requiring kwargs to be shoved into the args array.
|
||||||
|
This is a good change but required some updates to our test code to get
|
||||||
|
the new version of minitest passing.
|
||||||
|
|
||||||
|
Changes are as follows:
|
||||||
|
|
||||||
|
1) Lock minitest to 5.15 for Ruby 2.7. We don't love this change but
|
||||||
|
it's pretty difficult to get 2.7 and 3.0 to play nicely together with
|
||||||
|
the new kwargs changes. Dropping 2.7 support isn't an option right
|
||||||
|
now for Rails. This is safe because all of the code changes here are
|
||||||
|
internal methods to Rails like assert_called_with. Applications
|
||||||
|
shouldn't be consuming them as they are no-doc'd.
|
||||||
|
2) Update the `assert_called_with` method to take any kwargs but also
|
||||||
|
the returns kwarg.
|
||||||
|
3) Update callers of `assert_called_with` to move the kwargs outside the
|
||||||
|
args array.
|
||||||
|
4) Update the message from marshaled exceptions. In 5.16 the exception
|
||||||
|
message is "result not reported" instead of "Wrapped undumpable
|
||||||
|
exception".
|
||||||
|
|
||||||
|
Co-authored-by: Matthew Draper <matthew@trebex.net>
|
||||||
|
---
|
||||||
|
.../test/controller/integration_test.rb | 26 ++---
|
||||||
|
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
|
||||||
|
index 2fcd56e71a589..99f92b3c3d07c 100644
|
||||||
|
--- a/actionpack/test/controller/integration_test.rb
|
||||||
|
+++ b/actionpack/test/controller/integration_test.rb
|
||||||
|
@@ -36,91 +36,91 @@ def test_follow_redirect_raises_when_no_redirect
|
||||||
|
def test_get
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
|
||||||
|
- assert_called_with @session, :process, [:get, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:get, path], params: params, headers: headers do
|
||||||
|
@session.get(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_get_with_env_and_headers
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }; env = { "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest" }
|
||||||
|
- assert_called_with @session, :process, [:get, path, params: params, headers: headers, env: env] do
|
||||||
|
+ assert_called_with @session, :process, [:get, path], params: params, headers: headers, env: env do
|
||||||
|
@session.get(path, params: params, headers: headers, env: env)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_post
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:post, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:post, path], params: params, headers: headers do
|
||||||
|
@session.post(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_patch
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:patch, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:patch, path], params: params, headers: headers do
|
||||||
|
@session.patch(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_put
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:put, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:put, path], params: params, headers: headers do
|
||||||
|
@session.put(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_delete
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:delete, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:delete, path], params: params, headers: headers do
|
||||||
|
@session.delete(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_head
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:head, path, params: params, headers: headers] do
|
||||||
|
+ assert_called_with @session, :process, [:head, path], params: params, headers: headers do
|
||||||
|
@session.head(path, params: params, headers: headers)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_get
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:get, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:get, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.get(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_post
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:post, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:post, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.post(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_patch
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:patch, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:patch, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.patch(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_put
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:put, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:put, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.put(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_delete
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:delete, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:delete, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.delete(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_xml_http_request_head
|
||||||
|
path = "/index"; params = "blah"; headers = { location: "blah" }
|
||||||
|
- assert_called_with @session, :process, [:head, path, params: params, headers: headers, xhr: true] do
|
||||||
|
+ assert_called_with @session, :process, [:head, path], params: params, headers: headers, xhr: true do
|
||||||
|
@session.head(path, params: params, headers: headers, xhr: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -3,14 +3,25 @@
|
|||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 6.1.4.1
|
Version: 7.0.4
|
||||||
Release: 2
|
Release: 1
|
||||||
Summary: Web-flow and rendering framework putting the VC in MVC (part of Rails)
|
Summary: Web-flow and rendering framework putting the VC in MVC (part of Rails)
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://rubyonrails.org
|
URL: http://rubyonrails.org
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
# ActionPack gem doesn't ship with the test suite.
|
||||||
|
# You may check it out like so
|
||||||
|
# git clone http://github.com/rails/rails.git
|
||||||
|
# cd rails/actionpack && git archive -v -o actionpack-7.0.4-tests.txz v7.0.4 test/
|
||||||
Source1: %{gem_name}-%{version}-tests.txz
|
Source1: %{gem_name}-%{version}-tests.txz
|
||||||
|
# The tools are needed for the test suite, are however unpackaged in gem file.
|
||||||
|
# You may get them like so
|
||||||
|
# git clone http://github.com/rails/rails.git --no-checkout
|
||||||
|
# cd rails && git archive -v -o rails-7.0.4-tools.txz v7.0.4 tools/
|
||||||
Source2: rails-%{version}-tools.txz
|
Source2: rails-%{version}-tools.txz
|
||||||
|
# Fixes for Minitest 5.16+
|
||||||
|
# https://github.com/rails/rails/pull/45370
|
||||||
|
Patch0: rubygem-actionpack-7.0.2.3-Fix-tests-for-minitest-5.16.patch
|
||||||
|
|
||||||
# Let's keep Requires and BuildRequires sorted alphabeticaly
|
# Let's keep Requires and BuildRequires sorted alphabeticaly
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
@ -30,7 +41,7 @@ BuildRequires: rubygem(capybara) >= 3.26
|
|||||||
BuildRequires: rubygem(selenium-webdriver)
|
BuildRequires: rubygem(selenium-webdriver)
|
||||||
BuildRequires: rubygem(rexml)
|
BuildRequires: rubygem(rexml)
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: rubygem(did_you_mean)
|
BuildRequires: rubygem(did_you_mean) rubygem(matrix)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -49,6 +60,10 @@ Documentation for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
|
%setup -q -n %{gem_name}-%{version}%{?prerelease} -b1 -b2
|
||||||
|
|
||||||
|
pushd %{_builddir}
|
||||||
|
%patch0 -p2
|
||||||
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
|
gem build ../%{gem_name}-%{version}%{?prerelease}.gemspec
|
||||||
%gem_install
|
%gem_install
|
||||||
@ -89,6 +104,9 @@ popd
|
|||||||
%doc %{gem_instdir}/README.rdoc
|
%doc %{gem_instdir}/README.rdoc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 20 2023 wangkai <wangkai385@h-partners.com> - 1:7.0.4-1
|
||||||
|
- Upgrade to version 7.0.4
|
||||||
|
|
||||||
* Thu Jun 30 2022 houyingchao <houyingchao@h-partners.com> - 1:6.1.4.1-2
|
* Thu Jun 30 2022 houyingchao <houyingchao@h-partners.com> - 1:6.1.4.1-2
|
||||||
- Fix compilation failed
|
- Fix compilation failed
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user