Add patch to fix one issue with Ruby 1.9 (tempfile behaviour); also apply to 1.0...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Fri, 30 Apr 2010 20:13:50 +0000 (20:13 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Fri, 30 Apr 2010 20:13:50 +0000 (20:13 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-ruby/rack/ChangeLog
dev-ruby/rack/files/rack-1.0.1-gentoo.patch [new file with mode: 0644]
dev-ruby/rack/files/rack-1.1.0-gentoo.patch [new file with mode: 0644]
dev-ruby/rack/rack-1.0.1-r1.ebuild
dev-ruby/rack/rack-1.1.0.ebuild

index d4a72b4abbb2eb18843c28039b87568e4d5ced79..ed71b15c71b8cdd8acbd87ad2ff14ed50f7dbfac 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-ruby/rack
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/ChangeLog,v 1.27 2010/01/17 19:39:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/ChangeLog,v 1.28 2010/04/30 20:13:50 flameeyes Exp $
+
+  30 Apr 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+  rack-1.0.1-r1.ebuild, +files/rack-1.0.1-gentoo.patch, rack-1.1.0.ebuild,
+  +files/rack-1.1.0-gentoo.patch:
+  Add patch to fix one issue with Ruby 1.9 (tempfile behaviour); also apply
+  to 1.0.1 even though that does not work with 1.9 at all.
 
   17 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
   rack-1.0.1-r1.ebuild, rack-1.1.0.ebuild:
diff --git a/dev-ruby/rack/files/rack-1.0.1-gentoo.patch b/dev-ruby/rack/files/rack-1.0.1-gentoo.patch
new file mode 100644 (file)
index 0000000..1331318
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb
+index accd96b..d71fde6 100644
+--- a/lib/rack/rewindable_input.rb
++++ b/lib/rack/rewindable_input.rb
+@@ -94,7 +94,7 @@ module Rack
+     end
+     
+     def filesystem_has_posix_semantics?
+-      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
++      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/ && RUBY_VERSION < '1.9.1'
+     end
+   end
+ end
+diff --git a/test/spec_rack_mock.rb b/test/spec_rack_mock.rb
+index 9c392a2..ed39474 100644
+--- a/test/spec_rack_mock.rb
++++ b/test/spec_rack_mock.rb
+@@ -130,7 +130,6 @@ context "Rack::MockResponse" do
+     res.original_headers["Content-Type"].should.equal "text/yaml"
+     res["Content-Type"].should.equal "text/yaml"
+     res.content_type.should.equal "text/yaml"
+-    res.content_length.should.be 401  # needs change often.
+     res.location.should.be.nil
+   end
+ 
diff --git a/dev-ruby/rack/files/rack-1.1.0-gentoo.patch b/dev-ruby/rack/files/rack-1.1.0-gentoo.patch
new file mode 100644 (file)
index 0000000..1bb3db9
--- /dev/null
@@ -0,0 +1,37 @@
+diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb
+index accd96b..d71fde6 100644
+--- a/lib/rack/rewindable_input.rb
++++ b/lib/rack/rewindable_input.rb
+@@ -94,7 +94,7 @@ module Rack
+     end
+     
+     def filesystem_has_posix_semantics?
+-      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/
++      RUBY_PLATFORM !~ /(mswin|mingw|cygwin|java)/ && RUBY_VERSION < '1.9.1'
+     end
+   end
+ end
+diff --git a/test/spec_rack_mock.rb b/test/spec_rack_mock.rb
+index a03bedc..a8c9839 100644
+--- a/test/spec_rack_mock.rb
++++ b/test/spec_rack_mock.rb
+@@ -216,7 +216,6 @@ context "Rack::MockResponse" do
+     res.original_headers["Content-Type"].should.equal "text/yaml"
+     res["Content-Type"].should.equal "text/yaml"
+     res.content_type.should.equal "text/yaml"
+-    res.content_length.should.be 414  # needs change often.
+     res.location.should.be.nil
+   end
+ 
+diff --git a/test/spec_rack_runtime.rb b/test/spec_rack_runtime.rb
+index 62d8095..29dd605 100644
+--- a/test/spec_rack_runtime.rb
++++ b/test/spec_rack_runtime.rb
+@@ -29,7 +29,5 @@ context "Rack::Runtime" do
+ 
+     response[1]['X-Runtime-App'].should =~ /[\d\.]+/
+     response[1]['X-Runtime-All'].should =~ /[\d\.]+/
+-
+-    Float(response[1]['X-Runtime-All']).should > Float(response[1]['X-Runtime-App'])
+   end
+ end
index 9e8f1b353e6e14ea5408f4ccff33eeedffc29573..b98498897e18d610232efdf405773cc4b106ebbd 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/rack-1.0.1-r1.ebuild,v 1.9 2010/01/17 19:39:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/rack-1.0.1-r1.ebuild,v 1.10 2010/04/30 20:13:50 flameeyes Exp $
 
 EAPI="2"
 USE_RUBY="ruby18 jruby"
@@ -23,13 +23,11 @@ IUSE=""
 # make them dependencies at all.
 ruby_add_bdepend test dev-ruby/test-spec
 
+#USE_RUBY=ruby19 \
+#      ruby_add_bdepend "ruby_targets_ruby19 test" '=dev-ruby/test-unit-1*'
+
 all_ruby_prepare() {
-       # Disable the test on the content-length: it not only varies on
-       # the internal implementation (and thus “needs change often” as
-       # the code says), but it also varies on the implementation (thus
-       # failing on JRuby).
-       sed -i -e '/content_length\.should\.be/s:^:#:' \
-               test/spec_rack_mock.rb || die
+       epatch "${FILESDIR}"/${P}-gentoo.patch
 }
 
 each_ruby_test() {
index 749bac7d1a7e8ea69a6036f51efe56bdf3a4a2e2..1beccc58d8250f2bbc8900d188e5311b238e91f3 100644 (file)
@@ -1,13 +1,13 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/rack-1.1.0.ebuild,v 1.2 2010/01/17 19:39:51 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/rack-1.1.0.ebuild,v 1.3 2010/04/30 20:13:50 flameeyes Exp $
 
 EAPI="2"
-USE_RUBY="ruby18 jruby"
+USE_RUBY="ruby18 ruby19 jruby"
 
 RUBY_FAKEGEM_DOCDIR="doc"
 
-inherit ruby-fakegem
+inherit ruby-fakegem eutils
 
 DESCRIPTION="A modular Ruby webserver interface"
 HOMEPAGE="http://rubyforge.org/projects/rack"
@@ -23,19 +23,11 @@ IUSE=""
 # make them dependencies at all.
 ruby_add_bdepend test dev-ruby/test-spec
 
+USE_RUBY=ruby19 \
+       ruby_add_bdepend "ruby_targets_ruby19 test" '=dev-ruby/test-unit-1*'
+
 all_ruby_prepare() {
-       # Disable the test on the content-length: it not only varies on
-       # the internal implementation (and thus “needs change often” as
-       # the code says), but it also varies on the implementation (thus
-       # failing on JRuby).
-       sed -i -e '/content_length\.should\.be/s:^:#:' \
-               test/spec_rack_mock.rb || die
-
-       # This part of the test relies on millisecond timing differences,
-       # since it's very fragile (and breaks with e.g. JRuby), disable it
-       # entirely and be done with it.
-       sed -i -e '/X-Runtime-All.*should >.*X-Runtime-App/s:^:#:' \
-               test/spec_rack_runtime.rb || die
+       epatch "${FILESDIR}"/${P}-gentoo.patch
 }
 
 each_ruby_test() {