From aa13a61c2d6194e4997d04c2f5375de54d0521fd Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Tue, 1 Aug 2023 11:14:41 +0800 Subject: [PATCH] Fix build error for ruby3.2 --- ...do-0.3.10-ruby32-File-exists-removal.patch | 24 +++++++++++++++++++ rubygem-shindo.spec | 9 +++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 rubygem-shindo-0.3.10-ruby32-File-exists-removal.patch diff --git a/rubygem-shindo-0.3.10-ruby32-File-exists-removal.patch b/rubygem-shindo-0.3.10-ruby32-File-exists-removal.patch new file mode 100644 index 0000000..ea0610e --- /dev/null +++ b/rubygem-shindo-0.3.10-ruby32-File-exists-removal.patch @@ -0,0 +1,24 @@ +From d779e7b4e4f7bdfe352b0134c7eca6b11e6e1b3e Mon Sep 17 00:00:00 2001 +From: Peter Goldstein +Date: Thu, 27 Jan 2022 16:21:51 -0800 +Subject: [PATCH] Add Ruby 3.1 to CI + +Origin: https://github.com/geemus/shindo/commit/d779e7b + +--- + lib/shindo/bin.rb | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/shindo/bin.rb b/lib/shindo/bin.rb +index a7396e8..9ddc6ed 100644 +--- a/lib/shindo/bin.rb ++++ b/lib/shindo/bin.rb +@@ -29,7 +29,7 @@ + if File.directory?(path) + tests ||= [] + tests |= Dir.glob(File.join(path, '**', '*tests.rb')) +- elsif File.exists?(path) ++ elsif File.exist?(path) + tests ||= [] + tests << path + else diff --git a/rubygem-shindo.spec b/rubygem-shindo.spec index 77f29c2..7cc7729 100644 --- a/rubygem-shindo.spec +++ b/rubygem-shindo.spec @@ -1,13 +1,15 @@ %global gem_name shindo Name: rubygem-%{gem_name} Version: 0.3.10 -Release: 1 +Release: 2 Summary: Simple depth first Ruby testing License: MIT URL: http://github.com/geemus/shindo Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # 'ubygems' script was dropped from Ruby 2.5. # https://github.com/geemus/shindo/pull/17 + +Patch0: rubygem-shindo-0.3.10-ruby32-File-exists-removal.patch BuildRequires: ruby(release) rubygems-devel ruby rubygem(formatador) >= 0.1.1 BuildArch: noarch %description @@ -21,7 +23,7 @@ BuildArch: noarch Documentation for %{name}. %prep -%setup -q -n %{gem_name}-%{version} +%autosetup -n %{gem_name}-%{version} -p1 %build gem build ../%{gem_name}-%{version}.gemspec @@ -62,6 +64,9 @@ popd %{gem_instdir}/LICENSE.md %changelog +* Tue Aug 01 2023 wangkai <13474090681@163.com> - 0.3.10-2 +- Fix build error for ruby3.2 + * Thu Jun 30 2022 houyingchao - 0.3.10-1 - Upgrade to 0.3.10