diff --git a/.gitignore b/.gitignore index 2c577c2..fc7c02d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/minitest-around-*.gem -/minitest-around-*-test-missing-files.tar.gz +/minitest-around-0.4.0.gem +/minitest-around-0.4.1.gem diff --git a/minitest-around-0.5.0-minitest6.patch b/minitest-around-0.5.0-minitest6.patch deleted file mode 100644 index df15bcc..0000000 --- a/minitest-around-0.5.0-minitest6.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff -urp '--exclude=*~' minitest-around-0.5.0.orig/test/around_spec.rb minitest-around-0.5.0/test/around_spec.rb ---- minitest-around-0.5.0.orig/test/around_spec.rb 2025-12-27 12:59:36.309463102 +0900 -+++ minitest-around-0.5.0/test/around_spec.rb 2025-12-27 13:08:40.396453842 +0900 -@@ -16,7 +16,7 @@ describe "Minitest Around" do - end - - it "runs around" do -- $before.must_equal true -+ _($before).must_equal true - end - end - -@@ -30,7 +30,7 @@ describe "Minitest Around" do - end - - it "stays in context" do -- @x.must_equal 2 -+ _(@x).must_equal 2 - end - end - -@@ -40,9 +40,9 @@ describe "Minitest Around" do - before { list << 2 } - after do - if @xxx == 1 -- list.must_equal [1, 2, 3, 4, 5, 9, 8, 7, 6] -+ _(list).must_equal [1, 2, 3, 4, 5, 9, 8, 7, 6] - elsif @xxx == 2 -- list.must_equal [1, 2, 3, 4, 5, 51, 9, 8, 7, 6] -+ _(list).must_equal [1, 2, 3, 4, 5, 51, 9, 8, 7, 6] - else - raise - end -@@ -55,7 +55,7 @@ describe "Minitest Around" do - - it "orders" do - @xxx = 1 -- list.must_equal [1, 2, 3, 4, 5] -+ _(list).must_equal [1, 2, 3, 4, 5] - end - - describe "more nesting fun" do -@@ -63,7 +63,7 @@ describe "Minitest Around" do - - it "orders" do - @xxx = 2 -- list.must_equal [1, 2, 3, 4, 5, 51] -+ _(list).must_equal [1, 2, 3, 4, 5, 51] - end - end - end -@@ -78,8 +78,8 @@ describe "Minitest Around" do - end - RUBY - -- output.must_include "ArgumentError: ArgumentError" -- output.wont_include "FiberError" -+ _(output).must_include "ArgumentError: ArgumentError" -+ _(output).wont_include "FiberError" - end - end - -@@ -98,7 +98,7 @@ describe "Minitest Around" do - it("x") {} - end - RUBY -- output.must_include("ENSURE") -+ _(output).must_include("ENSURE") - end - end - end -diff -urp '--exclude=*~' minitest-around-0.5.0.orig/test/nested_spec.rb minitest-around-0.5.0/test/nested_spec.rb ---- minitest-around-0.5.0.orig/test/nested_spec.rb 2025-12-27 12:59:36.309837879 +0900 -+++ minitest-around-0.5.0/test/nested_spec.rb 2025-12-27 13:09:14.321620383 +0900 -@@ -9,7 +9,7 @@ describe 'Outer' do - end - after do - var << :after -- var.must_equal [:before, :begin, :ibefore, :ibegin, :during, :iend, :iafter, :end, :after] -+ _(var).must_equal [:before, :begin, :ibefore, :ibegin, :during, :iend, :iafter, :end, :after] - end - around do |test| - var << :begin diff --git a/minitest-around-create-missing-test-files.sh b/minitest-around-create-missing-test-files.sh deleted file mode 100644 index 1bc2062..0000000 --- a/minitest-around-create-missing-test-files.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -usage() { - echo "$0 " -} - -set -e -set -x - -if [ $# -lt 1 ] ; then - usage - exit 1 -fi - -VERSION=$1 -REPONAME=minitest-around - -TMPDIR=$(mktemp -d /var/tmp/minitest-around-XXXXXX) -CURDIR=$(pwd) - -pushd $TMPDIR - -git clone https://github.com/splattael/${REPONAME}.git -cd ${REPONAME}/ - -git reset --hard v$VERSION -cd .. -ln -sf ${REPONAME} ${REPONAME}-${VERSION} -tar czf $CURDIR/${REPONAME}-${VERSION}-test-missing-files.tar.gz \ - ${REPONAME}-${VERSION}/config/ \ - ${REPONAME}-${VERSION}/features/ \ - ${REPONAME}-${VERSION}/test/ \ - -popd -rm -rf $TMPDIR - diff --git a/rubygem-minitest-around.spec b/rubygem-minitest-around.spec index 8b628f7..d06a5cb 100644 --- a/rubygem-minitest-around.spec +++ b/rubygem-minitest-around.spec @@ -1,42 +1,42 @@ -%global gem_name minitest-around +%global gem_name minitest-around -Name: rubygem-%{gem_name} -Version: 0.6.0 -Release: 1%{?dist} - -Summary: Around block for minitest -License: MIT -URL: https://github.com/splattael/minitest-around - -Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem -Source1: %{gem_name}-%{version}-test-missing-files.tar.gz -# Source1 is created from $ bash %%SOURCE2 %%version -Source2: %{gem_name}-create-missing-test-files.sh - -BuildRequires: ruby(release) -BuildRequires: rubygems-devel -BuildRequires: rubygem(minitest) -BuildRequires: rubygem(cucumber) -BuildArch: noarch +Name: rubygem-%{gem_name} +Version: 0.4.1 +Release: 10%{?dist} +Summary: Around block for minitest +License: MIT +URL: https://github.com/splattael/minitest-around +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +BuildRequires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(cucumber) +BuildArch: noarch %description Alternative for setup/teardown dance. -%package doc -Summary: Documentation for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch +%package doc +Summary: Documentation for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch -%description doc +%description doc Documentation for %{name}. %prep -%setup -q -n %{gem_name}-%{version} -b 1 +gem unpack %{SOURCE0} + +%setup -q -D -T -n %{gem_name}-%{version} + +# cucumber 7 syntax change +sed -i config/cucumber.yml -e "s|~@ignore|'not @ignore'|" +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build # Create the gem as gem install only works on a gem file -gem build ../%{gem_name}-%{version}.gemspec +gem build %{gem_name}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install @@ -45,25 +45,17 @@ gem build ../%{gem_name}-%{version}.gemspec %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ - %{buildroot}%{gem_dir}/ + %{buildroot}%{gem_dir}/ + + -rm -f %{buildroot}%{gem_cache} # Run the test suite %check -cp -a \ - test/ \ - features/ \ - .%{gem_instdir} - -export CUCUMBER_PUBLISH_QUIET=true - pushd .%{gem_instdir} -sed -i "/require 'bundler/ s/^/#/" test/test_helper.rb -env RUBYOPT=-Ilib \ - ruby -e 'Dir.glob "./test/*_{test,spec}.rb", &method(:require)' -env RUBYOPT=-Ilib \ - cucumber --tag 'not @todo' --tag 'not @rspec' + sed -i "/require 'bundler/ s/^/#/" test/helper.rb + RUBYOPT=-Ilib ruby -e 'Dir.glob "./test/*_{test,spec}.rb", &method(:require)' + RUBYOPT=-Ilib cucumber --tag 'not @todo' --tag 'not @rspec' popd %files @@ -72,44 +64,20 @@ popd %license %{gem_instdir}/LICENSE %{gem_libdir} %{gem_spec} +%exclude %{gem_instdir}/.* +%exclude %{gem_cache} %files doc %doc %{gem_docdir} +%exclude %{gem_instdir}/config +%exclude %{gem_instdir}/features +%exclude %{gem_instdir}/Gemfile +%exclude %{gem_instdir}/Rakefile +%exclude %{gem_instdir}/examples +%exclude %{gem_instdir}/minitest-around.gemspec +%exclude %{gem_instdir}/test %changelog -* Fri Jan 02 2026 Mamoru TASAKA - 0.6.0-1 -- 0.6.0 - -* Sat Dec 27 2025 Mamoru TASAKA - 0.5.0-7 -- Fix compatibility with minitest 6 - -* Sat Dec 27 2025 Mamoru TASAKA - 0.5.0-6 -- Use recent gem2rpm style - -* Fri Jul 25 2025 Fedora Release Engineering - 0.5.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 0.5.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 19 2024 Fedora Release Engineering - 0.5.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jan 26 2024 Fedora Release Engineering - 0.5.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Oct 16 2023 Ilia Gradina - 0.5.0-1 -- Update to 0.5.0 - -* Fri Jul 21 2023 Fedora Release Engineering - 0.4.1-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jan 20 2023 Fedora Release Engineering - 0.4.1-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 0.4.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - * Fri Jan 21 2022 Fedora Release Engineering - 0.4.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index ddaa265..7c57329 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (minitest-around-0.6.0.gem) = 4db83f3f4313669a983fbcec54af8a213fc557c7cf4d6077661f9eac23546e564c1875256ba70c6d13a472ede26cf3e4ad09af010a241a638c71ee90a18cabec -SHA512 (minitest-around-0.6.0-test-missing-files.tar.gz) = 930991a23561079ed89bd16442590b28fd59bace022e8452ad739de69d134b5b64132264b5d2a54f996d138c5f4962fe5ade963bb70ed8c0f1116a76b5e49464 +SHA512 (minitest-around-0.4.1.gem) = ae13ebd44f1e9cab49eff42f02f500d72c5d1fa53493259b38918f84fbe231980623fe27e92f2f0bffd95c214d8eb50445ff1a6d48ad3b074519f7ac2134c2e8