Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/faraday/
Date: Sat, 29 Oct 2016 21:30:45
Message-Id: 1477776629.c8c69ac0aad6482ff362df4359aa50a61894f9ec.mrueg@gentoo
1 commit: c8c69ac0aad6482ff362df4359aa50a61894f9ec
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 29 21:30:29 2016 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 29 21:30:29 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8c69ac0
7
8 dev-ruby/faraday: Add ruby23, drop ~ppc, ~x86
9
10 Package-Manager: portage-2.3.2
11
12 dev-ruby/faraday/faraday-0.9.2-r2.ebuild | 68 ++++++++++++++++++++++++++++++++
13 1 file changed, 68 insertions(+)
14
15 diff --git a/dev-ruby/faraday/faraday-0.9.2-r2.ebuild b/dev-ruby/faraday/faraday-0.9.2-r2.ebuild
16 new file mode 100644
17 index 00000000..f8b79ba
18 --- /dev/null
19 +++ b/dev-ruby/faraday/faraday-0.9.2-r2.ebuild
20 @@ -0,0 +1,68 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +USE_RUBY="ruby20 ruby21 ruby22 ruby23"
28 +
29 +RUBY_FAKEGEM_TASK_TEST="test"
30 +RUBY_FAKEGEM_TASK_DOC=""
31 +
32 +RUBY_FAKEGEM_EXTRADOC="README.md"
33 +
34 +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
35 +
36 +inherit ruby-fakegem eutils
37 +
38 +DESCRIPTION="HTTP/REST API client library with pluggable components"
39 +HOMEPAGE="https://github.com/lostisland/faraday"
40 +SRC_URI="https://github.com/lostisland/faraday/archive/v${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="MIT"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~ppc64"
45 +IUSE=""
46 +
47 +DEPEND+=" test? ( sys-process/lsof )"
48 +
49 +ruby_add_rdepend ">=dev-ruby/multipart-post-1.2.0 <dev-ruby/multipart-post-3"
50 +ruby_add_bdepend "test? (
51 + >=dev-ruby/test-unit-2.4
52 + dev-ruby/httpclient
53 + dev-ruby/rack-test
54 + dev-ruby/sinatra
55 + dev-ruby/net-http-persistent
56 + dev-ruby/patron
57 + )"
58 +
59 +all_ruby_prepare() {
60 + # Remove bundler support.
61 + rm Gemfile || die
62 + sed -i -e '/[Bb]undler/d' Rakefile test/helper.rb || die
63 + sed -i -e '/bundler/,/^fi/ s:^:#:' script/test || die
64 +
65 + # Remove simplecov and coveralls support, not needed to run tests.
66 + sed -i -e '/simplecov/,/^ end/ s:^:#:' test/helper.rb || die
67 +
68 + # Remove tests for adapters that are not packaged for Gentoo.
69 + rm test/adapters/em_http_test.rb test/adapters/em_synchrony_test.rb test/adapters/excon_test.rb test/adapters/typhoeus_test.rb || die
70 +
71 + # The proxy server is already killed, may be OS X vs Linux issue.
72 + sed -i -e '138 s/^/#/' script/test || die
73 +
74 + sed -i -e '/git ls-files/ s:^:#:' ${RUBY_FAKEGEM_GEMSPEC} || die
75 +}
76 +
77 +each_ruby_prepare() {
78 + # Make sure the test scripts use the right ruby interpreter
79 + sed -i -e 's:ruby:'${RUBY}':' script/* || die
80 +}
81 +
82 +each_ruby_test() {
83 + each_fakegem_test
84 +
85 + # Sleep some time to allow the sinatra test server to die
86 + einfo "Waiting for test server to stop"
87 + sleep 10
88 +}