%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null) %global gemname factory_girl %global geminstdir %{gemdir}/gems/%{gemname}-%{version} Summary: Framework and DSL for defining and using model instance factories Name: rubygem-%{gemname} Version: 1.3.2 Release: 3%{?dist} Group: Development/Languages License: MIT URL: http://thoughtbot.com/projects/factory_girl Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem Patch0: %{name}-fix-gemspec-loading.patch Requires: rubygems Requires: ruby(abi) = 1.8 BuildRequires: rubygems BuildRequires: rubygem(rake) BuildRequires: rubygem(cucumber) >= 0.9.0 BuildRequires: rubygem(rspec) BuildRequires: rubygem(rcov) BuildRequires: rubygem(activerecord) >= 2.3.5 BuildRequires: rubygem(sqlite3-ruby) >= 1.2.4 BuildArch: noarch Provides: rubygem(%{gemname}) = %{version} %description Framework and DSL for defining and using factories - less error-prone, more explicit, and all-around easier to work with than fixtures. %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} rake features --trace popd %clean rm -rf %{buildroot} %files %defattr(-, root, root, -) %dir %{geminstdir} %{geminstdir}/lib %doc %{geminstdir}/README.rdoc %doc %{geminstdir}/LICENSE %doc %{geminstdir}/Changelog %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec %files doc %defattr(-, root, root, -) %{gemdir}/doc/%{gemname}-%{version} %{geminstdir}/features %{geminstdir}/spec %{geminstdir}/Rakefile %{geminstdir}/CONTRIBUTION_GUIDELINES.rdoc %changelog * Thu Oct 14 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-3 - Replaced path with path macro * Wed Oct 13 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-2 - Rakefile fixing moved to a separate patch - Fixed unneeded Requires - Fixed directory ownership on doc subpackage - README and LICENSE moved back to main package * Sat Oct 02 2010 Michal Fojtik <mfojtik@redhat.com> - 1.3.2-1 - Initial package