2020-08-28 12:17:11 +08:00
|
|
|
%global gem_name rack-cache
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2023-11-24 11:43:10 +08:00
|
|
|
Version: 1.14.0
|
2020-08-28 12:17:11 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: HTTP Caching for Rack
|
|
|
|
|
License: MIT
|
2023-11-24 11:43:10 +08:00
|
|
|
URL: https://github.com/rack/rack-cache/
|
2020-08-28 12:17:11 +08:00
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
2023-11-24 11:43:10 +08:00
|
|
|
Source1: https://github.com/rack/%{gem_name}/archive/v{version}/%{name}-%{version}.tar.gz
|
2020-08-28 12:17:11 +08:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest) rubygem(mocha)
|
|
|
|
|
BuildRequires: rubygem(rack)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
Rack::Cache is suitable as a quick drop-in component to enable HTTP caching
|
|
|
|
|
for Rack-based applications that produce freshness (Expires, Cache-Control)
|
|
|
|
|
and/or validation (Last-Modified, ETag) information.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -c -T
|
|
|
|
|
%gem_install -n %{SOURCE0}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
tar xf %{SOURCE1}
|
|
|
|
|
ln -s %{gem_name}-%{version}/test test
|
|
|
|
|
sed -i '/bundler/ s/^/#/' test/test_helper.rb
|
|
|
|
|
sed -i 's/maxitest/minitest/' test/test_helper.rb
|
2022-06-30 10:18:35 +08:00
|
|
|
sed -i '/global_must/d' test/test_helper.rb
|
2020-08-28 12:17:11 +08:00
|
|
|
mv test/meta_store_test.rb{,.disabled}
|
|
|
|
|
ruby -Ilib -rtimeout -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/CHANGES
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-11-24 11:43:10 +08:00
|
|
|
* Fri Nov 24 2023 xu_ping <707078654@qq.com> - 1.14.0-1
|
|
|
|
|
- Upgrade to 1.14.0
|
|
|
|
|
|
2022-06-30 10:18:35 +08:00
|
|
|
* Tue Jun 28 2022 wulei <wulei80@h-partners.com> - 1.13.0-1
|
|
|
|
|
- Upgrade to 1.13.0
|
|
|
|
|
|
2020-08-28 12:17:11 +08:00
|
|
|
* Fri Aug 21 2020 luoshengwei <luoshengwei@huawei.com> - 1.6.1-1
|
|
|
|
|
- package init
|