dev-texlive/texlive-fontsrecommended: amd64 stable wrt bug #695752
[gentoo.git] / dev-ruby / bourne / bourne-1.6.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 USE_RUBY="ruby23 ruby24 ruby25 ruby26"
6
7 RUBY_FAKEGEM_TASK_DOC=""
8 RUBY_FAKEGEM_EXTRADOC="README.md"
9
10 RUBY_FAKEGEM_TASK_TEST="MOCHA_OPTIONS=use_test_unit_gem test:units test:acceptance"
11
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
13
14 inherit ruby-fakegem
15
16 DESCRIPTION="Extends mocha to allow tracking and querying of stub and mock invocations"
17 HOMEPAGE="https://github.com/thoughtbot/bourne"
18
19 LICENSE="MIT"
20 SLOT="0"
21 KEYWORDS="~amd64 ~arm ~x86"
22 IUSE=""
23
24 ruby_add_rdepend ">=dev-ruby/mocha-1.5.0:1.0"
25
26 ruby_add_bdepend "test? ( dev-ruby/test-unit:2 )"
27
28 all_ruby_prepare() {
29         sed -i -e '/git ls-files/d' "${RUBY_FAKEGEM_GEMSPEC}" || die
30         sed -i -e '/bundler/d' Rakefile || die
31
32         # Fix tests to work with mocha 1.5.0 or newer where reset_instance is gone
33         sed -i -e '/reset_instance/ s:^:#:' test/unit/*received_test.rb || die
34         sed -i -e 's/Mockery.reset_instance/mocha_teardown/' test/unit/mockery_test.rb || die
35 }