Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf30e4437e | ||
|
|
6ac0794a0c | ||
|
|
87a8d5773d | ||
|
|
c3034a91e2 | ||
|
|
f0a6901ca4 | ||
|
|
25ee37d907 | ||
|
|
7e36ca6a61 |
5 changed files with 139 additions and 9 deletions
25
rspec-expectations-pr282-ruby4_0-source_location.patch
Normal file
25
rspec-expectations-pr282-ruby4_0-source_location.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 1c20fa80772ca7a1ed0512056ce7cd6a94f8e68d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jon Rowe <hello@jonrowe.co.uk>
|
||||||
|
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
|
||||||
|
|
@ -14,10 +14,12 @@ CURRDIR=$(pwd)
|
||||||
TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX)
|
TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX)
|
||||||
pushd $TMPDIRPATH
|
pushd $TMPDIRPATH
|
||||||
|
|
||||||
git clone https://github.com/rspec/$1.git
|
git clone https://github.com/rspec/rspec.git
|
||||||
pushd $1
|
pushd rspec
|
||||||
git reset --hard v$2
|
|
||||||
popd
|
# 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
|
ln -sf $1 $1-$2
|
||||||
tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./
|
tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%global majorver 3.13.3
|
%global majorver 3.13.5
|
||||||
#%%global preminorver .rc6
|
#%%global preminorver .rc6
|
||||||
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
||||||
%global fullver %{majorver}%{?preminorver}
|
%global fullver %{majorver}%{?preminorver}
|
||||||
|
|
||||||
%global baserelease 1
|
%global baserelease 4
|
||||||
|
|
||||||
%global gem_name rspec-expectations
|
%global gem_name rspec-expectations
|
||||||
|
|
||||||
|
|
@ -18,11 +18,17 @@ Release: %{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}
|
||||||
|
|
||||||
# SPDX confirmed
|
# SPDX confirmed
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://github.com/rspec/rspec-expectations
|
URL: https://rspec.info
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
Source0: https://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
||||||
# %%{SOURCE2} %%{name} %%{version}
|
# %%{SOURCE2} %%{name} %%{version}
|
||||||
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
||||||
Source2: rspec-related-create-full-tarball.sh
|
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
|
BuildRequires: rubygems-devel
|
||||||
|
|
@ -55,6 +61,9 @@ This package contains documentation for %{name}.
|
||||||
%prep
|
%prep
|
||||||
%setup -q -T -n %{gem_name}-%{version} -b 1
|
%setup -q -T -n %{gem_name}-%{version} -b 1
|
||||||
|
|
||||||
|
%patch -P0 -p1
|
||||||
|
%patch -P1 -p2
|
||||||
|
|
||||||
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
@ -84,6 +93,13 @@ rspec spec/
|
||||||
exit 0
|
exit 0
|
||||||
%endif
|
%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...
|
# 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 '\@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|'
|
sed -i features/built_in_matchers/include.feature -e 's|^\([ \t]*\)\(Scenario: counts usage.*\)|\1@skip-on-fedora\n\1\2|'
|
||||||
|
|
@ -109,6 +125,27 @@ cucumber \
|
||||||
%{gem_docdir}
|
%{gem_docdir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 01 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.5-4
|
||||||
|
- Fix compatibility for minitest 6
|
||||||
|
|
||||||
|
* Tue Dec 02 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.5-3
|
||||||
|
- Backport upstream patch to support ruby4_0 source_location behavior change
|
||||||
|
|
||||||
|
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.13.5-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu May 29 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.5-1
|
||||||
|
- 3.13.5
|
||||||
|
|
||||||
|
* Thu May 15 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.4-1
|
||||||
|
- 3.13.4
|
||||||
|
|
||||||
|
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.13.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Dec 29 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.3-2
|
||||||
|
- Backport upstream fix to support ruby34 Hash inspect syntax
|
||||||
|
|
||||||
* Sun Sep 08 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.3-1
|
* Sun Sep 08 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.3-1
|
||||||
- 3.13.3
|
- 3.13.3
|
||||||
|
|
||||||
|
|
|
||||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
||||||
SHA512 (rspec-expectations-3.13.3.gem) = 887d378bccf08f8f42dd3b580dc67dac0d91b7e08a23ab924bd8d618fae2f37132048b473a288a9f1c40096271e4312c28fc91383a074eda53d62939bb8c58fe
|
SHA512 (rspec-expectations-3.13.5.gem) = 4fde5ddae1c723bb3f25c65db61ec959146b1b92a08ddf09d4caf1164d25fd67e4d6d7a73b576fdb48477a3ee54763a8a2d3b93ea573ba6962d65ae80379cd03
|
||||||
SHA512 (rubygem-rspec-expectations-3.13.3-full.tar.gz) = 0bd40f246fe44c76e489a7af44d5ccdad0ad346c6e8b1ec0c623d61f02e15fa70a3c014360a517b71be2b1a3adf261c079ebe0d198c5692a3c34fc8269495d9d
|
SHA512 (rubygem-rspec-expectations-3.13.5-full.tar.gz) = 057bf2ff409248ab4a37bc615806e786cdcf4324bd47bb606459a6ceece07799dc488838d008511bb7d798db6b8dddf2339cb6509c2d78911aa9aa06f50607ea
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue