From ce9c9eed9738ac8b8aa3cdfe28f2dccda06df79d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 19 Jan 2018 14:23:12 +0100 Subject: [PATCH] Fix MiniTest 5.11 compatibility. --- ...nitest-Result-for-retain-test-result.patch | 39 +++++++++++++++++++ rubygem-activesupport.spec | 8 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch diff --git a/rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch b/rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch new file mode 100644 index 0000000..2b48db6 --- /dev/null +++ b/rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch @@ -0,0 +1,39 @@ +From 3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9 Mon Sep 17 00:00:00 2001 +From: "yuuji.yaginuma" +Date: Tue, 2 Jan 2018 18:15:11 +0900 +Subject: [PATCH] Use `Minitest::Result` for retain test result + +Runnable.marshal_dump/load was removed in +https://github.com/seattlerb/minitest/commit/00433fc0a4fdd0e6b302aace633384ba1312237 + +Instead, `Minitest::Result` is contained test result and the that can be +marshalled. +--- + activesupport/lib/active_support/testing/isolation.rb | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb +index fa9bebb181a4..562f985f1ba2 100644 +--- a/activesupport/lib/active_support/testing/isolation.rb ++++ b/activesupport/lib/active_support/testing/isolation.rb +@@ -45,7 +45,8 @@ def run_in_isolation(&blk) + end + } + end +- result = Marshal.dump(dup) ++ test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup ++ result = Marshal.dump(test_result) + end + + write.puts [result].pack("m") +@@ -69,8 +70,9 @@ def run_in_isolation(&blk) + + if ENV["ISOLATION_TEST"] + yield ++ test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup + File.open(ENV["ISOLATION_OUTPUT"], "w") do |file| +- file.puts [Marshal.dump(dup)].pack("m") ++ file.puts [Marshal.dump(test_result)].pack("m") + end + exit! + else diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index 9037c7d..9fcff16 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -3,7 +3,7 @@ Name: rubygem-%{gem_name} Epoch: 1 Version: 5.1.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A support libraries and Ruby core extensions extracted from the Rails framework Group: Development/Languages License: MIT @@ -16,6 +16,8 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # cd rails/activesupport/ # git checkout v5.1.4 && tar czvf activesupport-5.1.4-tests.tgz test/ Source1: %{gem_name}-%{version}-tests.tgz +# Fix MiniTest 5.11 compatibility. +Patch0: rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch # ruby package has just soft dependency on rubygem({bigdecimal,json}), while # ActiveSupport always requires them. @@ -58,6 +60,7 @@ Documentation for %{name}. %gem_install -n %{SOURCE0} pushd .%{gem_instdir} +%patch0 -p2 popd %build @@ -100,6 +103,9 @@ popd %doc %{gem_instdir}/README.rdoc %changelog +* Fri Jan 19 2018 Vít Ondruch - 1:5.1.4-2 +- Fix MiniTest 5.11 compatibility. + * Mon Sep 11 2017 Pavel Valena - 1:5.1.4-1 - Update to Active Support 5.1.4.