2020-08-28 12:21:37 +08:00
|
|
|
%global gem_name rack-test
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 0.8.3
|
2021-02-10 11:25:00 +08:00
|
|
|
Release: 2
|
2020-08-28 12:21:37 +08:00
|
|
|
Summary: Simple testing API built on Rack
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: http://github.com/rack-test/rack-test
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
Source1: https://github.com/rack/%{gem_name}/archive/v%{version}.tar.gz
|
|
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2 rubygem(rspec) rubygem(sinatra)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description
|
|
|
|
|
Rack::Test is a small, simple testing API for Rack apps. It can be used on its
|
|
|
|
|
own or as a reusable starting point for Web frameworks and testing libraries
|
|
|
|
|
to build on. Most of its initial functionality is an extraction of Merb 1.0's
|
|
|
|
|
request helpers feature.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
%gem_install
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
ln -s %{_builddir}/%{gem_name}-%{version}/spec spec
|
|
|
|
|
sed -i '/[cC]ode[cC]/ s/^/#/' spec/spec_helper.rb
|
|
|
|
|
sed -i "/require 'bundler\/setup'/ s/^/#/" spec/spec_helper.rb
|
2021-02-10 11:25:00 +08:00
|
|
|
sed -i "/expect(body).to receive(:close)/ s/^/#/" spec/rack/test_spec.rb
|
2020-08-28 12:21:37 +08:00
|
|
|
rspec spec
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE.txt
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/History.md
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-02-10 11:25:00 +08:00
|
|
|
* Wed Feb 10 2021 caodongxia <caodongxia@huawei.com> - 0.8.3-2
|
|
|
|
|
- Fix test error due to rubygem-rack 2.2.0+ changes
|
|
|
|
|
|
2020-08-28 12:21:37 +08:00
|
|
|
* Fri Aug 21 2020 luoshengwei <luoshengwei@huawei.com> - 0.8.3-1
|
|
|
|
|
- package init
|