summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2022-09-19 14:02:01 +0200
committerHans de Graaff <hans@degraaff.org>2022-09-19 14:02:01 +0200
commite526777839422b48bda503a6ad69a1c7480190d9 (patch)
tree5e1ccce8b236bc3ab7b293762285d7d9a3c84915 /dev-ruby/xray-rails
parentdev-ruby/xray-rails: drop 0.3.2-r1 (diff)
downloadgraaff-e526777839422b48bda503a6ad69a1c7480190d9.tar.gz
graaff-e526777839422b48bda503a6ad69a1c7480190d9.tar.bz2
graaff-e526777839422b48bda503a6ad69a1c7480190d9.zip
dev-ruby/xray-rails: fix ruby30 compatibility
Signed-off-by: Hans de Graaff <hans@degraaff.org>
Diffstat (limited to 'dev-ruby/xray-rails')
-rw-r--r--dev-ruby/xray-rails/files/xray-rails-0.3.2-ruby30.patch26
-rw-r--r--dev-ruby/xray-rails/xray-rails-0.3.2-r3.ebuild32
2 files changed, 58 insertions, 0 deletions
diff --git a/dev-ruby/xray-rails/files/xray-rails-0.3.2-ruby30.patch b/dev-ruby/xray-rails/files/xray-rails-0.3.2-ruby30.patch
new file mode 100644
index 00000000..a1993aa1
--- /dev/null
+++ b/dev-ruby/xray-rails/files/xray-rails-0.3.2-ruby30.patch
@@ -0,0 +1,26 @@
+From f121814718c9907b20058dc9357b80a53afab821 Mon Sep 17 00:00:00 2001
+From: Matt Brictson <matt@mattbrictson.com>
+Date: Sat, 2 Jan 2021 13:52:30 -0800
+Subject: [PATCH] Fix "undefined method safe_append=" on Ruby 3.0.0
+
+---
+ lib/xray/engine.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/xray/engine.rb b/lib/xray/engine.rb
+index 6f9024a..fc55bd7 100644
+--- a/lib/xray/engine.rb
++++ b/lib/xray/engine.rb
+@@ -21,10 +21,10 @@ class Engine < ::Rails::Engine
+ ActionView::Template.class_eval do
+ extend Xray::Aliasing
+
+- def render_with_xray(*args, &block)
++ def render_with_xray(*args, **kwargs, &block)
+ path = identifier
+ view = args.first
+- source = render_without_xray(*args, &block)
++ source = render_without_xray(*args, **kwargs, &block)
+
+ suitable_template = !(view.respond_to?(:mailer) && view.mailer) &&
+ !path.include?('_xray_bar') &&
diff --git a/dev-ruby/xray-rails/xray-rails-0.3.2-r3.ebuild b/dev-ruby/xray-rails/xray-rails-0.3.2-r3.ebuild
new file mode 100644
index 00000000..0e7bfe14
--- /dev/null
+++ b/dev-ruby/xray-rails/xray-rails-0.3.2-r3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30"
+
+RUBY_FAKEGEM_EXTRADOC="README.md"
+
+RUBY_FAKEGEM_EXTRAINSTALL="app"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Provides a dev bar and an overlay to visualize your UI's rendered partials"
+HOMEPAGE="https://github.com/brentd/xray-rails"
+
+LICENSE="MIT"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64"
+IUSE=""
+
+# Uses various gemfiles
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${P}-sprockets-4.patch"
+ "${FILESDIR}/${P}-ruby30.patch"
+)
+
+ruby_add_rdepend "
+ >=dev-ruby/rails-3.1.0:*
+"