diff --git a/rubygem-rack-1.5.0-Fix-Ruby-2.0-build.patch b/rubygem-rack-1.5.0-Fix-Ruby-2.0-build.patch new file mode 100644 index 0000000..7ebc58e --- /dev/null +++ b/rubygem-rack-1.5.0-Fix-Ruby-2.0-build.patch @@ -0,0 +1,25 @@ +From 0a74380d2e5157d94c7e9141242af33e5c0bf951 Mon Sep 17 00:00:00 2001 +From: Santiago Pastorino +Date: Sat, 29 Dec 2012 17:36:08 -0200 +Subject: [PATCH] Fix Ruby 2.0 build + +--- + test/spec_chunked.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/spec_chunked.rb b/test/spec_chunked.rb +index c81409f..12f2158 100644 +--- a/test/spec_chunked.rb ++++ b/test/spec_chunked.rb +@@ -41,7 +41,7 @@ describe Rack::Chunked do + response.headers.should.not.include 'Content-Length' + response.headers['Transfer-Encoding'].should.equal 'chunked' + response.body.encoding.to_s.should.equal "ASCII-8BIT" +- response.body.should.equal "c\r\n\xFE\xFFH\x00e\x00l\x00l\x00o\x00\r\n2\r\n \x00\r\na\r\nW\x00o\x00r\x00l\x00d\x00\r\n0\r\n\r\n" ++ response.body.should.equal "c\r\n\xFE\xFFH\x00e\x00l\x00l\x00o\x00\r\n2\r\n \x00\r\na\r\nW\x00o\x00r\x00l\x00d\x00\r\n0\r\n\r\n".force_encoding("BINARY") + end if RUBY_VERSION >= "1.9" + + should 'not modify response when Content-Length header present' do +-- +1.8.1.2 + diff --git a/rubygem-rack.spec b/rubygem-rack.spec index 39e1739..361d323 100644 --- a/rubygem-rack.spec +++ b/rubygem-rack.spec @@ -1,23 +1,31 @@ %global gem_name rack +# There is circular dependency between thin and rack. +%global bootstrap_thin 1 + Name: rubygem-%{gem_name} Summary: Common API for connecting web frameworks, web servers and layers of software # Introduce Epoch (related to bug 552972) Epoch: 1 Version: 1.4.5 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Languages License: MIT URL: http://rubyforge.org/projects/%{gem_name}/ Source0: http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem +# Fix test suite for Ruby 2.0 +# https://github.com/rack/rack/commit/0a74380d2e5157d94c7e9141242af33e5c0bf951 +Patch0: rubygem-rack-1.5.0-Fix-Ruby-2.0-build.patch Requires: ruby(rubygems) -Requires: ruby(abi) = 1.9.1 +Requires: ruby(release) BuildRequires: ruby BuildRequires: rubygems-devel BuildRequires: rubygem(bacon) BuildRequires: memcached BuildRequires: rubygem(memcache-client) +%if 0%{bootstrap_thin} < 1 BuildRequires: rubygem(thin) +%endif # Seems that lighttpd test depends on rubygem(fcgi), which is not in Fedora, # if it will ever be. # BuildRequires: lighttpd-fastcgi @@ -40,10 +48,11 @@ Documentation for %{name} %prep %setup -q -c -T -mkdir -p .%{gem_dir} -LANG=en_US.utf8 gem install --local --install-dir .%{gem_dir} \ - --bindir .%{_bindir} \ - --force %{SOURCE0} +%gem_install -n %{SOURCE0} + +pushd .%{gem_instdir} +%patch0 -p1 +popd %build @@ -105,6 +114,9 @@ popd %changelog +* Mon Feb 25 2013 Vít Ondruch - 1:1.4.5-2 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + * Fri Feb 08 2013 Josef Stribny - 1:1.4.5-1 - Update to Rack 1.4.5.