%global gem_name responders Name: rubygem-%{gem_name} Version: 2.1.0 Release: 1%{?dist} Summary: Set of Rails responders to dry up your application Group: Development/Languages License: MIT URL: http://github.com/plataformatec/responders Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone http://github.com/plataformatec/responders && cd responders # git checkout v2.1.0 # tar -czf rubygem-responders-2.1.0-test.tgz test/ Source1: %{name}-%{version}-test.tgz BuildArch: noarch BuildRequires: rubygems-devel BuildRequires: rubygem(activemodel) >= 4.2.0 BuildRequires: rubygem(minitest) BuildRequires: rubygem(mocha) BuildRequires: rubygem(rails) %description A set of Rails responders to dry up your application. %package doc Summary: Documentation for %{name} Group: Documentation BuildArch: noarch Requires: %{name} = %{version}-%{release} %description doc Documentation for %{name}. %prep gem unpack %{SOURCE0} %setup -q -D -T -n %{gem_name}-%{version} -a 1 gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec %build gem build %{gem_name}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check cp -pr test/ ./%{gem_instdir} pushd .%{gem_instdir} sed -i -e '\,bundler/setup,d' test/test_helper.rb ruby -Ilib:test test/**/*_test.rb rm -rf test/ popd %files %dir %{gem_instdir}/ %license %{gem_instdir}/MIT-LICENSE %{gem_libdir}/ %{gem_spec} %exclude %{gem_cache} %files doc %doc %{gem_docdir}/ %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.md %changelog * Tue Feb 17 2015 František Dvořák - 2.1.0-1 - Initial package