Update to rack-test 0.8.3.

f38
Vít Ondruch 7 years ago
parent d1f049a8c3
commit 8dad3353e9

2
.gitignore vendored

@ -4,3 +4,5 @@ rack-test-0.4.0.gem
/rack-test-0.6.1.gem
/rack-test-0.6.2.gem
/rack-test-0.6.3.gem
/rack-test-0.8.3-spec.tgz
/rack-test-0.8.3.gem

@ -1,79 +0,0 @@
From d3e32e0ef2539a6e6c79022ee63807317074fb4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Fri, 2 Sep 2016 12:25:29 +0200
Subject: [PATCH] Fix test suite for Rack 2.x compatiblity.
---
spec/rack/test/utils_spec.rb | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/spec/rack/test/utils_spec.rb b/spec/rack/test/utils_spec.rb
index 3b27767..4557c5b 100644
--- a/spec/rack/test/utils_spec.rb
+++ b/spec/rack/test/utils_spec.rb
@@ -61,7 +61,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["submit-name"].should == "Larry"
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
@@ -77,7 +77,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["submit-name"].should == "Larry"
check params["files"][0][:filename].should == "foo.txt"
@@ -97,7 +97,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["people"][0]["submit-name"].should == "Larry"
check params["people"][0]["files"][:filename].should == "foo.txt"
params["people"][0]["files"][:tempfile].read.should == "bar\n"
@@ -114,7 +114,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
check params["foo"].should == [{"id" => "1", "name" => "Dave"}, {"id" => "2", "name" => "Steve"}]
@@ -132,7 +132,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][:filename].should == "foo.txt"
params["files"][:tempfile].read.should == "bar\n"
check params["foo"].should == {"bar" => [{"id" => "1", "name" => "Dave"},
@@ -150,7 +150,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["files"][0][:filename].should == "foo.txt"
params["files"][0][:tempfile].read.should == "bar\n"
check params["foo"][0].should == "1"
@@ -168,7 +168,7 @@ describe Rack::Test::Utils do
:input => StringIO.new(data)
}
env = Rack::MockRequest.env_for("/", options)
- params = Rack::Utils::Multipart.parse_multipart(env)
+ params = Rack::Multipart.parse_multipart(env)
check params["foo"][0]["id"].should == "1"
check params["foo"][0]["data"][:filename].should == "foo.txt"
params["foo"][0]["data"][:tempfile].read.should == "bar\n"
--
2.9.3

@ -1,21 +1,21 @@
%global gem_name rack-test
Summary: Simple testing API built on Rack
Name: rubygem-%{gem_name}
Version: 0.6.3
Release: 7%{?dist}
Group: Development/Languages
License: MIT
URL: http://gitrdoc.com/brynary/rack-test/tree/master
Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
# Fix test errors caused by Rack 2.x changes.
# https://github.com/brynary/rack-test/pull/148
Patch0: rubygem-rack-test-0.6.3-Fix-test-suite-for-Rack-2.x-compatiblity.patch
BuildRequires: rubygems-devel
BuildRequires: rubygem(rack) >= 1.0.0
BuildRequires: rubygem(rspec) < 3
BuildRequires: rubygem(sinatra)
BuildArch: noarch
Name: rubygem-%{gem_name}
Version: 0.8.3
Release: 1%{?dist}
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
# git clone https://github.com/rack-test/rack-test.git && cd rack-test
# git checkout v0.8.3 && tar czvf rack-test-0.8.3-spec.tgz spec/
Source1: %{gem_name}-%{version}-spec.tgz
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby >= 2.2.2
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(sinatra)
BuildArch: noarch
%description
Rack::Test is a small, simple testing API for Rack apps. It can be used on its
@ -23,65 +23,62 @@ 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}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Documentation for %{name}
Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
pushd .%{gem_instdir}
%patch0 -p1
popd
%setup -q -n %{gem_name}-%{version} -b 1
%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
%check
pushd .%{gem_instdir}
ln -s %{_builddir}/spec spec
# We don't care about code coverage.
sed -i '/[cC]ode[cC]/ s/^/#/' spec/spec_helper.rb
sed -i '/require "bundler\/setup"/d' spec/spec_helper.rb
rspec2 spec
popd
# Don't use Bundler.
sed -i "/require 'bundler\/setup'/ s/^/#/" spec/spec_helper.rb
rspec spec
popd
%files
%dir %{gem_instdir}
%exclude %{gem_instdir}/.*
%license %{gem_instdir}/MIT-LICENSE.txt
%{gem_libdir}
%doc %{gem_instdir}/MIT-LICENSE.txt
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/README.rdoc
%doc %{gem_instdir}/MIT-LICENSE.txt
%doc %{gem_instdir}/History.txt
%{gem_instdir}/Gemfile*
%{gem_instdir}/Thorfile
%{gem_instdir}/%{gem_name}.gemspec
%{gem_instdir}/spec
%{gem_instdir}/Rakefile
%doc %{gem_instdir}/History.md
%doc %{gem_instdir}/README.md
%changelog
* Wed Feb 28 2018 Vít Ondruch <vondruch@redhat.com> - 0.8.3-1
- Update to rack-test 0.8.3.
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

@ -1 +1,2 @@
c7db48faa3d1887198f7ce56726990e8 rack-test-0.6.3.gem
SHA512 (rack-test-0.8.3-spec.tgz) = 0e173f39492b34279e76d4c6ac79f82db6ec13ddb6eb865bbcd6f1ab86ffcb9766c51f95e0ed7f954243feb708cc3a688d9fb406d517f05a060145d8758b361f
SHA512 (rack-test-0.8.3.gem) = 455a5ef0402e9358617f8c7f08d8dc6351dfca6b672fad7bf3bbc858b5042ed05bf7d437420e783940fb6251f1e1312e9e63721d236a7488f388cef18261de0d

Loading…
Cancel
Save