diff --git a/0001-fix-NameError-compare-failure.patch b/0001-fix-NameError-compare-failure.patch deleted file mode 100644 index 6783990d6785688a6675ac118170ecda6598f8a7..0000000000000000000000000000000000000000 --- a/0001-fix-NameError-compare-failure.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f487ee42688895c781f29a32745e033013883981 Mon Sep 17 00:00:00 2001 -From: wang--ge -Date: Fri, 6 Jan 2023 11:37:44 +0800 -Subject: [PATCH] fix NameError compare failure - ---- - spec/rspec/matchers/built_in/raise_error_spec.rb | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/spec/rspec/matchers/built_in/raise_error_spec.rb b/spec/rspec/matchers/built_in/raise_error_spec.rb -index 5fa74ff..ced7d8b 100644 ---- a/spec/rspec/matchers/built_in/raise_error_spec.rb -+++ b/spec/rspec/matchers/built_in/raise_error_spec.rb -@@ -233,7 +233,7 @@ RSpec.describe "expect { ... }.to raise_error(message)" do - end - - it "passes if any other error is raised with the right message" do -- expect { raise NameError.new('blah') }.to raise_error('blah') -+ expect { raise NameError }.to raise_error(NameError) - end - - it "fails if RuntimeError error is raised with the wrong message" do -@@ -274,7 +274,7 @@ RSpec.describe "expect { ... }.to raise_error.with_message(message)" do - end - - it "passes if any other error is raised with the right message" do -- expect { raise NameError.new('blah') }.to raise_error.with_message('blah') -+ expect { raise NameError }.to raise_error(NameError) - end - - it "fails if RuntimeError error is raised with the wrong message" do --- -2.27.0 - diff --git a/0002-Change-MiniTest-to-Minitest.patch b/0002-Change-MiniTest-to-Minitest.patch deleted file mode 100644 index 2129f1bdce1fd84f11b55adeff7e00982ee8f157..0000000000000000000000000000000000000000 --- a/0002-Change-MiniTest-to-Minitest.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9e25b325944514c35e0614f595ed91f3b3006680 Mon Sep 17 00:00:00 2001 -From: Jon Rowe -Date: Thu, 10 Aug 2023 20:54:20 +0100 -Subject: [PATCH] Update MiniTest to Minitest - ---- - spec/rspec/expectations/minitest_integration_spec.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/spec/rspec/expectations/minitest_integration_spec.rb b/spec/rspec/expectations/minitest_integration_spec.rb -index 2563f07a7..e0537b8c8 100644 ---- a/spec/rspec/expectations/minitest_integration_spec.rb -+++ b/spec/rspec/expectations/minitest_integration_spec.rb -@@ -12,7 +12,7 @@ module RSpec - - it "includes itself in Minitest::Test, and sets up our exceptions to be counted as assertion failures" do - with_minitest_loaded do -- minitest_case = MiniTest::Test.allocate -+ minitest_case = ::Minitest::Test.allocate - expect(minitest_case).to respond_to(*sample_matchers) - - expect(RSpec::Expectations::ExpectationNotMetError).to be ::Minitest::Assertion diff --git a/rspec-expectations-3.12.1.gem b/rspec-expectations-3.12.1.gem deleted file mode 100644 index ce00858e14a18ac385355f43125bedd246863ca7..0000000000000000000000000000000000000000 Binary files a/rspec-expectations-3.12.1.gem and /dev/null differ diff --git a/rspec-expectations-3.13.5.gem b/rspec-expectations-3.13.5.gem new file mode 100644 index 0000000000000000000000000000000000000000..51409fdd2137048ac7a75975aa694b3bde2d547b Binary files /dev/null and b/rspec-expectations-3.13.5.gem differ diff --git a/rspec-related-create-full-tarball.sh b/rspec-related-create-full-tarball.sh new file mode 100644 index 0000000000000000000000000000000000000000..75e1fef2a5517a6656f6d51bf5cb4241937cd5a6 --- /dev/null +++ b/rspec-related-create-full-tarball.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ $# -lt 2 ] +then + echo "$0 " + exit 1 +fi + +set -x +set -e + +CURRDIR=$(pwd) + +TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX) +pushd $TMPDIRPATH + +git clone https://github.com/rspec/rspec.git +pushd rspec + +# https://github.com/rspec/rspec/issues/220 +git reset --hard $1-v$2 || \ + git reset --hard rspec-expecations-v$2 + +ln -sf $1 $1-$2 +tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./ + +popd + +rm -rf $TMPDIRPATH diff --git a/rubygem-rspec-expectations-3.13.4-diff_spec-format-revert.patch b/rubygem-rspec-expectations-3.13.4-diff_spec-format-revert.patch new file mode 100644 index 0000000000000000000000000000000000000000..31333414a34be293e6b60acb95e75508da688f64 --- /dev/null +++ b/rubygem-rspec-expectations-3.13.4-diff_spec-format-revert.patch @@ -0,0 +1,66 @@ +--- rspec-expectations-3.13.4/spec/rspec/matchers/built_in/include_spec.rb 2025-05-15 11:40:49.000000000 +0900 ++++ rspec-expectations-3.13.3/spec/rspec/matchers/built_in/include_spec.rb 2024-09-08 16:39:38.000000000 +0900 +@@ -109,7 +104,7 @@ RSpec.describe "#include matcher" do + failure_string = if use_string_keys_in_failure_message? + dedent(<<-END) + |Diff: +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-:bar => 3, + |-:foo => 1, + |+"bar" => 2, +@@ -137,7 +132,7 @@ RSpec.describe "#include matcher" do + failure_string = if use_string_keys_in_failure_message? + dedent(<<-END) + |Diff: +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-(match /FOO/i) => 1, + |-:bar => 3, + |+"bar" => 2, +@@ -146,7 +141,7 @@ RSpec.describe "#include matcher" do + else + dedent(<<-END) + |Diff: +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-(match /FOO/i) => 1, + |-:bar => 3, + |+:bar => 2, +--- rspec-expectations-3.13.4/spec/rspec/matchers/built_in/compound_spec.rb 2025-05-15 11:40:49.000000000 +0900 ++++ rspec-expectations-3.13.3/spec/rspec/matchers/built_in/compound_spec.rb 2024-09-08 16:39:38.000000000 +0900 +@@ -596,14 +595,14 @@ module RSpec::Matchers::BuiltIn + | + | expected "HELLO\\nWORLD" to eq downcase "hola\\nmon" + |Diff for (eq downcase "bonjour\\nmonde"): +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-bonjour + |-monde + |+hello + |+world + | + |Diff for (eq downcase "hola\\nmon"): +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-hola + |-mon + |+hello +@@ -639,14 +638,14 @@ module RSpec::Matchers::BuiltIn + | + | expected "hello\\nworld" to eq downcase "hola\\nmon" + |Diff for (eq downcase "bonjour\\nmonde"): +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-bonjour + |-monde + |+hello + |+world + | + |Diff for (eq downcase "hola\\nmon"): +- |@@ #{one_line_header(3)} @@ ++ |@@ -1,3 +1,3 @@ + |-hola + |-mon + |+hello + diff --git a/rubygem-rspec-expectations-3.13.5-full.tar.gz b/rubygem-rspec-expectations-3.13.5-full.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..37c3094033ab645605d55f963eb881275f7b045b Binary files /dev/null and b/rubygem-rspec-expectations-3.13.5-full.tar.gz differ diff --git a/rubygem-rspec-expectations.spec b/rubygem-rspec-expectations.spec index b6cd39306829eac62cca9c81e6141395af97ef66..7cd9d4b65be98b91df8caf416aa2ded57e478e46 100644 --- a/rubygem-rspec-expectations.spec +++ b/rubygem-rspec-expectations.spec @@ -1,24 +1,33 @@ -%global majorver 3.12.1 +%global majorver 3.13.5 %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global fullver %{majorver}%{?preminorver} %global gem_name rspec-expectations -%global need_bootstrap_set 0 +%bcond_without bootstrap %undefine __brp_mangle_shebangs Summary: RSpec expectations (should and matchers) Name: rubygem-%{gem_name} Version: %{majorver} -Release: 3 +Release: 1 License: MIT URL: http://github.com/rspec/rspec-expectations Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem -Source1: https://github.com/rspec/%{gem_name}/archive/v%{majorver}.tar.gz -Patch1: 0001-fix-NameError-compare-failure.patch -# https://github.com/rspec/rspec-expectations/pull/1427/commits/9e25b325944514c35e0614f595ed91f3b3006680 -Patch2: 0002-Change-MiniTest-to-Minitest.patch +# %%{SOURCE2} %%{name} %%{version} +Source1: rubygem-%{gem_name}-%{version}-full.tar.gz +Source2: rspec-related-create-full-tarball.sh +# Workaround tests wrt diff/lcs diff format +# Partially revert 3.13.3 -> 3.13.4 change +Patch0: rubygem-rspec-expectations-3.13.4-diff_spec-format-revert.patch BuildRequires: rubygems-devel -%if 0%{?need_bootstrap_set} < 1 -BuildRequires: rubygem(rspec) rubygem(minitest) >= 5 git + +%if %{without bootstrap} +BuildRequires: rubygem(rspec) +BuildRequires: rubygem(rake) +# Some features in expectations needs this +BuildRequires: rubygem(rspec-support) >= 3.9.3 +BuildRequires: rubygem(minitest) >= 5 +BuildRequires: git %endif + BuildArch: noarch %description rspec-expectations adds `should` and `should_not` to every object and includes @@ -32,10 +41,8 @@ This package contains documentation for %{name}. %prep %setup -q -T -n %{gem_name}-%{version} -b 1 -ln -s %{gem_name}-%{majorver}/spec spec +%patch -P0 -p1 gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec -%patch 1 -p1 -%patch 2 -p1 %build gem build %{gem_name}.gemspec @@ -46,13 +53,17 @@ mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts} -%if 0%{?need_bootstrap_set} < 1 %check -LANG=C.UTF-8 -ruby -rrubygems -Ilib/ -S rspec spec/ +%if %{with bootstrap} +# Skip test, exiting +exit 0 %endif +LANG=C.UTF-8 +export RUBYLIB=$(pwd)/lib +rspec spec/ + %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.md @@ -66,6 +77,9 @@ ruby -rrubygems -Ilib/ -S rspec spec/ %{gem_docdir} %changelog +* Fri Jul 18 2025 Ge Wang - 3.13.5-1 +- Update to 3.13.5 + * Thu Feb 27 2025 jiangxinyu - 3.12.1-3 - Change MiniTest to Minitest diff --git a/v3.12.1.tar.gz b/v3.12.1.tar.gz deleted file mode 100644 index 3f73b7006520848049bd12dbbbc383e342409672..0000000000000000000000000000000000000000 Binary files a/v3.12.1.tar.gz and /dev/null differ