|
|
|
@ -1,24 +1,26 @@
|
|
|
|
|
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
|
|
|
|
|
%global gemname rack-protection
|
|
|
|
|
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
|
|
|
|
|
%global gem_name rack-protection
|
|
|
|
|
|
|
|
|
|
%global bootstrap 1
|
|
|
|
|
|
|
|
|
|
Summary: Ruby gem that protects against typical web attacks
|
|
|
|
|
Name: rubygem-%{gemname}
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 1.2.0
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rkh/rack-protection
|
|
|
|
|
Source0: http://rubygems.org/downloads/%{gemname}-%{version}.gem
|
|
|
|
|
Requires: ruby(abi) = 1.8
|
|
|
|
|
Requires: rubygems
|
|
|
|
|
Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
|
|
|
|
Requires: ruby(abi) = 1.9.1
|
|
|
|
|
Requires: ruby(rubygems)
|
|
|
|
|
Requires: rubygem(rack)
|
|
|
|
|
BuildRequires: rubygems
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
%if 0%{bootstrap} < 1
|
|
|
|
|
BuildRequires: rubygem(rack)
|
|
|
|
|
BuildRequires: rubygem(rspec-core)
|
|
|
|
|
BuildRequires: rubygem(rack-test)
|
|
|
|
|
%endif
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
Provides: rubygem(%{gemname}) = %{version}
|
|
|
|
|
Provides: rubygem(%{gem_name}) = %{version}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This gem protects against typical web attacks.
|
|
|
|
@ -36,36 +38,42 @@ This package contains documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c -T
|
|
|
|
|
%{__mkdir_p} .%{gemdir}
|
|
|
|
|
gem install --local --install-dir .%{gemdir} \
|
|
|
|
|
%{__mkdir_p} .%{gem_dir}
|
|
|
|
|
gem install --local --install-dir .%{gem_dir} \
|
|
|
|
|
--force -V %{SOURCE0}
|
|
|
|
|
rm .%{geminstdir}/%{gemname}.gemspec
|
|
|
|
|
rm .%{gemdir}/cache/%{gemname}-%{version}.gem
|
|
|
|
|
rm .%{gem_instdir}/%{gem_name}.gemspec
|
|
|
|
|
rm .%{gem_cache}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{geminstdir}
|
|
|
|
|
%if 0%{bootstrap} < 1
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
rspec spec
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{__mkdir_p} %{buildroot}%{gemdir}
|
|
|
|
|
cp -rv .%{gemdir}/* %{buildroot}%{gemdir}
|
|
|
|
|
%{__mkdir_p} %{buildroot}%{gem_dir}
|
|
|
|
|
cp -rv .%{gem_dir}/* %{buildroot}%{gem_dir}
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{geminstdir}
|
|
|
|
|
%{geminstdir}/lib
|
|
|
|
|
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
|
|
|
|
|
%doc %{geminstdir}/License
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
%doc %{gem_instdir}/License
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{geminstdir}/README.md
|
|
|
|
|
%{geminstdir}/Rakefile
|
|
|
|
|
%{geminstdir}/spec
|
|
|
|
|
%doc %{gemdir}/doc/%{gemname}-%{version}
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%{gem_instdir}/spec
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Jan 24 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.0-3
|
|
|
|
|
- Rebuilt for Ruby 1.9.3.
|
|
|
|
|
- Introduced bootstrap to deal with dependency loop.
|
|
|
|
|
|
|
|
|
|
* Mon Jan 03 2012 Michal Fojtik <mfojtik@redhat.com> - 1.2.0-2
|
|
|
|
|
- Fixed BR
|
|
|
|
|
- Marked documentation file with doc tag
|
|
|
|
|