diff options
author | 2018-07-01 10:24:43 +0200 | |
---|---|---|
committer | 2018-07-01 10:25:12 +0200 | |
commit | 9cff2e3f8b003d0a30e31244f8c26f8cc6acb031 (patch) | |
tree | 42cd02b7bf963aaa90cb42b24e8d91c54215ac33 /dev-ruby/multi_xml | |
parent | dev-ruby/facter: add ruby24 (diff) | |
download | gentoo-9cff2e3f8b003d0a30e31244f8c26f8cc6acb031.tar.gz gentoo-9cff2e3f8b003d0a30e31244f8c26f8cc6acb031.tar.bz2 gentoo-9cff2e3f8b003d0a30e31244f8c26f8cc6acb031.zip |
dev-ruby/multi_xml: fix compat with ox > 2.4.11
Backport upstream pull requests approved by ox maintainer to fix
specs with ox > 2.4.11 and ensure more consistent options.
Closes: https://bugs.gentoo.org/640090
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-ruby/multi_xml')
-rw-r--r-- | dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch | 23 | ||||
-rw-r--r-- | dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild | 39 |
2 files changed, 62 insertions, 0 deletions
diff --git a/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch b/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch new file mode 100644 index 000000000000..a0568a8fb52e --- /dev/null +++ b/dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch @@ -0,0 +1,23 @@ +From f9d18d87c3340aa53f524524bf189b99459ab1e6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= <valtri@civ.zcu.cz> +Date: Thu, 18 May 2017 23:10:48 +0200 +Subject: [PATCH] Update for ox > 2.4.11 + +There is more pedantic parsing of white-space characters in ox > 2.4.11. Better to set explicitly the expected skip mode. +--- + lib/multi_xml/parsers/ox.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/multi_xml/parsers/ox.rb b/lib/multi_xml/parsers/ox.rb +index e52a560..dc1413e 100644 +--- a/lib/multi_xml/parsers/ox.rb ++++ b/lib/multi_xml/parsers/ox.rb +@@ -29,7 +29,7 @@ def parse_error + + def parse(io) + handler = Handler.new +- ::Ox.sax_parse(handler, io, :convert_special => true) ++ ::Ox.sax_parse(handler, io, convert_special: true, skip: :skip_return) + handler.doc + end + diff --git a/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild b/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild new file mode 100644 index 000000000000..e995f1ad7202 --- /dev/null +++ b/dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby23 ruby24 ruby25" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_TASK_DOC="yard" + +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A generic swappable back-end for XML parsing" +HOMEPAGE="https://www.rubydoc.info/gems/multi_xml" +SRC_URI="https://github.com/sferik/multi_xml/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" + +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +SLOT="0" +IUSE="" + +ruby_add_bdepend "doc? ( dev-ruby/yard )" +ruby_add_bdepend "test? ( dev-ruby/ox )" + +all_ruby_prepare() { + eapply "${FILESDIR}/${P}-ox24.patch" + + sed -i -e '/simplecov/,/^end/ s:^:#:' spec/helper.rb || die + sed -i -e '/bundler/I s:^:#:' -e '/yardstick/,/end/ s:^:#:' Rakefile || die +} + +each_ruby_test() { + CI=true each_fakegem_test +} |