summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-07 15:19:57 +0100
committerSam James <sam@gentoo.org>2023-04-07 15:25:25 +0100
commitaa780303ae90c6268e4b42026b2acb1ff7db9c99 (patch)
tree36f57dfe6b9c3230bba2260cf7e27ee0570f03df /app-text/ronn-ng/files
parentdev-ruby/mustache: enable ruby31, ruby32 (diff)
downloadgentoo-aa780303ae90c6268e4b42026b2acb1ff7db9c99.tar.gz
gentoo-aa780303ae90c6268e4b42026b2acb1ff7db9c99.tar.bz2
gentoo-aa780303ae90c6268e4b42026b2acb1ff7db9c99.zip
app-text/ronn-ng: enable ruby31, enable ruby32; drop unnecessary man page build
- Enable ruby31, enable ruby32 This only takes one patch and it's just for tests to work with newer psych. Fedora is just using that same patch too, no others. - Drop unnecessary man page build. They're included in the gem, so we don't need to build it again (which causes a problem when invoking rake directly/calling unwrapped ronn, as e.g. nokogiri isn't necessarily installed for it anymore.) Closes: https://bugs.gentoo.org/835156 Closes: https://bugs.gentoo.org/898414 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/ronn-ng/files')
-rw-r--r--app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch b/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch
new file mode 100644
index 000000000000..b9e05cfff455
--- /dev/null
+++ b/app-text/ronn-ng/files/ronn-ng-0.9.1-psych-4-tests.patch
@@ -0,0 +1,40 @@
+https://github.com/apjanke/ronn-ng/commit/e194bf62b1d0c0828cc83405e60dc5ece829e62f
+
+From e194bf62b1d0c0828cc83405e60dc5ece829e62f Mon Sep 17 00:00:00 2001
+From: Andrew Janke <andrew@apjanke.net>
+Date: Fri, 6 Jan 2023 07:25:48 -0500
+Subject: [PATCH] Workaround for Psych 4.0+ in tests
+
+Psych 4.0, shipped with Ruby 3.1, switched to a "safe load" by default, and requires you to explicitly set allowed classes. But previous Psych versions didn't support this kwarg, so the call needs to be made differently depending on which version of Psych/Ruby this is running under.
+
+Co-authored-by: Takuya Noguchi <takninnovationresearch@gmail.com>
+---
+ test/test_ronn_document.rb | 7 ++++++-
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/test/test_ronn_document.rb b/test/test_ronn_document.rb
+index 75788dc..cd573fe 100644
+--- a/test/test_ronn_document.rb
++++ b/test/test_ronn_document.rb
+@@ -137,6 +137,11 @@ def canonicalize(text)
+
+ test 'converting to yaml' do
+ require 'yaml'
++ actual = begin
++ YAML.load(@doc.to_yaml, permitted_classes: [Time])
++ rescue ArgumentError # Remove this line when Ruby 3.0.x support is dropped
++ YAML.load(@doc.to_yaml)
++ end
+ assert_equal({
+ 'section' => '1',
+ 'name' => 'hello',
+@@ -146,7 +151,7 @@ def canonicalize(text)
+ 'toc' => [['NAME', 'NAME']],
+ 'organization' => nil,
+ 'manual' => nil
+- }, YAML.load(@doc.to_yaml))
++ }, actual)
+ end
+
+ test 'converting to json' do
+