mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 06:48:18 -07:00
dev-ruby/marcel: enable ruby34
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
This commit is contained in:
50
dev-ruby/marcel/files/marcel-1.0.4-rack3.patch
Normal file
50
dev-ruby/marcel/files/marcel-1.0.4-rack3.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From ccd4be5043628c4389230b4c012a7115b8e44c81 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Daer <jeremy@rubyonrails.org>
|
||||
Date: Fri, 1 Mar 2024 13:16:03 -0800
|
||||
Subject: [PATCH] Limit Rack::Lint::InputWrapper test to Rack 2
|
||||
|
||||
---
|
||||
marcel.gemspec | 4 ++--
|
||||
test/mime_type_test.rb | 13 +++++++++++--
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/marcel.gemspec b/marcel.gemspec
|
||||
index 9a1417a..a7b9c24 100644
|
||||
--- a/marcel.gemspec
|
||||
+++ b/marcel.gemspec
|
||||
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
||||
|
||||
spec.add_development_dependency 'minitest', '~> 5.11'
|
||||
spec.add_development_dependency 'bundler', '>= 1.7'
|
||||
- spec.add_development_dependency 'rake', '~> 13.0'
|
||||
- spec.add_development_dependency 'rack', '~> 2.0'
|
||||
+ spec.add_development_dependency 'rake', '>= 13.0'
|
||||
+ spec.add_development_dependency 'rack', '>= 2'
|
||||
spec.add_development_dependency 'nokogiri', '>= 1.9.1'
|
||||
end
|
||||
diff --git a/test/mime_type_test.rb b/test/mime_type_test.rb
|
||||
index 08fa674..a3ce693 100644
|
||||
--- a/test/mime_type_test.rb
|
||||
+++ b/test/mime_type_test.rb
|
||||
@@ -38,10 +38,19 @@ def setup
|
||||
assert_equal "image/gif", content_type
|
||||
end
|
||||
|
||||
- test "gets content type from sources that conform to Rack::Lint::InputWrapper" do
|
||||
+ test "gets content type from sources that conform to Rack RewindableInput" do
|
||||
io = StringIO.new(File.read(@path))
|
||||
- wrapper = Rack::Lint::InputWrapper.new(io)
|
||||
+ wrapper = Rack::RewindableInput.new(io)
|
||||
content_type = Marcel::MimeType.for wrapper
|
||||
assert_equal "image/gif", content_type
|
||||
end
|
||||
+
|
||||
+ if Rack::Lint.const_defined?(:InputWrapper)
|
||||
+ test "gets content type from sources that conform to Rack 2's Rack::Lint::InputWrapper" do
|
||||
+ io = StringIO.new(File.read(@path))
|
||||
+ wrapper = Rack::Lint::InputWrapper.new(io)
|
||||
+ content_type = Marcel::MimeType.for wrapper
|
||||
+ assert_equal "image/gif", content_type
|
||||
+ end
|
||||
+ end
|
||||
end
|
||||
@@ -1,8 +1,8 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
USE_RUBY="ruby31 ruby32 ruby33"
|
||||
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
|
||||
|
||||
RUBY_FAKEGEM_EXTRADOC="README.md"
|
||||
|
||||
@@ -19,11 +19,13 @@ SLOT="$(ver_cut 1-2)"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
|
||||
IUSE="test"
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rack:2.2 )"
|
||||
PATCHES=( "${FILESDIR}/${P}-rack3.patch" )
|
||||
|
||||
ruby_add_bdepend "test? ( dev-ruby/rack:3.1 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
sed -i \
|
||||
-e '1igem "rack", "~> 2.0"' \
|
||||
-e '1igem "rack", "~> 3.1.0"' \
|
||||
-e '2irequire "pathname"' \
|
||||
test/test_helper.rb || die
|
||||
|
||||
|
||||
Reference in New Issue
Block a user