summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2022-05-16 13:13:17 +0200
committerHans de Graaff <graaff@gentoo.org>2022-05-16 13:13:49 +0200
commitdb5adb0c74c50ba95eb05192dfdce72143c549c7 (patch)
treed76593d8f7c63673d8c0906b256c0ea2a9e85c09 /dev-ruby/sprockets
parentnet-misc/nextcloud-client: stabilize 3.4.4 for amd64 (diff)
downloadgentoo-db5adb0c74c50ba95eb05192dfdce72143c549c7.tar.gz
gentoo-db5adb0c74c50ba95eb05192dfdce72143c549c7.tar.bz2
gentoo-db5adb0c74c50ba95eb05192dfdce72143c549c7.zip
dev-ruby/sprockets/files: add missing patches
Closes: https://bugs.gentoo.org/844961 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/sprockets')
-rw-r--r--dev-ruby/sprockets/files/sprockets-3.7.2-erb-deprecation.patch29
-rw-r--r--dev-ruby/sprockets/files/sprockets-3.7.2-kwargs.patch28
2 files changed, 57 insertions, 0 deletions
diff --git a/dev-ruby/sprockets/files/sprockets-3.7.2-erb-deprecation.patch b/dev-ruby/sprockets/files/sprockets-3.7.2-erb-deprecation.patch
new file mode 100644
index 000000000000..c433360cae52
--- /dev/null
+++ b/dev-ruby/sprockets/files/sprockets-3.7.2-erb-deprecation.patch
@@ -0,0 +1,29 @@
+From b4fbdd9dfccabcaf5aa9f6ab7f6cab430cc16999 Mon Sep 17 00:00:00 2001
+From: utilum <oz@utilum.com>
+Date: Sun, 24 Jun 2018 10:30:13 +0200
+Subject: [PATCH] backport: Deprecate safe_level of `ERB.new` in Ruby 2.6
+
+37a87ba0969d9c08e0e5d05271c7d2e6ba8aa817
+---
+ lib/sprockets/erb_processor.rb | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/sprockets/erb_processor.rb b/lib/sprockets/erb_processor.rb
+index a14d1c1a8..acbd4ad63 100644
+--- a/lib/sprockets/erb_processor.rb
++++ b/lib/sprockets/erb_processor.rb
+@@ -18,7 +18,13 @@ def initialize(&block)
+ end
+
+ def call(input)
+- engine = ::ERB.new(input[:data], nil, '<>')
++ match = ERB.version.match(/\Aerb\.rb \[(?<version>[^ ]+) /)
++ if match && match[:version] >= "2.2.0" # Ruby 2.6+
++ engine = ::ERB.new(input[:data], trim_mode: '<>')
++ else
++ engine = ::ERB.new(input[:data], nil, '<>')
++ end
++
+ context = input[:environment].context_class.new(input)
+ klass = (class << context; self; end)
+ klass.class_eval(&@block) if @block
diff --git a/dev-ruby/sprockets/files/sprockets-3.7.2-kwargs.patch b/dev-ruby/sprockets/files/sprockets-3.7.2-kwargs.patch
new file mode 100644
index 000000000000..3c9be7e7af01
--- /dev/null
+++ b/dev-ruby/sprockets/files/sprockets-3.7.2-kwargs.patch
@@ -0,0 +1,28 @@
+From 6e6d6a70848cf006fabf48088cb4140c6d1858e7 Mon Sep 17 00:00:00 2001
+From: pavel <pavel.rosicky@easy.cz>
+Date: Tue, 1 Oct 2019 12:29:13 +0200
+Subject: [PATCH] kwargs
+
+---
+ test/test_performance.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/test_performance.rb b/test/test_performance.rb
+index c9e76c00f..f2ffde606 100644
+--- a/test/test_performance.rb
++++ b/test/test_performance.rb
+@@ -16,12 +16,12 @@ def stat(filename)
+ $dir_entires_calls = nil
+ class << Dir
+ alias_method :original_entries, :entries
+- def entries(dirname, *args)
++ def entries(dirname, **args)
+ if $dir_entires_calls
+ $dir_entires_calls[dirname.to_s] ||= []
+ $dir_entires_calls[dirname.to_s] << caller
+ end
+- original_entries(dirname, *args)
++ original_entries(dirname, **args)
+ end
+ end
+