|
|
|
@ -7,12 +7,15 @@ Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 2.2.3
|
|
|
|
|
# Introduce Epoch (related to bug 552972)
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: A modular Ruby webserver interface
|
|
|
|
|
# lib/rack/show_{status,exceptions}.rb contains snippets from Django under BSD license.
|
|
|
|
|
License: MIT and BSD
|
|
|
|
|
URL: https://rack.github.io/
|
|
|
|
|
Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
|
|
|
|
# git clone https://github.com/rack/rack.git && cd rack/
|
|
|
|
|
# git archive -v -o rack-2.2.3-tests.tar.gz 2.2.3 test/
|
|
|
|
|
Source1: rack-%{version}-tests.tar.gz
|
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildRequires: ruby >= 2.2.2
|
|
|
|
@ -44,7 +47,7 @@ BuildArch: noarch
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version}
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Create the gem as gem install only works on a gem file
|
|
|
|
@ -79,25 +82,23 @@ for file in `find %{buildroot}%{gem_instdir} -type f`; do
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# at version 2.1.1 are currently no tests available
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
|
|
|
|
|
# During the building on mock environment, the testing process id 1 is owned
|
|
|
|
|
# by running user mockbuild's command STUBINIT, though it is owned by root user
|
|
|
|
|
# on usual environment.
|
|
|
|
|
# The server status does not return ":not_owned".
|
|
|
|
|
#sed -i '/^ it "check pid file presence and not owned process" do$/,/^ end$/ s/^/#/' \
|
|
|
|
|
# test/spec_server.rb
|
|
|
|
|
cp -a %{_builddir}/test .
|
|
|
|
|
|
|
|
|
|
# Get temporary PID file name and start memcached daemon.
|
|
|
|
|
PID=%(mktemp)
|
|
|
|
|
memcached -d -P "$PID"
|
|
|
|
|
|
|
|
|
|
# Avoid minitest-global_expectations in exchange of lot of deprecation warnings.
|
|
|
|
|
# https://github.com/rack/rack/pull/1394
|
|
|
|
|
mkdir -p test/minitest/global_expectations
|
|
|
|
|
echo 'require "minitest/autorun"' > test/minitest/global_expectations/autorun.rb
|
|
|
|
|
|
|
|
|
|
# Rack::Session::Memcache#test_0009_maintains freshness
|
|
|
|
|
# requires encoding set to UTF-8:
|
|
|
|
|
# https://github.com/rack/rack/issues/1305
|
|
|
|
|
LC_ALL=C.UTF-8 \
|
|
|
|
|
ruby -Ilib:test -e 'Dir.glob "./test/spec_*.rb", &method(:require)'
|
|
|
|
|
ruby -rminitest/autorun -Ilib:test -e 'Dir.glob "./test/spec_*.rb", &method(:require)'
|
|
|
|
|
|
|
|
|
|
# Kill memcached daemon.
|
|
|
|
|
kill -TERM $(< "$PID")
|
|
|
|
@ -123,10 +124,11 @@ popd
|
|
|
|
|
%{gem_instdir}/%{gem_name}.gemspec
|
|
|
|
|
%doc %{gem_instdir}/example
|
|
|
|
|
%doc %{gem_instdir}/contrib
|
|
|
|
|
# at version 2.1.1 are currently no tests available
|
|
|
|
|
#{gem_instdir}/test
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Oct 21 2020 Vít Ondruch <vondruch@redhat.com> - 1:2.2.3-3
|
|
|
|
|
- Re-enable test suite.
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.2.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|