summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Jensen <djensen@addfour.co>2022-01-26 12:35:13 -0600
committergit <svn-admin@ruby-lang.org>2022-02-01 20:07:18 +0900
commit0b2f6b942b0c38bf4925f4e8ad662f6a14954060 (patch)
tree4449790d866e46a995fee5263ae756d76159d7e3 /lib
parentf6894711a48ab422139aff5afc4bbcf202ff7167 (diff)
[rubygems/rubygems] Skip "seller shipped" notification after delivery
If a Shipment has been delivered, there is no point in notifying the buyer that the seller shipped. Instead, we should simply notify the buyer that the shipment was delivered. This is relevant in cases where the seller is late to mark a Shipment as shipped, so the first EasyPost Tracker update marks it as delivered, or in cases where the seller fails to mark as shipped and the buyer marks it as delivered. This fixes a Shipment event handler so the buyer notification for shipment is no longer invoked if the Shipment is already delivered. https://github.com/rubygems/rubygems/commit/09c2cadc86
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/info.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 76c8cf60c0..38bc008cb5 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -73,7 +73,8 @@ module Bundler
gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
gem_info << "\tPath: #{spec.full_gem_path}\n"
- gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
+ gem_info << "\tDefault Gem: yes\n" if spec.respond_to?(:default_gem?) && spec.default_gem?
+ gem_info << "\tReverse Dependencies: \n\t\t#{gem_dependencies.join("\n\t\t")}" if gem_dependencies.any?
if name != "bundler" && spec.deleted_gem?
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
@@ -81,5 +82,13 @@ module Bundler
Bundler.ui.info gem_info
end
+
+ def gem_dependencies
+ @gem_dependencies ||= Bundler.definition.specs.map do |spec|
+ dependency = spec.dependencies.find {|dep| dep.name == gem_name }
+ next unless dependency
+ "#{spec.name} (#{spec.version}) depends on #{gem_name} (#{dependency.requirements_list.join(", ")})"
+ end.compact.sort
+ end
end
end