mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[bundler/bundler] Extract a print_gems
method
https://github.com/bundler/bundler/commit/0d8c8d207e
This commit is contained in:
parent
759930dd11
commit
e1ccaa8782
1 changed files with 13 additions and 16 deletions
|
@ -133,24 +133,10 @@ module Bundler
|
|||
end
|
||||
end
|
||||
|
||||
gems.each do |gem|
|
||||
print_gem(
|
||||
gem[:current_spec],
|
||||
gem[:active_spec],
|
||||
gem[:dependency],
|
||||
groups,
|
||||
)
|
||||
end
|
||||
print_gems(gems)
|
||||
end
|
||||
else
|
||||
outdated_gems_list.each do |gem|
|
||||
print_gem(
|
||||
gem[:current_spec],
|
||||
gem[:active_spec],
|
||||
gem[:dependency],
|
||||
gem[:groups],
|
||||
)
|
||||
end
|
||||
print_gems(outdated_gems_list)
|
||||
end
|
||||
|
||||
exit 1
|
||||
|
@ -193,6 +179,17 @@ module Bundler
|
|||
end
|
||||
end
|
||||
|
||||
def print_gems(gems_list)
|
||||
gems_list.each do |gem|
|
||||
print_gem(
|
||||
gem[:current_spec],
|
||||
gem[:active_spec],
|
||||
gem[:dependency],
|
||||
gem[:groups],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def print_gem(current_spec, active_spec, dependency, 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
|
||||
|
|
Loading…
Add table
Reference in a new issue