Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/maxitest/
Date: Wed, 07 Jul 2021 06:53:46
Message-Id: 1625640815.c626875d8e04a89077960276ce15cfea81285be5.graaff@gentoo
1 commit: c626875d8e04a89077960276ce15cfea81285be5
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 7 06:26:52 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 7 06:53:35 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c626875d
7
8 dev-ruby/maxitest: add ruby27, ruby30; allow minitest 5.14
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.2
11 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
12
13 dev-ruby/maxitest/maxitest-3.6.0-r1.ebuild | 53 ++++++++++++++++++++++++++++++
14 1 file changed, 53 insertions(+)
15
16 diff --git a/dev-ruby/maxitest/maxitest-3.6.0-r1.ebuild b/dev-ruby/maxitest/maxitest-3.6.0-r1.ebuild
17 new file mode 100644
18 index 00000000000..a12d19fb13f
19 --- /dev/null
20 +++ b/dev-ruby/maxitest/maxitest-3.6.0-r1.ebuild
21 @@ -0,0 +1,53 @@
22 +# Copyright 1999-2021 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +USE_RUBY="ruby25 ruby26 ruby27 ruby30"
27 +
28 +RUBY_FAKEGEM_EXTRADOC="Readme.md"
29 +
30 +RUBY_FAKEGEM_RECIPE_TEST="rspec3"
31 +
32 +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
33 +
34 +inherit ruby-fakegem
35 +
36 +DESCRIPTION="Minitest + all the features you always wanted"
37 +HOMEPAGE="https://github.com/grosser/maxitest"
38 +SRC_URI="https://github.com/grosser/maxitest/archive/v${PV}.tar.gz -> ${P}.tar.gz"
39 +
40 +LICENSE="MIT"
41 +SLOT="1"
42 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
43 +IUSE=""
44 +
45 +ruby_add_rdepend "<dev-ruby/minitest-5.15:5"
46 +
47 +ruby_add_bdepend "test? ( dev-ruby/bundler )"
48 +
49 +all_ruby_prepare() {
50 + rm -f Gemfile.lock || die
51 + # Remove developer-only gems from the gemspec and avoid git issues
52 + sed -i -e '/\(bump\|wwtd\)/ s:^:#:' \
53 + -e 's/git ls-files/find/' \
54 + ${RUBY_FAKEGEM_GEMSPEC} || die
55 + sed -i -e '/byebug/ s:^:#:' Gemfile || die
56 +
57 + sed -e '/shows short backtraces/askip "fails on ruby27"' \
58 + -e '/fails when not used/askip "fails with newer maxitest by design"' \
59 + -i spec/maxitest_spec.rb || die
60 +
61 + # Allow minitest 5.14 (added upstream but not released)
62 + sed -i -e '/minitest/ s/5.14/5.15/' ${RUBY_FAKEGEM_GEMSPEC} || die
63 +}
64 +
65 +each_ruby_prepare() {
66 + # Use the correct target
67 + sed -i -e '/sh/ s:ruby:'${RUBY}':' \
68 + -e '/sh/ s:mtest:'${RUBY}' -S mtest:' \
69 + spec/maxitest_spec.rb || die
70 +}
71 +
72 +each_ruby_test() {
73 + PATH="${S}/bin:${PATH}" RSPEC_VERSION=3 ruby-ng_rspec spec
74 +}