/[gentoo-x86]/dev-ruby/fakeweb/fakeweb-1.3.0-r2.ebuild
Gentoo

Contents of /dev-ruby/fakeweb/fakeweb-1.3.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Jul 1 05:52:06 2015 UTC (2 years, 7 months ago) by graaff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -3 lines
Document ruby22 status. Update mocha dependency.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/fakeweb/fakeweb-1.3.0-r2.ebuild,v 1.1 2015/03/29 07:14:31 graaff Exp $
4
5 EAPI=5
6
7 # ruby22 -> not compatible with new net/http implementation
8 USE_RUBY="ruby19 ruby20 ruby21"
9
10 RUBY_FAKEGEM_DOCDIR="html"
11 RUBY_FAKEGEM_EXTRADOC="CHANGELOG README.rdoc"
12
13 inherit ruby-fakegem
14
15 DESCRIPTION="Helper for faking web requests in Ruby"
16 HOMEPAGE="http://github.com/chrisk/fakeweb"
17
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
21 IUSE=""
22
23 ruby_add_bdepend "
24 test? (
25 dev-ruby/mocha:0.14
26 dev-ruby/test-unit
27 dev-ruby/samuel
28 dev-ruby/right_http_connection
29 )"
30
31 all_ruby_prepare() {
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"
35
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
38
39 # Require an old enough version of mocha
40 sed -i -e '1igem "mocha", "~> 0.14.0"' test/test_helper.rb || die
41
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
44 }
45
46 each_ruby_prepare() {
47 case ${RUBY} in
48 *ruby2[01])
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
52 ;;
53 esac
54 }

  ViewVC Help
Powered by ViewVC 1.1.20