summaryrefslogtreecommitdiff
path: root/dev-ruby/rack/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-ruby/rack/files
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-ruby/rack/files')
-rw-r--r--dev-ruby/rack/files/rack-1.2.1-gentoo.patch13
-rw-r--r--dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch25
-rw-r--r--dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch38
3 files changed, 76 insertions, 0 deletions
diff --git a/dev-ruby/rack/files/rack-1.2.1-gentoo.patch b/dev-ruby/rack/files/rack-1.2.1-gentoo.patch
new file mode 100644
index 000000000000..82ea127a8cb7
--- /dev/null
+++ b/dev-ruby/rack/files/rack-1.2.1-gentoo.patch
@@ -0,0 +1,13 @@
+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/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch b/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch
new file mode 100644
index 000000000000..7854b7e6e16a
--- /dev/null
+++ b/dev-ruby/rack/files/rack-1.4.5-fix-test-ruby20.patch
@@ -0,0 +1,25 @@
+From 0a74380d2e5157d94c7e9141242af33e5c0bf951 Mon Sep 17 00:00:00 2001
+From: Santiago Pastorino <santiago@wyeworks.com>
+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 @@ def chunked(app)
+ 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.9.1
+
diff --git a/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch b/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch
new file mode 100644
index 000000000000..9d36a7328e2c
--- /dev/null
+++ b/dev-ruby/rack/files/rack-1.6-rewindable-ruby23.patch
@@ -0,0 +1,38 @@
+From 11b5a15dd1c8a41d87eb73df7bb99a3affecd787 Mon Sep 17 00:00:00 2001
+From: deepj <deepjungle.maca@gmail.com>
+Date: Mon, 25 May 2015 22:41:31 +0200
+Subject: [PATCH] Clean up Rack::Rewindable
+
+---
+ lib/rack/rewindable_input.rb | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb
+index 64efdda..dd6b784 100644
+--- a/lib/rack/rewindable_input.rb
++++ b/lib/rack/rewindable_input.rb
+@@ -57,15 +57,6 @@ def close
+
+ private
+
+- # Ruby's Tempfile class has a bug. Subclass it and fix it.
+- class Tempfile < ::Tempfile
+- def _close
+- @tmpfile.close if @tmpfile
+- @data[1] = nil if @data
+- @tmpfile = nil
+- end
+- end
+-
+ def make_rewindable
+ # Buffer all data into a tempfile. Since this tempfile is private to this
+ # RewindableInput object, we chmod it so that nobody else can read or write
+@@ -77,8 +68,6 @@ def make_rewindable
+ @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
+ @rewindable_io.binmode
+ if filesystem_has_posix_semantics?
+- # Use ::File.unlink as 1.9.1 Tempfile has a bug where unlink closes the file!
+- ::File.unlink @rewindable_io.path
+ raise 'Unlink failed. IO closed.' if @rewindable_io.closed?
+ @unlinked = true
+ end