summaryrefslogtreecommitdiff
blob: 4f6b1e3ab087d52cf717d48af642acbf0ce5b399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

USE_RUBY="ruby30 ruby31 ruby32"

RUBY_FAKEGEM_EXTRADOC="README.md"
RUBY_FAKEGEM_GEMSPEC="docker-api.gemspec"
RUBY_FAKEGEM_RECIPE_TEST="rspec3"

inherit ruby-fakegem

DESCRIPTION="A simple REST client for the Docker Remote API"
HOMEPAGE="https://github.com/upserve/docker-api"
SRC_URI="https://github.com/upserve/docker-api/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"

ruby_add_rdepend "
	>=dev-ruby/excon-0.47.0
	dev-ruby/multi_json
"

ruby_add_bdepend "test? ( dev-ruby/rspec-its )"

all_ruby_prepare() {
	sed -i -e 's/git ls-files/find */' ${RUBY_FAKEGEM_GEMSPEC} || die
	sed -i -e '/bundler/ s:^:#:' -e '/formatter/ s:^:#:' spec/spec_helper.rb || die
	sed -i -e '/\(single_cov\|SingleCov\)/ s:^:#:' spec/*.rb spec/*/*.rb || die
	rm -f spec/cov_spec.rb || die

	# Avoid specs requiring a running docker daemon
	rm -f spec/docker_spec.rb spec/docker/{container,event,exec,image,network,volume}_spec.rb || die
}