summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby')
-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
}