summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2022-07-23 10:14:33 +0200
committerHans de Graaff <graaff@gentoo.org>2022-07-24 09:09:35 +0200
commit5cfeb0a3e69e952d781c7f7ea338ab0a04970b0c (patch)
tree9a6cf3ab7257e694a627ee3d89e15a0c5802f01e /dev-ruby
parentapp-text/mupdf-1.20.0: fix version in .pc file (diff)
downloadgentoo-5cfeb0a3e69e952d781c7f7ea338ab0a04970b0c.tar.gz
gentoo-5cfeb0a3e69e952d781c7f7ea338ab0a04970b0c.tar.bz2
gentoo-5cfeb0a3e69e952d781c7f7ea338ab0a04970b0c.zip
dev-ruby/crack: EAPI 7 -> 8, fix gemspec, fix tests
Closes: https://bugs.gentoo.org/835132 Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby')
-rw-r--r--dev-ruby/crack/crack-0.4.4-r1.ebuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-ruby/crack/crack-0.4.4-r1.ebuild b/dev-ruby/crack/crack-0.4.4-r1.ebuild
new file mode 100644
index 000000000000..01cf2faa06cb
--- /dev/null
+++ b/dev-ruby/crack/crack-0.4.4-r1.ebuild
@@ -0,0 +1,40 @@
+# 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 History"
+
+RUBY_FAKEGEM_GEMSPEC="crack.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Really simple JSON and XML parsing, ripped from Merb and Rails"
+HOMEPAGE="https://github.com/jnunemaker/crack"
+SRC_URI="https://github.com/jnunemaker/crack/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_rdepend "dev-ruby/rexml"
+
+ruby_add_bdepend "test? ( dev-ruby/minitest )"
+
+all_ruby_prepare() {
+ sed -i -e 's/git ls-files --/find/' ${RUBY_FAKEGEM_GEMSPEC} || die
+}
+
+each_ruby_prepare() {
+ # Remove tests which fail when run by portage but pass when run by hand
+ sed -i -e '/{"regex": \/foo.*\/}/d' test/json_test.rb || die
+ sed -i -e '/{"regex": \/foo.*\/i}/d' test/json_test.rb || die
+ sed -i -e '/{"regex": \/foo.*\/mix}/d' test/json_test.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Itest -Ilib -e 'gem "psych", "~> 3.0"; Dir["test/*_test.rb"].each { |f| load f }' || die
+}