Permalink
Browse files

Add dev-ruby/rack-1.1.2-r1 for Rails

  • Loading branch information...
1 parent 34329a0 commit 698a8c788fd5d6bd42a4ec6ce2b693f4ba79ae76 @kiyoya committed Apr 21, 2011
View
@@ -0,0 +1,4 @@
+AUX rack-1.1.0-gentoo.patch 1293 RMD160 9b2b240df6c7ce8140f847223546e66e9a130f84 SHA1 161ee6bfe8bcc6aa68b1fd82807055c1461b2887 SHA256 2af3afc6b90d379e63137b798417a1aa6e13c1d6f1bd40d47344b6662bce676a
+AUX rack-1.1.0-rails.patch 348 RMD160 83bafae94e34bb35afa57ae43c6cdd918246f9ea SHA1 80e9f3f29524a15aaf96ae409e5b9bdbb1f34663 SHA256 2d61f219bdb9e5c08ce5d6a0d97a8d9575a8f69e7ada0ab70b798a5eb0359ad5
+DIST rack-1.1.2.tar.gz 279282 RMD160 42f262b0b82f94bc13650bbbd3ef4e718afa5142 SHA1 ec107026d3923d86d9a6e8eeaef73c897a27e110 SHA256 03539f0211fb28c7f0c8c31f701fc040c8561ce4b6ae67210ea132baab5c0fb6
+EBUILD rack-1.1.2-r1.ebuild 1393 RMD160 3c586b23c43d680e62d5e0786bfdc99b589a495f SHA1 b74d021c7938c95b6aae9564c9cf23b7d1dfc534 SHA256 85b41823bdb715c9a6c957c04cb717536e7a568ad4a51c88730386f0b71812d8
@@ -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
@@ -0,0 +1,14 @@
+diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
+index fecf18e..e1bc97c 100644
+--- a/lib/rack/utils.rb
++++ b/lib/rack/utils.rb
+@@ -292,7 +292,8 @@ module Rack
+ end
+
+ def [](k)
+- super(@names[k] ||= @names[k.downcase])
++ super(@names[k]) if @names[k]
++ super(@names[k.downcase])
+ end
+
+ def []=(k, v)
@@ -0,0 +1,43 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rack/rack-1.1.2.ebuild,v 1.1 2011/03/14 19:25:15 graaff Exp $
+
+EAPI="2"
+USE_RUBY="ruby18 ree18 ruby19 jruby"
+
+RUBY_FAKEGEM_DOCDIR="doc"
+
+RUBY_FAKEGEM_BINWRAP=""
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="A modular Ruby webserver interface"
+HOMEPAGE="http://rubyforge.org/projects/rack"
+SRC_URI="mirror://rubyforge/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+# The gem has automagic dependencies over mongrel, ruby-openid,
+# memcache-client, thin, mongrel and camping; not sure if we should
+# 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() {
+ epatch "${FILESDIR}"/${PN}-1.1.0-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-1.1.0-rails.patch
+}
+
+each_ruby_test() {
+ # Since the Rakefile calls specrb directly rather than loading it, we
+ # cannot use it to launch the tests or only the currently-selected
+ # RUBY interpreter will be tested.
+ ${RUBY} -S specrb -Ilib:test -w -a \
+ -t '^(?!Rack::Handler|Rack::Adapter|Rack::Session::Memcache|rackup)' \
+ || die "test failed for ${RUBY}"
+}

0 comments on commit 698a8c7

Please sign in to comment.