diff --git a/.gitignore b/.gitignore index bb8aaaf..b69102e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,20 @@ -/rspec-expectations-*.gem -/rubygem-rspec-expectations-*-full.tar.gz +/rspec-expectations-2.5.0.gem +/rspec-expectations-2.6.0.rc4.gem +/rspec-expectations-2.6.0.rc6.gem +/rspec-expectations-2.6.0.gem +/rspec-expectations-2.8.0.gem +/rspec-expectations-2.11.3.gem +/rspec-expectations-2.12.1.gem +/rspec-expectations-2.13.0.gem +/rspec-expectations-2.14.2.gem +/rspec-expectations-2.14.3.gem +/rspec-expectations-2.14.4.gem +/rspec-expectations-2.14.5.gem +/rspec-expectations-3.1.2.gem +/rubygem-rspec-expectations-3.1.2-full.tar.gz +/rspec-expectations-3.2.0.gem +/rubygem-rspec-expectations-3.2.0-full.tar.gz +/rspec-expectations-3.2.1.gem +/rubygem-rspec-expectations-3.2.1-full.tar.gz +/rspec-expectations-3.3.1.gem +/rubygem-rspec-expectations-3.3.1-full.tar.gz diff --git a/rspec-expectations-pr282-ruby4_0-source_location.patch b/rspec-expectations-pr282-ruby4_0-source_location.patch deleted file mode 100644 index 19483fc..0000000 --- a/rspec-expectations-pr282-ruby4_0-source_location.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1c20fa80772ca7a1ed0512056ce7cd6a94f8e68d Mon Sep 17 00:00:00 2001 -From: Jon Rowe -Date: Fri, 28 Nov 2025 10:59:10 +0000 -Subject: [PATCH] Cope with the changes to block source_location in Ruby 4 - ---- - rspec-core/lib/rspec/core/hooks.rb | 2 +- - rspec-core/lib/rspec/core/metadata.rb | 2 +- - rspec-core/lib/rspec/core/shared_example_group.rb | 2 +- - .../lib/rspec/expectations/block_snippet_extractor.rb | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/rspec-expectations/lib/rspec/expectations/block_snippet_extractor.rb b/rspec-expectations/lib/rspec/expectations/block_snippet_extractor.rb -index 5c66ac639..24dbaf88e 100644 ---- a/rspec-expectations/lib/rspec/expectations/block_snippet_extractor.rb -+++ b/rspec-expectations/lib/rspec/expectations/block_snippet_extractor.rb -@@ -62,7 +62,7 @@ def file_path - end - - def beginning_line_number -- source_location.last -+ source_location[1] - end - - def source_location diff --git a/rspec-related-create-full-tarball.sh b/rspec-related-create-full-tarball.sh index 75e1fef..a847c6c 100644 --- a/rspec-related-create-full-tarball.sh +++ b/rspec-related-create-full-tarball.sh @@ -14,12 +14,10 @@ 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 +git clone https://github.com/rspec/$1.git +pushd $1 +git reset --hard v$2 +popd ln -sf $1 $1-$2 tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./ diff --git a/rubygem-rspec-expectations-2.14.5-be_truthy-alias.patch b/rubygem-rspec-expectations-2.14.5-be_truthy-alias.patch new file mode 100644 index 0000000..073ef9f --- /dev/null +++ b/rubygem-rspec-expectations-2.14.5-be_truthy-alias.patch @@ -0,0 +1,13 @@ +--- 2.14.5/TMP/lib/rspec/matchers.rb.be_truthy 1970-01-01 09:00:00.000000000 +0900 ++++ 2.14.5/TMP/lib/rspec/matchers.rb 2014-08-13 16:30:56.000000000 +0900 +@@ -198,6 +198,10 @@ + BuiltIn::BeNil.new + end + ++ alias_method :be_truthy, :be_true ++ alias_method :be_falsey, :be_false ++ alias_method :be_falsy, :be_falsey ++ + # @example + # expect(actual).to be_true + # expect(actual).to be_false 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 deleted file mode 100644 index 3133341..0000000 --- a/rubygem-rspec-expectations-3.13.4-diff_spec-format-revert.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- 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.spec b/rubygem-rspec-expectations.spec index 63bcd3c..8156d12 100644 --- a/rubygem-rspec-expectations.spec +++ b/rubygem-rspec-expectations.spec @@ -1,47 +1,32 @@ -%global majorver 3.13.5 +%global majorver 3.3.1 #%%global preminorver .rc6 %global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||') %global fullver %{majorver}%{?preminorver} -%global baserelease 4 +%global fedorarel 2 %global gem_name rspec-expectations -%bcond_with bootstrap +%global need_bootstrap_set 0 -%undefine __brp_mangle_shebangs - -Summary: RSpec expectations (should and matchers) +Summary: Rspec-2 expectations (should and matchers) Name: rubygem-%{gem_name} Version: %{majorver} -Release: %{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist} +Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist} -# SPDX confirmed +Group: Development/Languages License: MIT -URL: https://rspec.info +URL: http://github.com/rspec/rspec-expectations Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem -# %%{SOURCE2} %%{name} %%{version} +# %%{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 -# https://github.com/rspec/rspec/pull/282/commits/1c20fa80772ca7a1ed0512056ce7cd6a94f8e68d -# Support ruby4_0 source_location behavior change -Patch1: rspec-expectations-pr282-ruby4_0-source_location.patch -#BuildRequires: ruby(release) +BuildRequires: ruby(release) BuildRequires: rubygems-devel -%if %{without bootstrap} +%if 0%{?need_bootstrap_set} < 1 BuildRequires: rubygem(rspec) -BuildRequires: rubygem(rake) -# Some features in expectations needs this -BuildRequires: rubygem(rspec-support) >= 3.9.3 BuildRequires: rubygem(minitest) >= 5 -%if ! 0%{?rhel} -BuildRequires: rubygem(aruba) -BuildRequires: rubygem(cucumber) -%endif BuildRequires: git %endif BuildArch: noarch @@ -52,6 +37,7 @@ RSpec::Matchers, a library of standard matchers. %package doc Summary: Documentation for %{name} +Group: Documentation Requires: %{name} = %{version}-%{release} %description doc @@ -59,11 +45,9 @@ This package contains documentation for %{name}. %prep -%setup -q -T -n %{gem_name}-%{version} -b 1 - -%patch -P0 -p1 -%patch -P1 -p2 +gem unpack %{SOURCE0} +%setup -q -D -T -n %{gem_name}-%{version} -a 1 gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build @@ -78,44 +62,20 @@ cp -a .%{gem_dir}/* \ # cleanups rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts} +%if 0%{?need_bootstrap_set} < 1 %check -%if %{with bootstrap} -# Skip test, exiting -exit 0 +LANG=en_US.UTF-8 +pushd %{gem_name}-%{version} + +ruby -rubygems -Ilib/ -S rspec spec/ +popd %endif -LANG=C.UTF-8 -export RUBYLIB=$(pwd)/lib -rspec spec/ - -%if 0%{?rhel} -# Skip cucumber test -exit 0 -%endif - -# Fix minitest 6 compatibility -# Behavior changed on: https://github.com/minitest/minitest/commit/2572c78420af73dbe9b202d535a1474405a32173 -if ( ruby -e 'require "minitest" ; exit Minitest::VERSION >= "6"' ) ; then - sed -i features/test_frameworks/minitest.feature \ - -e 's|9 runs, 10 assertions, 5 failures, 0 errors|9 runs, 11 assertions, 5 failures, 0 errors|' -fi - -# Skip one failing scenario, needs investigating... -sed -i features/built_in_matchers/include.feature -e '\@skip-on-fedora@d' -sed -i features/built_in_matchers/include.feature -e 's|^\([ \t]*\)\(Scenario: counts usage.*\)|\1@skip-on-fedora\n\1\2|' -export CUCUMBER_PUBLISH_QUIET=true -cucumber \ - --tag "not @skip-when-diff-lcs-1.3" \ - --tag "not @skip-on-fedora" \ - %{nil} - %files %dir %{gem_instdir} -%license %{gem_instdir}/LICENSE.md -%doc %{gem_instdir}/Changelog.md -%doc %{gem_instdir}/README.md - +%license %{gem_instdir}/License.txt +%doc %{gem_instdir}/*.md %{gem_instdir}/lib/ %exclude %{gem_cache} @@ -125,205 +85,6 @@ cucumber \ %{gem_docdir} %changelog -* Thu Jan 01 2026 Mamoru TASAKA - 3.13.5-4 -- Fix compatibility for minitest 6 - -* Tue Dec 02 2025 Mamoru TASAKA - 3.13.5-3 -- Backport upstream patch to support ruby4_0 source_location behavior change - -* Fri Jul 25 2025 Fedora Release Engineering - 3.13.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu May 29 2025 Mamoru TASAKA - 3.13.5-1 -- 3.13.5 - -* Thu May 15 2025 Mamoru TASAKA - 3.13.4-1 -- 3.13.4 - -* Sat Jan 18 2025 Fedora Release Engineering - 3.13.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sun Dec 29 2024 Mamoru TASAKA - 3.13.3-2 -- Backport upstream fix to support ruby34 Hash inspect syntax - -* Sun Sep 08 2024 Mamoru TASAKA - 3.13.3-1 -- 3.13.3 - -* Wed Aug 21 2024 Mamoru TASAKA - 3.13.2-1 -- 3.13.2 - -* Fri Jul 19 2024 Fedora Release Engineering - 3.13.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jun 18 2024 Mamoru TASAKA - 3.13.1-1 -- 3.13.1 - -* Fri Feb 09 2024 Mamoru TASAKA - 3.13.0-1 -- 3.13.0 - -* Fri Jan 26 2024 Fedora Release Engineering - 3.12.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Aug 06 2023 Mamoru TASAKA - 3.12.3-4 -- Remove unneeded conditionals for new MiniTest support - -* Fri Aug 4 2023 Mamoru TASAKA - 3.12.3-3 -- Support MiniTest 5.19+ - -* Fri Jul 21 2023 Fedora Release Engineering - 3.12.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Apr 21 2023 Mamoru TASAKA - 3.12.3-1 -- 3.12.3 - -* Fri Mar 10 2023 Yaakov Selkowitz - 3.12.2-2 -- Disable unwanted dependencies in RHEL builds - -* Fri Jan 20 2023 Fedora Release Engineering - 3.12.2-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Jan 17 2023 Mamoru TASAKA - 3.12.2-1 -- 3.12.2 - -* Wed Dec 21 2022 Mamoru TASAKA - 3.12.1-1 -- 3.12.1 - -* Thu Oct 27 2022 Mamoru TASAKA - 3.12.0-1 -- 3.12.0 - -* Thu Sep 15 2022 Mamoru TASAKA - 3.11.1-1 -- 3.11.1 - -* Sat Jul 23 2022 Fedora Release Engineering - 3.11.0-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Feb 10 2022 Mamoru TASAKA - 3.11.0-1 -- 3.11.0 - -* Sun Jan 30 2022 Mamoru TASAKA - 3.10.2-2 -- BR: rubygem(rake) for check - -* Fri Jan 21 2022 Fedora Release Engineering - 3.10.2-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Tue Jan 18 2022 Mamoru TASAKA - 3.10.2-1 -- 3.10.2 -- Execute cucumber test - -* Fri Jul 23 2021 Fedora Release Engineering - 3.10.1-1.2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 3.10.1-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Dec 29 2020 Mamoru TASAKA - 3.10.1-1 -- 3.10.1 - -* Fri Dec 11 2020 Mamoru TASAKA - 3.10.0-1 -- Enable tests again - -* Fri Dec 11 2020 Mamoru TASAKA - 3.10.0-0.1 -- 3.10.0 -- Once disable test for bootstrap - -* Wed Jul 29 2020 Fedora Release Engineering - 3.9.2-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Sat May 9 2020 Mamoru TASAKA - 3.9.2-1 -- 3.9.2 - -* Sun Apr 19 2020 Mamoru TASAKA - 3.9.1-1 -- 3.9.1 - -* Thu Jan 30 2020 Fedora Release Engineering - 3.9.0-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Dec 10 2019 Mamoru TASAKA - 3.9.0-2 -- Enable tests again - -* Tue Dec 10 2019 Mamoru TASAKA - 3.9.0-0.1 -- 3.9.0 -- Once disable test for bootstrap - -* Fri Jul 26 2019 Fedora Release Engineering - 3.8.4-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jun 21 2019 Mamoru TASAKA - 3.8.4-1 -- 3.8.4 - -* Wed Apr 24 2019 Mamoru TASAKA - 3.8.3-1 -- 3.8.3 - -* Sat Feb 02 2019 Fedora Release Engineering - 3.8.2-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Dec 13 2018 Mamoru TASAKA - 3.8.2-1 -- Enable tests again - -* Wed Dec 12 2018 Mamoru TASAKA - 3.8.2-0.1 -- 3.8.2 -- Once disable test for bootstrap - -* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 3.7.0-3.2 -- Use C.UTF-8 locale - See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot - -* Sat Jul 14 2018 Fedora Release Engineering - 3.7.0-3.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 14 2018 Mamoru TASAKA - 3.7.0-3 -- Backport upstream patch to fix test failure on ruby 25 - -* Tue Feb 13 2018 Mamoru TASAKA - 3.7.0-2 -- ruby 2.5 drops -rubygems usage - -* Fri Feb 09 2018 Fedora Release Engineering - 3.7.0-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Mon Nov 13 2017 Mamoru TASAKA - 3.7.0-1 -- Enable tests again - -* Mon Nov 13 2017 Mamoru TASAKA - 3.7.0-0.1 -- 3.7.0 -- Once disable tests - -* Thu Jul 27 2017 Fedora Release Engineering - 3.6.0-1.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat May 6 2017 Mamoru TASAKA - 3.6.0-1 -- Enable tests again - -* Sat May 6 2017 Mamoru TASAKA - 3.6.0-0.1 -- 3.6.0 -- Once disable tests - -* Tue Feb 21 2017 Mamoru TASAKA - 3.5.0-3 -- Always use full tar.gz for installed files and - keep using gem file for gem spec (ref: bug 1425220) - -* Sat Feb 11 2017 Fedora Release Engineering - 3.5.0-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Jan 18 2017 Vít Ondruch - 3.5.0-2 -- Fix Ruby 2.4 compatibility. - -* Sun Jul 24 2016 Mamoru TASAKA - 3.5.0-1 -- Enable tests again - -* Sat Jul 23 2016 Mamoru TASAKA - 3.5.0-0.1 -- 3.5.0 -- Once disable tests - -* Thu Feb 04 2016 Fedora Release Engineering - 3.4.0-2.1 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Dec 8 2015 Mamoru TASAKA - 3.4.0-2 -- Enable tests again - -* Tue Dec 8 2015 Mamoru TASAKA - 3.4.0-1 -- 3.4.0 -- Once disable tests - * Sun Aug 2 2015 Mamoru TASAKA - 3.3.1-2 - Enable tests again @@ -376,7 +137,7 @@ cucumber \ - 2.14.4 * Fri Sep 27 2013 Mamoru TASAKA - 2.14.3-1 -- 2.14.3 +- 2.14.3 * Fri Aug 16 2013 Mamoru TASAKA - 2.14.2-2 - Enable test suite again diff --git a/sources b/sources index 4d0ea5c..39520c9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rspec-expectations-3.13.5.gem) = 4fde5ddae1c723bb3f25c65db61ec959146b1b92a08ddf09d4caf1164d25fd67e4d6d7a73b576fdb48477a3ee54763a8a2d3b93ea573ba6962d65ae80379cd03 -SHA512 (rubygem-rspec-expectations-3.13.5-full.tar.gz) = 057bf2ff409248ab4a37bc615806e786cdcf4324bd47bb606459a6ceece07799dc488838d008511bb7d798db6b8dddf2339cb6509c2d78911aa9aa06f50607ea +3dc41c78237e80e001cde33c987bb737 rspec-expectations-3.3.1.gem +7ae26774c192aa934df10673367b0280 rubygem-rspec-expectations-3.3.1-full.tar.gz