diff --git a/.gitignore b/.gitignore index 178d97e..e8168ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,2 @@ -flexmock-0.8.7.gem -/flexmock-0.8.11.gem -/flexmock-0.9.0.gem -/flexmock-1.0.2.gem -/flexmock-1.0.3.gem -/flexmock-1.1.0.gem -/flexmock-1.2.0.gem -/flexmock-1.3.0.gem -/flexmock-1.3.1.gem -/flexmock-1.3.2.gem -/flexmock-1.3.3.gem -/flexmock-2.0.0.gem -/flexmock-v2.0.0-test-missing-files.tar.gz -/flexmock-2.0.1.gem -/flexmock-v2.0.1-test-missing-files.tar.gz -/flexmock-2.0.2.gem -/flexmock-v2.0.2-test-missing-files.tar.gz -/flexmock-2.0.3.gem -/flexmock-v2.0.3-test-missing-files.tar.gz -/flexmock-2.0.4.gem -/flexmock-v2.0.4-test-missing-files.tar.gz -/flexmock-2.0.5.gem -/flexmock-v2.0.5-test-missing-files.tar.gz -/flexmock-2.1.0.gem -/flexmock-v2.1.0-test-missing-files.tar.gz -/flexmock-2.2.1.gem -/flexmock-v2.2.1-test-missing-files.tar.gz -/flexmock-2.3.0.gem -/flexmock-v2.3.0-test-missing-files.tar.gz -/flexmock-2.3.4.gem -/flexmock-v2.3.4-test-missing-files.tar.gz -/flexmock-2.3.5.gem -/flexmock-v2.3.5-test-missing-files.tar.gz -/flexmock-2.3.6.gem -/flexmock-v2.3.6-test-missing-files.tar.gz +/flexmock-*.gem +/flexmock-*-test-missing-files.tar.gz diff --git a/flexmock-3.0.2-ruby34-string-literal-frozen.patch b/flexmock-3.0.2-ruby34-string-literal-frozen.patch new file mode 100644 index 0000000..8f12f6a --- /dev/null +++ b/flexmock-3.0.2-ruby34-string-literal-frozen.patch @@ -0,0 +1,33 @@ +diff -urp '--exclude=*~' flexmock-3.0.2.orig/lib/flexmock/spy_describers.rb flexmock-3.0.2/lib/flexmock/spy_describers.rb +--- flexmock-3.0.2.orig/lib/flexmock/spy_describers.rb 2025-08-13 16:49:42.102930421 +0900 ++++ flexmock-3.0.2/lib/flexmock/spy_describers.rb 2025-08-13 16:56:27.493387656 +0900 +@@ -18,7 +18,7 @@ class FlexMock + end + + def describe_spy(spy, sym, args, kw, options, not_clause="") +- result = "expected " ++ result = "expected ".dup + result << FlexMock.format_call(sym, args, kw) + result << " to#{not_clause} be received by " << spy.inspect + result << times_description(options[:times]) +@@ -29,7 +29,7 @@ class FlexMock + end + + def describe_calls(spy) +- result = '' ++ result = ''.dup + if spy.flexmock_calls.empty? + result << "No messages have been received\n" + else +diff -urp '--exclude=*~' flexmock-3.0.2.orig/test/container_methods_test.rb flexmock-3.0.2/test/container_methods_test.rb +--- flexmock-3.0.2.orig/test/container_methods_test.rb 2025-08-13 16:49:41.505249913 +0900 ++++ flexmock-3.0.2/test/container_methods_test.rb 2025-08-13 18:12:33.787388043 +0900 +@@ -112,7 +112,7 @@ class TestFlexmockContainerMethods < Min + end + + def test_stubbing_a_string +- s = "hello" ++ s = "hello".dup + flexmock(:base, s, :length => 2) + assert_equal 2, s.length + end diff --git a/flexmock-3.0.2-testsuite-ruby34-formatting.patch b/flexmock-3.0.2-testsuite-ruby34-formatting.patch new file mode 100644 index 0000000..b37f0dd --- /dev/null +++ b/flexmock-3.0.2-testsuite-ruby34-formatting.patch @@ -0,0 +1,12 @@ +diff -urp flexmock.orig/test/partial_mock_test.rb flexmock/test/partial_mock_test.rb +--- flexmock.orig/test/partial_mock_test.rb 2024-11-18 15:38:57.625597258 +0900 ++++ flexmock/test/partial_mock_test.rb 2024-11-18 15:44:56.469851634 +0900 +@@ -633,7 +633,7 @@ class TestStubbing < Minitest::Test + exception = assert_raises(NameError) do + obj.mocked_method + end +- assert_match(/undefined method `does_not_exist' for/, exception.message) ++ assert_match(/undefined method [`']does_not_exist' for/, exception.message) + end + + def test_it_checks_whether_mocks_are_forbidden_before_forwarding_the_call diff --git a/flexmock-create-missing-test-files.sh b/flexmock-create-missing-test-files.sh index d161658..4e56253 100644 --- a/flexmock-create-missing-test-files.sh +++ b/flexmock-create-missing-test-files.sh @@ -22,7 +22,7 @@ pushd $TMPDIR git clone https://github.com/doudou/flexmock.git cd flexmock -git reset --hard $VERSION +git reset --hard v$VERSION cd .. tar czf $CURDIR/flexmock-${VERSION}-test-missing-files.tar.gz flexmock/test/ diff --git a/rubygem-flexmock-2.3.6-accept-keywords.patch b/rubygem-flexmock-2.3.6-accept-keywords.patch deleted file mode 100644 index 8eb92c4..0000000 --- a/rubygem-flexmock-2.3.6-accept-keywords.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -urp '--exclude=*~' flexmock-2.3.6/lib.orig/flexmock/composite_expectation.rb flexmock-2.3.6/lib/flexmock/composite_expectation.rb ---- flexmock-2.3.6/lib.orig/flexmock/composite_expectation.rb 2021-01-24 01:35:33.614853539 +0900 -+++ flexmock-2.3.6/lib/flexmock/composite_expectation.rb 2021-01-24 02:27:58.007313654 +0900 -@@ -16,9 +16,9 @@ class FlexMock - end - - # Apply the constraint method to all expectations in the composite. -- def method_missing(sym, *args, &block) -+ def method_missing(sym, *args, **keywords, &block) - @expectations.each do |expectation| -- expectation.send(sym, *args, &block) -+ expectation.send(sym, *args, **keywords, &block) - end - self - end diff --git a/rubygem-flexmock-2.3.6-testsuite-binding-source.patch b/rubygem-flexmock-2.3.6-testsuite-binding-source.patch deleted file mode 100644 index a2d00d4..0000000 --- a/rubygem-flexmock-2.3.6-testsuite-binding-source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- flexmock-2.3.6/test/test_helper.rb.ruby3 2021-01-24 00:41:42.121385766 +0900 -+++ flexmock-2.3.6/test/test_helper.rb 2021-01-24 00:44:25.866236105 +0900 -@@ -50,7 +50,7 @@ - # added. - def assert_mock_failure(klass, options={}, &block) - ex = assert_failure(klass, options, &block) -- file = eval("__FILE__", block.binding) -+ file = block.binding.source_location.first - assert_matching_line(ex, file, options) - end - diff --git a/rubygem-flexmock-2.3.6-workaround-relax-error-message.patch b/rubygem-flexmock-2.3.6-workaround-relax-error-message.patch deleted file mode 100644 index 8a523e4..0000000 --- a/rubygem-flexmock-2.3.6-workaround-relax-error-message.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- flexmock-2.3.6/test/partial_mock_test.rb.workaround 2021-01-24 02:36:13.468840410 +0900 -+++ flexmock-2.3.6/test/partial_mock_test.rb 2021-01-24 03:03:55.748278701 +0900 -@@ -621,7 +621,8 @@ - exception = assert_raises(NameError) do - obj.mocked_method - end -- assert_equal "undefined method `does_not_exist' for #{obj}", exception.message -+ assert(/undefined method `does_not_exist' for #<# %{gem_name}.gemspec +mv flexmock/test . -( -cd flexmock -%patch1 -p1 -%patch3 -p1 -) -%patch2 -p1 +%patch -P0 -p1 +%patch -P1 -p1 find . -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d' find . -name \*.gem -or -name \*.rb -or -name \*.rdoc | xargs chmod 0644 %build -gem build %{gem_name}.gemspec +gem build %{gem_name}-%{version}.gemspec %gem_install %install @@ -66,32 +58,41 @@ cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ pushd %{buildroot}%{gem_instdir} rm -rf \ .autotest .gitignore .togglerc .travis.yml .yardopts \ + .github \ Gemfile \ Rakefile \ flexmock.blurb \ flexmock.gemspec \ - install.rb + install.rb \ + test/ \ + %{nil} popd +rm -f %{buildroot}%{gem_cache} + %check -cp -a flexmock/test .%{gem_instdir} +cp -a test .%{gem_instdir} pushd .%{gem_instdir} export RUBYOPT=-W:deprecated export RUBYLIB=$(pwd)/lib:$(pwd):$(pwd)/test ruby \ -e 'Dir.glob("test/*_test.rb").each {|f| require f}' -rspec test/rspec_integration/ + +# Note: exclude failing tests for now +rspec test/rspec_integration/ \ + --exclude-pattern 'test/rspec_integration/spy_example_spec.rb' \ + %{nil} popd %files %dir %{gem_instdir} -%doc %{gem_instdir}/[A-Z]* +%license %{gem_instdir}/LICENSE.txt +%doc %{gem_instdir}/[A-CR-Z]* %{gem_libdir} %{gem_instdir}/rakelib/ -%exclude %{gem_cache} %{gem_spec} %files doc @@ -100,6 +101,46 @@ popd %{gem_docdir}/ %changelog +* Wed Aug 13 2025 Mamoru TASAKA - 3.0.2-1 +- 3.0.2 +- Fix warnigs for string literal being frozen in the future ruby + +* Fri Jul 25 2025 Fedora Release Engineering - 3.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 3.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Nov 18 2024 Mamoru TASAKA - 3.0.1-2 +- Make testsuite compatible with ruby34 formatting change + +* Wed Sep 11 2024 Mamoru TASAKA - 3.0.1-1 +- 3.0.1 + +* Tue Sep 03 2024 Mamoru TASAKA - 3.0.0-1 +- 3.0.0 + +* Fri Jul 19 2024 Fedora Release Engineering - 2.3.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 2.3.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.3.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Aug 14 2023 Mamoru TASAKA - 2.3.8-1 +- 2.3.8 + +* Tue Aug 08 2023 Mamoru TASAKA - 2.3.6-15 +- Handle MiniTest 5.19+ + +* Fri Jul 21 2023 Fedora Release Engineering - 2.3.6-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 2.3.6-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 2.3.6-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 0adb2eb..9188481 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (flexmock-2.3.6.gem) = 9db8c95d8784e66743f089e7f1660a8205f6fbd63c820126ce551c581fe242b601cdcf34dfa2b93576ef83aaded29bedd6c0506d358d12fad9e423982b35f848 -SHA512 (flexmock-v2.3.6-test-missing-files.tar.gz) = d6265af9d3aa1d546046f985afd45da4de17342ba5897690708d420d7b695e75ed2f9c81fe17a2036cabbdcb0e81a1a233f4494ddc98f6625b88ceea3c959a93 +SHA512 (flexmock-3.0.2.gem) = 07902e5641e2d014e626c1b64f65aeae493fff88ea4f7be42816e63f7609db92ff5fa3b1ad3010e6c352c88f81480667326d83257f55de17b388f3ab68ece827 +SHA512 (flexmock-3.0.2-test-missing-files.tar.gz) = 3660f0f4cdeab1f92d5b89a57217effdacfdf91fa80eea22fb0baa4bba99bed99b5a8f6c918fd6e008bd2c5d3005ec5a9bd18feb11d9c56c03b292a3a9cc3abd