summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2022-12-23 12:39:22 +0100
committerHans de Graaff <graaff@gentoo.org>2022-12-24 16:00:33 +0100
commit8728f03f66abb3ce4682db2cf2bd836dc9af2f3d (patch)
treeb97a81acbc4b88aebfe79b8660e21ab41bc04ebf /dev-ruby/maxitest
parentdev-ruby/rubygems: avoid tests that require network (diff)
downloadgentoo-8728f03f66abb3ce4682db2cf2bd836dc9af2f3d.tar.gz
gentoo-8728f03f66abb3ce4682db2cf2bd836dc9af2f3d.tar.bz2
gentoo-8728f03f66abb3ce4682db2cf2bd836dc9af2f3d.zip
dev-ruby/maxitest: add 4.3.0
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/maxitest')
-rw-r--r--dev-ruby/maxitest/Manifest1
-rw-r--r--dev-ruby/maxitest/maxitest-4.3.0.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-ruby/maxitest/Manifest b/dev-ruby/maxitest/Manifest
index 82c5ff71cf77..e4e73cbd61f4 100644
--- a/dev-ruby/maxitest/Manifest
+++ b/dev-ruby/maxitest/Manifest
@@ -1 +1,2 @@
DIST maxitest-3.7.0.tar.gz 62716 BLAKE2B 9919702c3b6c701edf6a5de8c1054547edaeeda518a7b7bae3f419cba9f92f535ec7870ece080fb472d7635243afec4aeed4a27fd839874aa40d63d6ce4ecab8 SHA512 4843f9d405a40177622e9892d1e5fffe297ae03cfef68b73ce3ee966cc3a36e126a9f5a5018b898465f5ad40f8d4fc1e6bf53f5c76b376efeff669b57dd1e8aa
+DIST maxitest-4.3.0.tar.gz 62596 BLAKE2B ddfa98aa4b4e1e0c85100ed6b703e8b76f5a251913e34de03f8cacdc0eb3a60014945786c1f60d81163d8c690f1cf37689fdc05b15a53b63b08247842f736176 SHA512 b81cc37bbd1ed5c149c4d541591fcec46e1e1fc74fc20205cf33745de4fad7fc302e8120b79d17e39412d7133b8d57fee064e1a36380efbde9bdd22f7bbc05b7
diff --git a/dev-ruby/maxitest/maxitest-4.3.0.ebuild b/dev-ruby/maxitest/maxitest-4.3.0.ebuild
new file mode 100644
index 000000000000..b2ce2bedf6ce
--- /dev/null
+++ b/dev-ruby/maxitest/maxitest-4.3.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby27 ruby30 ruby31"
+
+RUBY_FAKEGEM_EXTRADOC="Readme.md"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Minitest + all the features you always wanted"
+HOMEPAGE="https://github.com/grosser/maxitest"
+SRC_URI="https://github.com/grosser/maxitest/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="1"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_rdepend "<dev-ruby/minitest-5.17:5"
+
+ruby_add_bdepend "test? ( dev-ruby/bundler )"
+
+all_ruby_prepare() {
+ rm -f Gemfile.lock || die
+ # Remove developer-only gems from the gemspec and avoid git issues
+ sed -i -e '/wwtd/ s:^:#:' \
+ -e 's/git ls-files/find */' \
+ ${RUBY_FAKEGEM_GEMSPEC} || die
+ sed -i -e '/\(byebug\|bump\)/ s:^:#:' Gemfile || die
+
+ sed -e '/shows short backtraces/askip "fails on ruby27"' \
+ -e '/fails when not used/askip "fails with newer maxitest by design"' \
+ -e '/shows version/askip "fails due to missing require for version"' \
+ -i spec/maxitest_spec.rb || die
+}
+
+each_ruby_prepare() {
+ # Use the correct target
+ sed -i -e '/sh/ s:ruby:'${RUBY}':' \
+ -e '/sh/ s:mtest:'${RUBY}' -S mtest:' \
+ spec/maxitest_spec.rb || die
+}
+
+each_ruby_test() {
+ PATH="${S}/bin:${PATH}" RUBYLIB="${S}/lib" RSPEC_VERSION=3 ruby-ng_rspec spec
+}