Update to timecop 0.9.1

also enhance .spec and .gitignore files.
epel9
Pavel Valena 6 years ago
parent 086741ddbf
commit de71c03b3b

4
.gitignore vendored

@ -1,3 +1 @@
/rubygem-timecop-failed-assert-fix.patch
/timecop-0.3.5.gem
/timecop-0.7.1.gem
/timecop-*.gem

@ -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: 9%{?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 Oct 17 2019 Pavel Valena <pvalena@redhat.com> - 0.9.1-1
- Update to timecop 0.9.1.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

@ -1 +1 @@
9974d526bd839a0331d641f3571c4293 timecop-0.7.1.gem
SHA512 (timecop-0.9.1.gem) = 2c8429ad4d9c706865810caa80dfb12c16acaaa97ea289fc300e172a359817fea7d31789f4bea75cfae8ce1f84e7d8effd32b39a0482f3d68fb4e225b487e13e

Loading…
Cancel
Save