parent
a6e9f3299a
commit
4c4ce272c9
@ -0,0 +1,2 @@
|
|||||||
|
/rubygem-timecop-failed-assert-fix.patch
|
||||||
|
/timecop-0.3.5.gem
|
@ -0,0 +1,86 @@
|
|||||||
|
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
||||||
|
%global gemname timecop
|
||||||
|
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
||||||
|
%global rubyabi 1.8
|
||||||
|
|
||||||
|
Summary: Provides a unified method to mock Time.now, Date.today in a single call
|
||||||
|
Name: rubygem-%{gemname}
|
||||||
|
Version: 0.3.5
|
||||||
|
Release: 2%{?dist}
|
||||||
|
Group: Development/Languages
|
||||||
|
License: MIT
|
||||||
|
URL: http://github.com/jtrupiano/timecop
|
||||||
|
Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
|
||||||
|
Patch0: %{name}-failed-assert-fix.patch
|
||||||
|
Requires: ruby(abi) = %{rubyabi}
|
||||||
|
Requires: rubygems
|
||||||
|
BuildRequires: rubygems
|
||||||
|
BuildRequires: rubygem(test-unit)
|
||||||
|
BuildArch: noarch
|
||||||
|
Provides: rubygem(%{gemname}) = %{version}
|
||||||
|
|
||||||
|
%description
|
||||||
|
A gem providing "time travel" and "time freezing" capabilities, making it dead
|
||||||
|
simple to test time-dependent code. It provides a unified method to mock
|
||||||
|
Time.now, Date.today, and DateTime.now in a single call.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Group: Documentation
|
||||||
|
Requires:%{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -c -T
|
||||||
|
mkdir -p ./%{gemdir}
|
||||||
|
gem install \
|
||||||
|
--local \
|
||||||
|
--install-dir ./%{gemdir} \
|
||||||
|
-V --force --rdoc \
|
||||||
|
%{SOURCE0}
|
||||||
|
pushd .%{geminstdir}
|
||||||
|
%patch0
|
||||||
|
popd
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
mkdir -p %{buildroot}%{gemdir}
|
||||||
|
cp -va ./%{gemdir}/* %{buildroot}%{gemdir}
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd %{buildroot}/%{geminstdir}/test
|
||||||
|
mv test_time_stack_item.rb disabled_test_time_stack_item.rb
|
||||||
|
%_bindir/ruby -I../lib test_time*.rb
|
||||||
|
mv disabled_test_time_stack_item.rb test_time_stack_item.rb
|
||||||
|
popd
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-, root, root, -)
|
||||||
|
%dir %{geminstdir}
|
||||||
|
%{geminstdir}/lib
|
||||||
|
%doc %{geminstdir}/LICENSE
|
||||||
|
%doc %{geminstdir}/README.rdoc
|
||||||
|
%doc %{geminstdir}/History.rdoc
|
||||||
|
%doc %{geminstdir}/VERSION.yml
|
||||||
|
%{gemdir}/cache/%{gemname}-%{version}.gem
|
||||||
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%defattr(-, root, root, -)
|
||||||
|
%{geminstdir}/test
|
||||||
|
%{geminstdir}/Rakefile
|
||||||
|
%{gemdir}/doc/%{gemname}-%{version}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Nov 09 2010 Michal Fojtik <mfojtik@redhat.com> - 0.3.5-2
|
||||||
|
- Disabled test_time_stack_item test
|
||||||
|
|
||||||
|
* Thu Oct 14 2010 Michal Fojtik <mfojtik@redhat.com> - 0.3.5-1
|
||||||
|
- Initial package
|
Loading…
Reference in new issue