summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-31 11:27:11 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-03-31 11:27:11 -0500
commit48ca5adedefcf13bf50331858ba0a53ae6aab478 (patch)
treedbe891e342c6d1c23b113a0ab3338017a12b6ede /lib/bundler/cli
parent276c82b5e84829f579f0bdfb3ce59fad8c85f6a4 (diff)
downloadbundler-48ca5adedefcf13bf50331858ba0a53ae6aab478.tar.gz
[Outdated] Stop printing “from” messages in random placesseg-outdated-new-machine
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/outdated.rb32
1 files changed, 15 insertions, 17 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 9050126cd1..863d0dd388 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -80,25 +80,22 @@ module Bundler
end
gem_outdated = Gem::Version.new(active_spec.version) > Gem::Version.new(current_spec.version)
- if gem_outdated || (current_spec.git_version != active_spec.git_version)
- groups = nil
- if dependency && !options[:parseable]
- groups = dependency.groups.join(", ")
- end
-
- outdated_gems_list << { :active_spec => active_spec,
- :current_spec => current_spec,
- :dependency => dependency,
- :groups => groups }
-
- outdated_gems_by_groups[groups] ||= []
- outdated_gems_by_groups[groups] << { :active_spec => active_spec,
- :current_spec => current_spec,
- :dependency => dependency,
- :groups => groups }
+ next unless gem_outdated || (current_spec.git_version != active_spec.git_version)
+ groups = nil
+ if dependency && !options[:parseable]
+ groups = dependency.groups.join(", ")
end
- Bundler.ui.debug "from #{active_spec.loaded_from}"
+ outdated_gems_list << { :active_spec => active_spec,
+ :current_spec => current_spec,
+ :dependency => dependency,
+ :groups => groups }
+
+ outdated_gems_by_groups[groups] ||= []
+ outdated_gems_by_groups[groups] << { :active_spec => active_spec,
+ :current_spec => current_spec,
+ :dependency => dependency,
+ :groups => groups }
end
if outdated_gems_list.empty?
@@ -195,6 +192,7 @@ module Bundler
def print_gem(current_spec, active_spec, dependency, groups, options_include_groups)
spec_version = "#{active_spec.version}#{active_spec.git_version}"
+ spec_version += " (from #{active_spec.loaded_from})" if Bundler.ui.debug? && active_spec.loaded_from
current_version = "#{current_spec.version}#{current_spec.git_version}"
if dependency && dependency.specific?