1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 # ruby22 -> not compatible with new net/http implementation
8 USE_RUBY="ruby20 ruby21"
10 RUBY_FAKEGEM_DOCDIR="html"
11 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.rdoc"
15 DESCRIPTION="Helper for faking web requests in Ruby"
16 HOMEPAGE="https://github.com/chrisk/fakeweb"
20 KEYWORDS="~alpha amd64 ~arm ~ppc ~ppc64 ~x86"
28 dev-ruby/right_http_connection
32 # The package bundles samuel and right_http_connection, remove
33 # them and use the packages instead.
34 rm -r test/vendor || die "failed to remove bundled gems"
36 # We don't package sdoc and we don't have the direct template.
37 sed -i -e 's/sdoc/rdoc/' -e '/template/d' Rakefile || die
39 # Require an old enough version of mocha
40 sed -i -e '1igem "mocha", "~> 0.14.0"' test/test_helper.rb || die
42 # Use the test-unit gem to make jruby compatible with newer mocha.
43 sed -i -e '1igem "test-unit"' test/test_helper.rb || die
49 # Tests fail on mocking of TCPSocket, but fakeweb itself
50 # actually works as evidenced by the thor test suite.
51 rm test/test_fake_web_open_uri.rb test/test_allow_net_connect.rb test/test_fake_web.rb || die