mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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
This commit is contained in:
23
dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch
Normal file
23
dev-ruby/multi_xml/files/multi_xml-0.6.0-ox24.patch
Normal file
@@ -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
|
||||
|
||||
39
dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild
Normal file
39
dev-ruby/multi_xml/multi_xml-0.6.0-r1.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user