Compare commits
13 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
474d1f7c63 | ||
|
|
7effbf81cb | ||
|
|
e8c2a97d1a | ||
|
|
3f7c63406e | ||
|
|
87bc1190a3 | ||
|
|
45cdfd6fec | ||
|
|
29635ced96 | ||
|
|
cdd2413fa0 | ||
|
|
91ba31bd1c | ||
|
|
ca81d02368 | ||
|
|
0e1e9960be | ||
|
|
5453556202 | ||
|
|
229ca4c56a |
4 changed files with 103 additions and 9 deletions
51
rspec-core-pr282-ruby4_0-source_location.patch
Normal file
51
rspec-core-pr282-ruby4_0-source_location.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
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-core/lib/rspec/core/hooks.rb b/rspec-core/lib/rspec/core/hooks.rb
|
||||
index f97962ce9..77eecc776 100644
|
||||
--- a/rspec-core/lib/rspec/core/hooks.rb
|
||||
+++ b/rspec-core/lib/rspec/core/hooks.rb
|
||||
@@ -395,7 +395,7 @@ def execute_with(example, procsy)
|
||||
|
||||
if Proc.method_defined?(:source_location)
|
||||
def hook_description
|
||||
- "around hook at #{Metadata.relative_path(block.source_location.join(':'))}"
|
||||
+ "around hook at #{Metadata.relative_path(block.source_location.take(2).join(':'))}"
|
||||
end
|
||||
else # for 1.8.7
|
||||
# :nocov:
|
||||
diff --git a/rspec-core/lib/rspec/core/metadata.rb b/rspec-core/lib/rspec/core/metadata.rb
|
||||
index e887cb1c5..ed47bc07b 100644
|
||||
--- a/rspec-core/lib/rspec/core/metadata.rb
|
||||
+++ b/rspec-core/lib/rspec/core/metadata.rb
|
||||
@@ -146,7 +146,7 @@ def populate_location_attributes
|
||||
file_path, line_number = if backtrace
|
||||
file_path_and_line_number_from(backtrace)
|
||||
elsif block.respond_to?(:source_location)
|
||||
- block.source_location
|
||||
+ block.source_location.take(2)
|
||||
else
|
||||
file_path_and_line_number_from(caller)
|
||||
end
|
||||
diff --git a/rspec-core/lib/rspec/core/shared_example_group.rb b/rspec-core/lib/rspec/core/shared_example_group.rb
|
||||
index b4a5dc317..1f2b9d623 100644
|
||||
--- a/rspec-core/lib/rspec/core/shared_example_group.rb
|
||||
+++ b/rspec-core/lib/rspec/core/shared_example_group.rb
|
||||
@@ -243,7 +243,7 @@ def warn_if_key_taken(context, key, new_block)
|
||||
|
||||
if RUBY_VERSION.to_f >= 1.9
|
||||
def formatted_location(block)
|
||||
- block.source_location.join(":")
|
||||
+ block.source_location.take(2).join(":")
|
||||
end
|
||||
else # 1.8.7
|
||||
# :nocov:
|
||||
|
|
@ -14,10 +14,9 @@ CURRDIR=$(pwd)
|
|||
TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX)
|
||||
pushd $TMPDIRPATH
|
||||
|
||||
git clone https://github.com/rspec/$1.git
|
||||
pushd $1
|
||||
git reset --hard v$2
|
||||
popd
|
||||
git clone https://github.com/rspec/rspec.git
|
||||
pushd rspec
|
||||
git reset --hard $1-v$2
|
||||
|
||||
ln -sf $1 $1-$2
|
||||
tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
%global majorver 3.13.0
|
||||
%global majorver 3.13.6
|
||||
#%%global preminorver .rc6
|
||||
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
||||
%global fullver %{majorver}%{?preminorver}
|
||||
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
|
||||
%global gem_name rspec-core
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ Release: %{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}
|
|||
|
||||
# SPDX confirmed
|
||||
License: MIT
|
||||
URL: http://github.com/rspec/rspec-core
|
||||
URL: https://rspec.info
|
||||
Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
||||
# %%{SOURCE2} %%{name} %%{version}
|
||||
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
||||
|
|
@ -36,6 +36,9 @@ Source2: rspec-related-create-full-tarball.sh
|
|||
# Adjust backtrace filter for Fedora placement of StdLib.
|
||||
# https://github.com/rspec/rspec-core/pull/2881
|
||||
Patch0: rubygem-rspec-core-3.10.1-Filter-content-of-usr-share-ruby.patch
|
||||
# https://github.com/rspec/rspec/pull/282/commits/1c20fa80772ca7a1ed0512056ce7cd6a94f8e68d
|
||||
# Support ruby4_0 source_location behavior change
|
||||
Patch1: rspec-core-pr282-ruby4_0-source_location.patch
|
||||
|
||||
#BuildRequires: ruby(release)
|
||||
BuildRequires: rubygems-devel
|
||||
|
|
@ -45,6 +48,7 @@ BuildRequires: rubygem(rake)
|
|||
BuildRequires: rubygem(rspec)
|
||||
BuildRequires: rubygem(test-unit)
|
||||
BuildRequires: rubygem(coderay)
|
||||
BuildRequires: rubygem(drb)
|
||||
BuildRequires: rubygem(thread_order)
|
||||
BuildRequires: git
|
||||
|
||||
|
|
@ -89,6 +93,7 @@ This package contains documentation for %{name}.
|
|||
%prep
|
||||
%setup -q -T -n %{gem_name}-%{version} -b 1
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p2
|
||||
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
|
|
@ -208,6 +213,45 @@ done
|
|||
%{gem_docdir}
|
||||
|
||||
%changelog
|
||||
* Tue Dec 02 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.6-2
|
||||
- Backport upstream patch to support ruby4_0 source_location behavior change
|
||||
|
||||
* Mon Oct 20 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.6-1
|
||||
- 3.13.6
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.13.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jun 27 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.5-1
|
||||
- 3.13.5
|
||||
|
||||
* Thu May 29 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.4-1
|
||||
- 3.13.4
|
||||
|
||||
* Tue Feb 11 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.3-1
|
||||
- 3.13.3
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.13.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sun Nov 17 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.2-4
|
||||
- Workaround syntax_suggest 2.0.2 change
|
||||
|
||||
* Fri Nov 15 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.2-3
|
||||
- Fix for ruby34 string behavior to be chilled
|
||||
|
||||
* Wed Nov 06 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.2-2
|
||||
- add BR: rubygem(drb) for ruby34
|
||||
|
||||
* Mon Oct 21 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.2-1
|
||||
- 3.13.2
|
||||
|
||||
* Thu Sep 05 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.1-1
|
||||
- 3.13.1
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.13.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Feb 09 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.13.0-1
|
||||
- 3.13.0
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (rspec-core-3.13.0.gem) = b24746c74ba6571c04ba1d95de3c557cc208870075cf7e9f603b18ac8b8dafbf5b2c8b2c58f564e91c58002947a64b5b30eed37069910e7d5bfa175faa2a58de
|
||||
SHA512 (rubygem-rspec-core-3.13.0-full.tar.gz) = bfeb033a882769adbf65e2ce2cc2f6b3fcf2ad1095575fdb7d89b36b7d41af316119fe97020b10b3a8019c44db8464559c304a0e6fafaf8ba57df9e4f1cf9ff6
|
||||
SHA512 (rspec-core-3.13.6.gem) = 8456a4505bd990a968630da475fd5222a15e0641db26d0efbf63e5d1d8edea702c7982297c4fd7e647167b7204127e4dd6d49480a9556faa65f06e0ce8ad3513
|
||||
SHA512 (rubygem-rspec-core-3.13.6-full.tar.gz) = 2cb5c5ffe9c76a58385ccac68fbbc696e6c542cf68007ab81b29e5ad6ecc97ec05cd34eb1006b2be1d70c826ab520b32e37182bbd14f662260996a1e5aa1bf06
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue