%global gem_name fakefs Name: rubygem-%{gem_name} Version: 1.2.2 Release: 2 Summary: A fake filesystem. Use it in your tests License: MIT URL: https://github.com/fakefs/fakefs Source0: https://rubygems.org/gems/fakefs-%{version}.gem Source1: https://github.com/fakefs/fakefs/archive/v%{version}/fakefs-%{version}-tests.tar.gz # Skip test of methods introduced in Ruby 2.5. # https://github.com/fakefs/fakefs/issues/390 # From https://github.com/fakefs/fakefs/pull/467 # ruby3.2 does not respond to Pathname#=~ Patch0: rubygem-fakefs-1.4.1-regexmatch-for-pathname-ruby32.patch # From https://github.com/fakefs/fakefs/pull/480 # Test suite needs more filtering for ruby3.2 Patch1: rubygem-fakefs-1.9.0-ruby32-testsuite.patch BuildRequires: ruby(release) rubygems-devel ruby rubygem(rspec) rubygem(minitest) BuildArch: noarch %description A fake filesystem. Use it in your tests. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 %patch0 -p1 cd %{_builddir}/test %patch1 -p2 %build gem build ../%{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} ln -s %{_builddir}/{spec,test} . rspec spec sed -i '/bundler/ s/^/#/' test/test_helper.rb sed -i '/maxitest\/autorun/ s/^/#/' test/test_helper.rb LC_ALL=C.UTF-8 ruby -Ilib -rminitest/autorun -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/README.md %changelog * Tue Aug 01 2023 chenchen - 1.2.2-2 - fix build error for ruby upgrade to 3.2.2 * Thu Feb 10 2022 zhangtao - 1.2.2-1 - package update to 1.2.2 * Thu Jul 30 2020 maminjie - 0.13.1-1 - package init