1 Star 0 Fork 4

wang_yue111/rubygem-rack-protection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rubygem-rack-protection.spec 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
jeff200902 提交于 2021-02-10 15:26 . fixed build fail
%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: 2
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}
sed -i 's/-0000/GMT/g' sinatra-2.0.3/rack-protection/spec/lib/rack/protection/cookie_tossing_spec.rb
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
* Wed Feb 10 2021 jeff200902 <[email protected]> - 2.0.3-2
- fix check failed
* Fri Aug 21 2020 luoshengwei <[email protected]> - 2.0.3-1
- package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wang_yue111/rubygem-rack-protection.git
[email protected]:wang_yue111/rubygem-rack-protection.git
wang_yue111
rubygem-rack-protection
rubygem-rack-protection
master

搜索帮助