|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|