From da1981fca450b5dd28d252cd42d59480c7d062b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 29 Sep 2022 07:30:43 +0200 Subject: [PATCH] [rubygems/rubygems] Remove unused parameter to `SharedHelpers.pretty_dependency` https://github.com/rubygems/rubygems/commit/665051d085 --- lib/bundler/definition.rb | 4 ++-- lib/bundler/injector.rb | 2 +- lib/bundler/shared_helpers.rb | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 21db42f772..6bb42ab02c 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -578,8 +578,8 @@ module Bundler ].select(&:first).map(&:last).join(", ") end - def pretty_dep(dep, source = false) - SharedHelpers.pretty_dependency(dep, source) + def pretty_dep(dep) + SharedHelpers.pretty_dependency(dep) end # Check if the specs of the given source changed diff --git a/lib/bundler/injector.rb b/lib/bundler/injector.rb index 82d5bd5880..81465cec19 100644 --- a/lib/bundler/injector.rb +++ b/lib/bundler/injector.rb @@ -70,7 +70,7 @@ module Bundler show_warning("No gems were removed from the gemfile.") if deps.empty? - deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep, false)} was removed." } + deps.each {|dep| Bundler.ui.confirm "#{SharedHelpers.pretty_dependency(dep)} was removed." } end # Invalidate the cached Bundler.definition. diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 8c4e26f074..899eb68e0a 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -163,7 +163,7 @@ module Bundler "\nEither installing with `--full-index` or running `bundle update #{spec.name}` should fix the problem." end - def pretty_dependency(dep, print_source = false) + def pretty_dependency(dep) msg = String.new(dep.name) msg << " (#{dep.requirement})" unless dep.requirement == Gem::Requirement.default @@ -172,7 +172,6 @@ module Bundler msg << " " << platform_string if !platform_string.empty? && platform_string != Gem::Platform::RUBY end - msg << " from the `#{dep.source}` source" if print_source && dep.source msg end