diff --git a/rack-protection-2.0.3.gem b/rack-protection-2.0.3.gem new file mode 100644 index 0000000..f32d38c Binary files /dev/null and b/rack-protection-2.0.3.gem differ diff --git a/rubygem-rack-protection.spec b/rubygem-rack-protection.spec new file mode 100644 index 0000000..13bcad1 --- /dev/null +++ b/rubygem-rack-protection.spec @@ -0,0 +1,61 @@ +%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.3 +Release: 1 +License: MIT +URL: http://github.com/sinatra/sinatra/tree/master/rack-protection +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: https://github.com/sinatra/sinatra/archive/v%{version}.tar.gz +BuildRequires: ruby(release) rubygems-devel ruby +%if ! 0%{?bootstrap} +BuildRequires: rubygem(rack) rubygem(rspec) 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} +ln -s sinatra-%{version}/%{gem_name}/spec spec +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 +* Fri Aug 21 2020 luoshengwei - 2.0.3-1 +- package init diff --git a/rubygem-rack-protection.yaml b/rubygem-rack-protection.yaml new file mode 100644 index 0000000..924ae1c --- /dev/null +++ b/rubygem-rack-protection.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: sinatra/sinatra +tag_prefix: "rack-protection-" +separator: "." diff --git a/v2.0.3.tar.gz b/v2.0.3.tar.gz new file mode 100644 index 0000000..b6cdc3e Binary files /dev/null and b/v2.0.3.tar.gz differ