From 324dedc5ffd637f090ad77aac38074fe7a3e0cff Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Wed, 9 Oct 2019 18:03:19 +0200 Subject: [PATCH] Update to Mocha 1.9.0 also enhance .spec and .gitignore files. --- .gitignore | 9 +-------- rubygem-mocha.spec | 32 +++++++++++++++----------------- sources | 2 +- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 653be07..6bfb46d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1 @@ -mocha-0.9.7.gem -/mocha-0.9.8.gem -/mocha-0.10.0.gem -/mocha-0.11.0.gem -/mocha-0.12.1.gem -/mocha-0.13.1.gem -/mocha-0.14.0.gem -/mocha-1.1.0.gem +/mocha-*.gem diff --git a/rubygem-mocha.spec b/rubygem-mocha.spec index bd47acd..29aaf7d 100644 --- a/rubygem-mocha.spec +++ b/rubygem-mocha.spec @@ -1,16 +1,12 @@ %global gem_name mocha - Summary: Mocking and stubbing library Name: rubygem-%{gem_name} -Version: 1.1.0 -Release: 9%{?dist} +Version: 1.9.0 +Release: 1%{?dist} License: MIT or Ruby or BSD -URL: http://gofreerange.com/mocha/docs +URL: https://mocha.jamesmead.org Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -# Fix Ruby 2.2 test suite compatibility. -# https://github.com/freerange/mocha/commit/a65ea1ed3dce43cbc2cc16b3660afd2cce3db33e -Patch0: rubygem-mocha-1.1.0-As-of-Ruby-v2.2-nil-is-frozen-so-these-tests-are-irrelevant.patch BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby @@ -33,26 +29,24 @@ This package contains documentation for %{name}. %prep -%setup -q -c -T -%gem_install -n %{SOURCE0} - -pushd .%{gem_instdir} -%patch0 -p1 -popd +%setup -q -n %{gem_name}-%{version} %build +gem build ../%{gem_name}-%{version}.gemspec +%gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -pa .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ -%check +%check pushd .%{gem_instdir} # Each part of test suite must be run separately, otherwise the test suite fails. # https://github.com/freerange/mocha/issues/121 -ruby -e "Dir.glob('./test/{unit,acceptance}/**/*_test.rb').each {|t| require t}" -ruby -e "Dir.glob('./test/integration/**/*_test.rb').each {|t| require t}" +for kind in unit acceptance integration; do + ruby -e "Dir.glob('./test/$kind/**/*_test.rb').each {|t| require t}" +done popd %files @@ -60,7 +54,7 @@ popd %exclude %{gem_instdir}/init.rb %doc %{gem_instdir}/COPYING.md %doc %{gem_instdir}/README.md -%doc %{gem_instdir}/MIT-LICENSE.md +%license %{gem_instdir}/MIT-LICENSE.md %doc %{gem_instdir}/RELEASE.md %dir %{gem_instdir} %{gem_instdir}/bin @@ -76,10 +70,14 @@ popd %{gem_instdir}/mocha.gemspec %{gem_instdir}/gemfiles/ %{gem_instdir}/test/ +%{gem_instdir}/docs/ %{gem_instdir}/yard-templates/ %changelog +* Wed Oct 09 2019 Pavel Valena - 1.9.0-1 +- Update to mocha 1.9.0. + * Fri Jul 26 2019 Fedora Release Engineering - 1.1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index 8dcd9b5..20fb888 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -191449b906fcffca8526f1203028b8e2 mocha-1.1.0.gem +SHA512 (mocha-1.9.0.gem) = 76aa6c1a59d98cf2e592b94785f102fae7d46923cd30494df944a322a6286fb854867ccb32c396f522008b8a0e368ff115693ec6dc63d7cbe84fa26a3a42d9e6