From 288b9b90dd26cfcedd590bb6ef4f691d38e6c290 Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Fri, 11 Aug 2023 16:46:07 +0800 Subject: [PATCH] Fix rubygem-expression_parser test failure caused by ruby upgrade to 3.2.2 (cherry picked from commit 0703ad97c37ae2ecbc14d4dd531c5b2641da10d5) --- Fix-rubygem-expression_parser-test-failure.patch | 12 ++++++++++++ rubygem-rspec2-core.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Fix-rubygem-expression_parser-test-failure.patch diff --git a/Fix-rubygem-expression_parser-test-failure.patch b/Fix-rubygem-expression_parser-test-failure.patch new file mode 100644 index 0000000..51ff620 --- /dev/null +++ b/Fix-rubygem-expression_parser-test-failure.patch @@ -0,0 +1,12 @@ +diff -Naur a/lib/rspec/core/ruby_project.rb b/lib/rspec/core/ruby_project.rb +--- a/lib/rspec/core/ruby_project.rb 2023-08-11 16:28:19.863503691 +0800 ++++ b/lib/rspec/core/ruby_project.rb 2023-08-11 16:29:29.028511667 +0800 +@@ -24,7 +24,7 @@ + end + + def find_first_parent_containing(dir) +- ascend_until {|path| File.exists?(File.join(path, dir))} ++ ascend_until {|path| File.exist?(File.join(path, dir))} + end + + def ascend_until diff --git a/rubygem-rspec2-core.spec b/rubygem-rspec2-core.spec index 224ead2..9d599fd 100644 --- a/rubygem-rspec2-core.spec +++ b/rubygem-rspec2-core.spec @@ -8,7 +8,7 @@ Summary: Rspec 2 runner and formatters Name: rubygem-%{rpmgem_name} Version: %{majorver} -Release: 2 +Release: 3 License: MIT URL: http://github.com/rspec/rspec-core Source0: http://rubygems.org/gems/%{gem_name}-%{fullver}.gem @@ -17,6 +17,7 @@ Patch0: rubygem-rspec-core-2.14.8-ruby24.patch # F-26 uses aruba 0.14.x, which uses rspec3 and so incompatible with rspec2. # Remove aruba dependency Patch1: rubygem-rspec-core-2.14.8-remove-aruba-dependency.patch +Patch2: Fix-rubygem-expression_parser-test-failure.patch Source1: rspec2 BuildRequires: ruby(release) rubygems-devel %if 0%{?need_bootstrap_set} < 1 @@ -48,6 +49,7 @@ sed -i \ spec/support/helper_methods.rb %patch0 -p1 %patch1 -p1 +%patch2 -p1 gem specification %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build @@ -106,6 +108,9 @@ popd %exclude %{gem_instdir}/spec/ %changelog +* Fri Aug 11 2023 yaoxin - 2.14.8-3 +- Fix rubygem-expression_parser test failure caused by ruby upgrade to 3.2.2 + * Mon Sep 7 2020 liyanan - 2.14.8-2 - fix build fail -- Gitee