Update to rack-protection 2.1.0

also enhance .spec and .gitignore files.

Resolves: rhbz#1875986
f38
Pavel Valena 4 years ago
parent 2301d297ba
commit f79c28c29a

12
.gitignore vendored

@ -1,10 +1,2 @@
/rack-protection-1.2.0.gem
/rack-protection-1.3.2.gem
/rack-protection-1.5.0.gem
/rack-protection-1.5.3.gem
/rack-protection-2.0.0-tests.tgz
/rack-protection-2.0.0.gem
/rack-protection-2.0.3-tests.tgz
/rack-protection-2.0.3.gem
/rack-protection-2.0.8.1-spec.tar.gz
/rack-protection-2.0.8.1.gem
/rack-protection-*-spec.txz
/rack-protection-*.gem

@ -3,18 +3,15 @@
%bcond_with bootstrap
Name: rubygem-%{gem_name}
Version: 2.0.8.1
Release: 4%{?dist}
Version: 2.1.0
Release: 1%{?dist}
Summary: Ruby gem that protects against typical web attacks
License: MIT
URL: http://sinatrarb.com/protection/
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/sinatra/sinatra.git && cd sinatra/rack-protection
# git archive -v -o rack-protection-2.0.8.1-spec.tar.gz v2.0.8.1 spec/
Source1: %{gem_name}-%{version}-spec.tar.gz
# Fix test failure due to Rack 2.2.2 incompatibility.
# https://github.com/sinatra/sinatra/pull/1605
Patch0: rubygem-rack-protection-2.0.8.1-Fix-failing-tests.patch
# git archive -v -o rack-protection-2.1.0-spec.txz v2.1.0 spec/
Source1: %{gem_name}-%{version}-spec.txz
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
@ -41,16 +38,8 @@ Documentation for %{name}.
%prep
%setup -q -n %{gem_name}-%{version} -b 1
pushd %{_builddir}
%patch0 -p2
popd
%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
@ -58,8 +47,6 @@ mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%if %{without bootstrap}
%check
pushd .%{gem_instdir}
@ -84,6 +71,10 @@ popd
%{gem_instdir}/rack-protection.gemspec
%changelog
* Sun Aug 01 2021 Pavel Valena <pvalena@redhat.com> - 2.1.0-1
- Update to rack-protection 2.1.0.
Resolves: rhbz#1875986
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

@ -1,2 +1,2 @@
SHA512 (rack-protection-2.0.8.1-spec.tar.gz) = 50b96342aeeb7c17b71cab22433d2bb0bc78c4919cfe7b45d41d2a0595c7b5bfb08883158abf5306ee32bfea63a3b08a450c425a1b5e4ed1389e64f2c9015aad
SHA512 (rack-protection-2.0.8.1.gem) = 264aef904d9ae1c38197ad4ad44f1638905bd180fc4bb402c47856c37168059e8e975ca2de5518b1e5cebf79b970024b7d9f5f8b8908880451357dea5e428562
SHA512 (rack-protection-2.1.0.gem) = 965388584a2cae9065ccc0d041bbd40951f22420f05e657586d710f87ae8f854a0be32c3274b9373f96b5f8eb19354d371e3bce9b2df83c013abfea99f16bded
SHA512 (rack-protection-2.1.0-spec.txz) = 95d67f2c68a8b2cad49645208818ef101c1be0c8fcbaea09cdc5da7bacf7a20832ea5ca4f8474c912c57638802e4dde8ef06f5c588adb4241c2b29a955e7dfd9

Loading…
Cancel
Save