summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-09-09 09:08:21 +0200
committerHans de Graaff <graaff@gentoo.org>2023-09-09 09:10:35 +0200
commitfd9a7fbe223e7614ea727f1c44fe03220a4d7297 (patch)
tree070f3ab1cbc1cc68287e29a3198ef8453449b4d5 /dev-ruby/puppet_forge
parentapp-i18n/ibus-libpinyin: Stabilize 1.15.2 x86, #913828 (diff)
downloadgentoo-fd9a7fbe223e7614ea727f1c44fe03220a4d7297.tar.gz
gentoo-fd9a7fbe223e7614ea727f1c44fe03220a4d7297.tar.bz2
gentoo-fd9a7fbe223e7614ea727f1c44fe03220a4d7297.zip
dev-ruby/puppet_forge: fix typhoeus detection
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/puppet_forge')
-rw-r--r--dev-ruby/puppet_forge/files/puppet_forge-5.0.1-typhoeus.patch14
-rw-r--r--dev-ruby/puppet_forge/puppet_forge-5.0.1-r1.ebuild (renamed from dev-ruby/puppet_forge/puppet_forge-5.0.1.ebuild)5
2 files changed, 16 insertions, 3 deletions
diff --git a/dev-ruby/puppet_forge/files/puppet_forge-5.0.1-typhoeus.patch b/dev-ruby/puppet_forge/files/puppet_forge-5.0.1-typhoeus.patch
new file mode 100644
index 000000000000..3f39e97afe8c
--- /dev/null
+++ b/dev-ruby/puppet_forge/files/puppet_forge-5.0.1-typhoeus.patch
@@ -0,0 +1,14 @@
+Typhoeus support only works then the faraday-typhoeus package is installed.
+https://github.com/typhoeus/typhoeus/issues/709
+
+--- a/lib/puppet_forge/connection.rb 2023-09-09 09:02:03.981164238 +0200
++++ b/lib/puppet_forge/connection.rb 2023-09-09 09:03:56.506144279 +0200
+@@ -82,7 +82,7 @@
+
+ begin
+ # Use Typhoeus if available.
+- Gem::Specification.find_by_name('typhoeus', '~> 1.4')
++ Gem::Specification.find_by_name('typhoeus', '~> 1.4') && Gem::Specification.find_by_name('faraday-typhoeus')
+ require 'typhoeus/adapters/faraday'
+ adapter = :typhoeus
+ rescue Gem::LoadError
diff --git a/dev-ruby/puppet_forge/puppet_forge-5.0.1.ebuild b/dev-ruby/puppet_forge/puppet_forge-5.0.1-r1.ebuild
index 7a6accc8642f..dc80c18aca40 100644
--- a/dev-ruby/puppet_forge/puppet_forge-5.0.1.ebuild
+++ b/dev-ruby/puppet_forge/puppet_forge-5.0.1-r1.ebuild
@@ -20,6 +20,8 @@ SLOT="$(ver_cut 1)"
KEYWORDS="~amd64"
IUSE=""
+PATCHES=( "${FILESDIR}/${P}-typhoeus.patch" )
+
ruby_add_rdepend "
dev-ruby/faraday:2
>=dev-ruby/faraday-follow_redirects-0.3.0:0.3
@@ -32,7 +34,4 @@ all_ruby_prepare() {
rm -rf spec/integration spec/unit/forge/v3/user_spec.rb || die
sed -i -e 's/git ls-files -z/find * -print0/' ${RUBY_FAKEGEM_GEMSPEC} || die
-
- # Avoid specs that are broken when typhoeus is installed
- rm -f spec/unit/forge/connection_spec.rb spec/unit/forge/v3/{base,release}_spec.rb || die
}