1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby20 ruby21 ruby22 ruby23"
8 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
9 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.rdoc"
11 COMMIT=48208f9bf053577befe5723746b6ff35b99b45d0
15 DESCRIPTION="Helper for faking web requests in Ruby"
16 HOMEPAGE="https://github.com/chrisk/fakeweb"
17 SRC_URI="https://github.com/chrisk/fakeweb/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
18 RUBY_S="${PN}-${COMMIT}"
22 KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
25 RUBY_PATCHES=( fakeweb-ruby22.patch
26 fakeweb-ruby23.patch )
35 # The package bundles samuel and right_http_connection, remove
37 rm -r test/vendor || die "failed to remove bundled gems"
39 # We don't package sdoc and we don't have the direct template.
40 sed -i -e 's/sdoc/rdoc/' -e '/template/d' Rakefile || die
42 # Require an old enough version of mocha
43 sed -i -e '1igem "mocha", "~> 0.14.0"' test/test_helper.rb || die
45 # Use the test-unit gem to make jruby compatible with newer mocha.
46 sed -i -e '1igem "test-unit"' \
47 -e '/bundler/I s:^:#:' \
48 -e '/simplecov/ s:^:#:' test/test_helper.rb || die
50 # Avoid test dependencies on unmaintained packages that no longer work
51 rm test/test_other_net_http_libraries.rb || die
53 sed -i -e '/test:preflight/ s:^:#:' Rakefile || die