Compare commits
No commits in common. "rawhide" and "f36" have entirely different histories.
4 changed files with 21 additions and 181 deletions
|
|
@ -1,51 +0,0 @@
|
|||
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,9 +14,10 @@ CURRDIR=$(pwd)
|
|||
TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX)
|
||||
pushd $TMPDIRPATH
|
||||
|
||||
git clone https://github.com/rspec/rspec.git
|
||||
pushd rspec
|
||||
git reset --hard $1-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/./
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
%global majorver 3.13.6
|
||||
%global majorver 3.11.0
|
||||
#%%global preminorver .rc6
|
||||
%global rpmminorver .%(echo %preminorver | sed -e 's|^\\.\\.*||')
|
||||
%global fullver %{majorver}%{?preminorver}
|
||||
|
||||
%global baserelease 2
|
||||
%global fedorarel 2
|
||||
|
||||
%global gem_name rspec-core
|
||||
|
||||
|
|
@ -13,22 +13,15 @@
|
|||
# pulled by aruba
|
||||
%bcond_with bootstrap
|
||||
|
||||
# Disable Aruba support in RHEL due to excesive dependency chain. This also
|
||||
# disables Cucumber integration test suite, which depends on Aruba as well.
|
||||
%if ! 0%{?rhel}
|
||||
%bcond_without aruba
|
||||
%endif
|
||||
|
||||
%undefine __brp_mangle_shebangs
|
||||
|
||||
Summary: RSpec runner and formatters
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: %{majorver}
|
||||
Release: %{?preminorver:0.}%{baserelease}%{?preminorver:%{rpmminorver}}%{?dist}
|
||||
Release: %{?preminorver:0.}%{fedorarel}%{?preminorver:%{rpmminorver}}%{?dist}
|
||||
|
||||
# SPDX confirmed
|
||||
License: MIT
|
||||
URL: https://rspec.info
|
||||
URL: http://github.com/rspec/rspec-mocks
|
||||
Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem
|
||||
# %%{SOURCE2} %%{name} %%{version}
|
||||
Source1: rubygem-%{gem_name}-%{version}-full.tar.gz
|
||||
|
|
@ -36,9 +29,6 @@ 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
|
||||
|
|
@ -46,19 +36,17 @@ BuildRequires: rubygems-devel
|
|||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(rake)
|
||||
BuildRequires: rubygem(rspec)
|
||||
BuildRequires: rubygem(test-unit)
|
||||
BuildRequires: rubygem(coderay)
|
||||
BuildRequires: rubygem(drb)
|
||||
BuildRequires: rubygem(thread_order)
|
||||
BuildRequires: git
|
||||
|
||||
%if %{with aruba}
|
||||
BuildRequires: rubygem(aruba)
|
||||
# Newly
|
||||
BuildRequires: rubygem(flexmock)
|
||||
BuildRequires: rubygem(mocha)
|
||||
BuildRequires: rubygem(rr)
|
||||
BuildRequires: rubygem(coderay)
|
||||
BuildRequires: rubygem(thread_order)
|
||||
BuildRequires: git
|
||||
# New test
|
||||
BuildRequires: rubygem(cucumber)
|
||||
%endif
|
||||
BuildRequires: rubygem(test-unit)
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
BuildRequires: glibc-langpack-en
|
||||
|
|
@ -92,8 +80,7 @@ This package contains documentation for %{name}.
|
|||
|
||||
%prep
|
||||
%setup -q -T -n %{gem_name}-%{version} -b 1
|
||||
%patch -P0 -p1
|
||||
%patch -P1 -p2
|
||||
%patch0 -p1
|
||||
gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
|
|
@ -108,20 +95,8 @@ cp -a .%{_prefix}/* %{buildroot}%{_prefix}/
|
|||
rm -f %{buildroot}%{gem_instdir}/{.document,.yardopts}
|
||||
|
||||
%check
|
||||
%if %{with bootstrap}
|
||||
# Not do actual check, exiting.
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%if %{without bootstrap}
|
||||
LANG=C.UTF-8
|
||||
|
||||
%if %{without aruba}
|
||||
# Avoid dependency on Aruba. The files needs to be present, since they are
|
||||
# listed by `git ls-files` from 'library wide checks' shared example.
|
||||
truncate -s 0 spec/support/aruba_support.rb
|
||||
find spec/integration -exec truncate -s 0 {} \;
|
||||
%endif
|
||||
|
||||
# Adjust the backtrace filters to our directory layout.
|
||||
sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \
|
||||
spec/integration/{suite_hooks_errors,spec_file_load_errors}_spec.rb
|
||||
|
|
@ -130,24 +105,9 @@ sed -i '/backtrace_exclusion_patterns/ s/rspec-core/rspec-core-%{version}/' \
|
|||
sed -i spec/integration/spec_file_load_errors_spec.rb \
|
||||
-e '\@nicely handles load-time errors in user spec files@s| it | xit |'
|
||||
|
||||
# ruby3.2 + compile with YJIT + LTO seems to make rspec-core GC test fail.
|
||||
# disabling this, per ruby upsteram advice:
|
||||
# https://bugs.ruby-lang.org/issues/19254
|
||||
sed -i spec/rspec/core/example_spec.rb \
|
||||
-e '\@defined.*RUBY_ENGINE.*truffleruby@s|^\(.*\)$|\1 \&\& false|'
|
||||
|
||||
# RSpec uses only one thread local variable: disable for now
|
||||
sed -i spec/rspec/core_spec.rb \
|
||||
-e '\@only one thread local variable@s| it | xit |'
|
||||
|
||||
# FIXME seed 33413 sees test failure
|
||||
ruby -Ilib -S exe/rspec --seed 1 #33413
|
||||
|
||||
%if %{without aruba}
|
||||
# The following lines are for cucumber tests, so exiting.
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
# Mark failing test as broken
|
||||
sed -i features/command_line/init.feature \
|
||||
-e 's|^\([ \t]*\)\(Scenario: Accept and use the recommended settings\)|\1@broken\n\1\2|'
|
||||
|
|
@ -164,7 +124,7 @@ done
|
|||
%endif
|
||||
|
||||
# cucumber 7.0.0 does not support ~@
|
||||
sed -i cucumber.yml -e 's|~@wip|"not @wip"|'
|
||||
sed -i cucumber.yml -e "s|~@wip|'not @wip'|"
|
||||
sed -i features/support/require_expect_syntax_in_aruba_specs.rb -e 's|~@|not @|g'
|
||||
# Perhaps with cucumber 7.0.0 change? (along with diff-lcs updated to 1.5)
|
||||
sed -i features/support/diff_lcs_versions.rb -e 's|scenario.title|scenario.name|'
|
||||
|
|
@ -195,6 +155,8 @@ do
|
|||
done
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
|
||||
|
|
@ -213,78 +175,6 @@ 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
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jul 22 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.12.2-3
|
||||
- Fix one failing test related to thread local variable
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Apr 19 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.12.2-1
|
||||
- 3.12.2
|
||||
|
||||
* Fri Mar 03 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.12.1-2
|
||||
- Disable unwanted dependencies in RHEL builds
|
||||
|
||||
* Fri Feb 10 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.12.1-1
|
||||
- 3.12.1
|
||||
|
||||
* Thu Jan 19 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.12.0-2
|
||||
- Disable GC related test, with the advice from ruby upstream
|
||||
|
||||
* Thu Oct 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.12.0-1
|
||||
- 3.12.0
|
||||
|
||||
* Thu Sep 29 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.11.0-3
|
||||
- Backport upstream fix to eliminate Fixnum usage removed on Ruby 3.2
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.11.0-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon Jun 6 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.11.0-2
|
||||
- Specify seed for rspec to avoid random failure for now
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (rspec-core-3.13.6.gem) = 8456a4505bd990a968630da475fd5222a15e0641db26d0efbf63e5d1d8edea702c7982297c4fd7e647167b7204127e4dd6d49480a9556faa65f06e0ce8ad3513
|
||||
SHA512 (rubygem-rspec-core-3.13.6-full.tar.gz) = 2cb5c5ffe9c76a58385ccac68fbbc696e6c542cf68007ab81b29e5ad6ecc97ec05cd34eb1006b2be1d70c826ab520b32e37182bbd14f662260996a1e5aa1bf06
|
||||
SHA512 (rspec-core-3.11.0.gem) = 2cec4af0ac69776a4846ef93e98f5459e346b22b9f118aa3fb65c71b8fcecd3d6d156ffba0a6509fb11c9d9e3d88badcece23055e4f3ea0f4ef6e867372fc9b9
|
||||
SHA512 (rubygem-rspec-core-3.11.0-full.tar.gz) = b21894403df5bdb7a0456b490cf69c42ecdda54a3dcfd64f91d2ca7d63a339e1b08f595bfa8612ce49f718db526f63acda44bff11ae13a58ba8edfe0cacdcfdc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue