summaryrefslogtreecommitdiff
path: root/lib/bundler/endpoint_specification.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2024-05-17 18:27:13 +0200
committergit <[email protected]>2024-06-14 14:27:02 +0000
commit4d73f3f9ebefa347acc1ec8031ac4025f5f71ba8 (patch)
treeeb97e6a8c7e5477c03cf4b346982f0553d2a9712 /lib/bundler/endpoint_specification.rb
parent6a474ef2660da0e5486aa3a3bdcd4f9aac5e5362 (diff)
[rubygems/rubygems] Fix funding metadata not being printed in some situations
Namely, when a gem has not previously been installed, and Bundler is using the compact index API, fund metadata was not getting printed because the proper delegation was not implemented in the specification class used by the compact index. https://github.com/rubygems/rubygems/commit/9ef5139f60
Diffstat (limited to 'lib/bundler/endpoint_specification.rb')
-rw-r--r--lib/bundler/endpoint_specification.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 87cb352efa..201818cc33 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -92,6 +92,17 @@ module Bundler
end
end
+ # needed for `bundle fund`
+ def metadata
+ if @remote_specification
+ @remote_specification.metadata
+ elsif _local_specification
+ _local_specification.metadata
+ else
+ super
+ end
+ end
+
def _local_specification
return unless @loaded_from && File.exist?(local_specification_path)
eval(File.read(local_specification_path), nil, local_specification_path).tap do |spec|