1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
|
USE_RUBY="ruby27 ruby30 ruby31"
|
6 |
5 |
|
7 |
|
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
|
6 |
USE_RUBY="ruby30 ruby31 ruby32"
|
8 |
7 |
|
|
8 |
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
9 |
9 |
RUBY_FAKEGEM_EXTRADOC="CHANGES.md README.md"
|
10 |
|
|
|
10 |
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
|
11 |
11 |
inherit ruby-fakegem
|
12 |
12 |
|
13 |
13 |
DESCRIPTION="An easy-to-use client library for making requests from Ruby"
|
14 |
14 |
HOMEPAGE="https://github.com/tarcieri/http"
|
15 |
15 |
|
16 |
16 |
LICENSE="MIT"
|
17 |
|
SLOT="4"
|
18 |
|
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
|
|
17 |
SLOT="$(ver_cut 1)"
|
|
18 |
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
|
19 |
19 |
IUSE=""
|
20 |
20 |
|
21 |
|
ruby_add_rdepend "
|
22 |
|
>=dev-ruby/addressable-2.3:0
|
23 |
|
>=dev-ruby/http-cookie-1.0:0
|
|
21 |
ruby_add_rdepend "=dev-ruby/addressable-2*
|
|
22 |
>=dev-ruby/addressable-2.8
|
|
23 |
=dev-ruby/http-cookie-1*
|
24 |
24 |
>=dev-ruby/http-form_data-2.2:2
|
25 |
|
=dev-ruby/http-parser-1.2*"
|
|
25 |
>=dev-ruby/llhttp-ffi-0.4.0:0/0.4"
|
26 |
26 |
|
27 |
27 |
ruby_add_bdepend "
|
28 |
|
test? ( dev-ruby/certificate_authority dev-ruby/rspec-its )"
|
|
28 |
test? (
|
|
29 |
=dev-ruby/certificate_authority-1*
|
|
30 |
dev-ruby/rspec-its
|
|
31 |
dev-ruby/webrick
|
|
32 |
)"
|
29 |
33 |
|
30 |
34 |
all_ruby_prepare() {
|
31 |
|
sed -i -e '/simplecov/,/end/ s:^:#:' \
|
32 |
|
-e '1irequire "cgi"' spec/spec_helper.rb || die
|
33 |
|
|
34 |
35 |
# Avoid specs that require network access
|
35 |
36 |
sed -i -e '/.persistent/,/^ end/ s:^:#:' \
|
36 |
37 |
spec/lib/http_spec.rb || die
|
... | ... | |
47 |
48 |
sed -i -e '/context "ssl"/,/^ end/ s:^:#:' spec/lib/http_spec.rb || die
|
48 |
49 |
sed -i -e '/describe "working with SSL"/,/^ end/ s:^:#:' spec/lib/http/client_spec.rb || die
|
49 |
50 |
|
50 |
|
# Fix spec failing due to kwargs confusion on ruby30
|
51 |
|
sed -i -e '196 s/:foo => "bar"/{:foo => "bar"}/' spec/lib/http/client_spec.rb || die
|
|
51 |
# Disable coverage
|
|
52 |
sed -i -e 's/require_relative ".\/support\/simplecov"//g' "spec/spec_helper.rb" || die
|
|
53 |
}
|
|
54 |
|
|
55 |
each_ruby_test() {
|
|
56 |
# disables dev-ruby/fuubar dep
|
|
57 |
CI=1 each_fakegem_test
|
52 |
58 |
}
|