%global gem_name rack-protection %{?_with_bootstrap: %global bootstrap 1} Summary: Ruby gem that protects against typical web attacks Name: rubygem-%{gem_name} Version: 2.0.0 Release: 1%{?dist} License: MIT URL: http://github.com/sinatra/sinatra/tree/master/rack-protection Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem # git clone https://github.com/sinatra/sinatra.git && cd sinatra/rack-protection # git checkout v2.0.0 && tar czvf rack-protection-2.0.0-tests.tgz spec/ Source1: %{gem_name}-%{version}-tests.tgz BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby %if ! 0%{?bootstrap} BuildRequires: rubygem(rack) BuildRequires: rubygem(rspec) BuildRequires: rubygem(rack-test) %endif BuildArch: noarch %description This gem protects against typical web attacks. Should work for all Rack apps, including Rails. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} %description doc This package contains documentation for %{name}. %prep %setup -q -c -T %gem_install -n %{SOURCE0} %build %if ! 0%{?bootstrap} %check pushd .%{gem_instdir} tar xzvf %{SOURCE1} rspec -r 'spec_helper' spec popd %endif %install %{__mkdir_p} %{buildroot}%{gem_dir} cp -rv .%{gem_dir}/* %{buildroot}%{gem_dir} %files %dir %{gem_instdir} %license %{gem_instdir}/License %{gem_libdir} %exclude %{gem_instdir}/rack-protection.gemspec %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %{gem_instdir}/Gemfile %doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile %changelog * Mon Jun 19 2017 Jun Aruga - 2.0.0-1 - Update to rack-protection 2.0.0. * Tue Feb 07 2017 Jun Aruga - 1.5.3-4 - Fix for RSpec 3 compatibility. * Thu Feb 04 2016 Fedora Release Engineering - 1.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 1.5.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Feb 23 2015 Vít Ondruch - 1.5.3-1 - Update to rack-protection 1.5.3. * Sun Jun 08 2014 Fedora Release Engineering - 1.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 1.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Mon Jul 15 2013 Michal Fojtik - 1.5.0-1 - Release 1.5.0 * Tue Mar 05 2013 Vít Ondruch - 1.3.2-3 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 * Fri Feb 22 2013 Michal Fojtik - 1.3.2-2 - Fixed rspec dependency * Thu Feb 21 2013 Michal Fojtik - 1.3.2-1 - Release 1.3.2 * Thu Feb 14 2013 Fedora Release Engineering - 1.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 1.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Tue Jan 24 2012 Bohuslav Kabrda - 1.2.0-4 - Set %%bootstrap to 0 to allow tests. * Tue Jan 24 2012 Bohuslav Kabrda - 1.2.0-3 - Rebuilt for Ruby 1.9.3. - Introduced bootstrap to deal with dependency loop. * Tue Jan 03 2012 Michal Fojtik - 1.2.0-2 - Fixed BR - Marked documentation file with doc tag - Changed the way how to run rspec tests * Mon Jan 02 2012 Michal Fojtik - 1.2.0-1 - Initial import