From 21112172afe5f57e6fbd91179dfa0d02345f4041 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Oct 16 2019 16:15:58 +0000 Subject: Update to timecop 0.9.1 also enhance .spec and .gitignore files. --- diff --git a/.gitignore b/.gitignore index 2aa794c..29ce41d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/rubygem-timecop-failed-assert-fix.patch -/timecop-0.3.5.gem -/timecop-0.7.1.gem +/timecop-*.gem diff --git a/rubygem-timecop.spec b/rubygem-timecop.spec index 0b97206..1c9bbbc 100644 --- a/rubygem-timecop.spec +++ b/rubygem-timecop.spec @@ -2,14 +2,11 @@ Summary: Provides a unified method to mock Time.now, Date.today in a single call Name: rubygem-%{gem_name} -Version: 0.7.1 -Release: 8%{?dist} +Version: 0.9.1 +Release: 1%{?dist} License: MIT URL: https://github.com/travisjeffery/timecop Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem -# Go with plain minitest. -# https://github.com/travisjeffery/timecop/commit/c30897f67ad90f0582c0ed0d7b78f46a7142f113 -Patch0: rubygem-timecop-0.7.1-Use-minitest.patch BuildRequires: rubygems-devel BuildRequires: rubygem(activesupport) BuildRequires: rubygem(minitest) @@ -29,35 +26,35 @@ Requires:%{name} = %{version}-%{release} 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 -rm -rf %{buildroot} mkdir -p %{buildroot}%{gem_dir} cp -va ./%{gem_dir}/* %{buildroot}%{gem_dir} -# Fix permissions. -chmod a+x %{buildroot}%{gem_instdir}/test/run_tests.sh - %check -pushd .%{gem_instdir}/test -# Drop Bundler dependency. -sed -i '/bundler\/setup/ s/^/#/' test_helper.rb - -./run_tests.sh +pushd .%{gem_instdir}/ +# Drop Bundler and minitest-rg dependency. +sed -i \ + -e '/require..bundler\/setup./ s/^/#/' \ + -e '/require..minitest\/rg./ s/^/#/' \ + test/test_helper.rb + +# DateTime is required on several times +# https://github.com/travisjeffery/timecop/issues/244 +mv test/timecop_without_date_test.rb{,.disabled} + +ruby -I.:lib -rdate -e 'Dir.glob "test/**/*_test.rb", &method(:require)' popd %files %dir %{gem_instdir} %{gem_libdir} -%doc %{gem_instdir}/LICENSE +%license %{gem_instdir}/LICENSE %doc %{gem_instdir}/README.markdown %exclude %{gem_cache} %{gem_spec} @@ -68,6 +65,9 @@ popd %{gem_docdir} %changelog +* Thu Jul 11 2019 Pavel Valena - 0.9.1-1 +- Update to timecop 0.9.1. + * Sat Feb 02 2019 Fedora Release Engineering - 0.7.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 4f09d56..8668677 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9974d526bd839a0331d641f3571c4293 timecop-0.7.1.gem +SHA512 (timecop-0.9.1.gem) = 2c8429ad4d9c706865810caa80dfb12c16acaaa97ea289fc300e172a359817fea7d31789f4bea75cfae8ce1f84e7d8effd32b39a0482f3d68fb4e225b487e13e