diff options
author | Hans de Graaff <graaff@gentoo.org> | 2024-02-13 11:32:15 +0100 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2024-02-13 11:32:44 +0100 |
commit | 745125a0483905b9257f3efc0d6297ec3eb350af (patch) | |
tree | 67477f251b75fb2d94b6883744f8ddffec52560a /dev-ruby/crack | |
parent | dev-ruby/console: add 1.23.4 (diff) | |
download | gentoo-745125a0483905b9257f3efc0d6297ec3eb350af.tar.gz gentoo-745125a0483905b9257f3efc0d6297ec3eb350af.tar.bz2 gentoo-745125a0483905b9257f3efc0d6297ec3eb350af.zip |
dev-ruby/crack: add 0.4.6
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/crack')
-rw-r--r-- | dev-ruby/crack/Manifest | 1 | ||||
-rw-r--r-- | dev-ruby/crack/crack-0.4.6.ebuild | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/dev-ruby/crack/Manifest b/dev-ruby/crack/Manifest index 18047808bdc6..886aa5509651 100644 --- a/dev-ruby/crack/Manifest +++ b/dev-ruby/crack/Manifest @@ -1 +1,2 @@ DIST crack-0.4.4.tar.gz 586633 BLAKE2B 26e2cda6e9447fb3c9fe02092a6e9d6a8097c7bca6a483a3af42aa8ba491b737bc0dc3ae1936ef8ffb5c5d5cbbed3fde69c9641f05b9e3eb3beab87c375f68fd SHA512 3f86c76718a3c2a65ee11b15434035396c2355a8562bdb642432a659b52c3e811e930318e0dc2df3ff06bd53ac14d0694471e425420ae3b7971f5d4f818bba87 +DIST crack-0.4.6.tar.gz 587341 BLAKE2B eafe4e3682cfbcfd2369c66cc47e7eab8557cce568f401599a6a72efac361be5b16f47ee7eb2916ada111b10c7ee6aa0dfa8cbb4988eb822304d22f3b8a51a6f SHA512 b004d4fc69319f4d05a79e34c04fe7d46bb78dc516d1481e09b07b9b0835e50925c5a1a89ee17070eceaf29ac1c371b6a590319b02b0d22b85c6ab26ee979d23 diff --git a/dev-ruby/crack/crack-0.4.6.ebuild b/dev-ruby/crack/crack-0.4.6.ebuild new file mode 100644 index 000000000000..8922e4131839 --- /dev/null +++ b/dev-ruby/crack/crack-0.4.6.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby31 ruby32 ruby33" + +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="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" + +ruby_add_rdepend "dev-ruby/bigdecimal 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 + + # Also list rexml in the gemspec. This is fixed upstream in 0.4.5 but that version is not tagged. + sed -i -e '17igem.add_runtime_dependency("rexml")' ${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 'Dir["test/*_test.rb"].each { |f| load f }' || die +} |