summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/outdated.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index f04c875273..826bcdfe90 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -266,11 +266,7 @@ module Bundler
data.sort_by! {|row| row[0] }
data.each do |row|
- row = row.each_with_index.map do |element, index|
- element.ljust(column_sizes[index])
- end
-
- Bundler.ui.info row.join(" ") + "\n"
+ Bundler.ui.info justify(row, column_sizes)
end
end
@@ -279,5 +275,11 @@ module Bundler
header << "Path" if options[:verbose]
header
end
+
+ def justify(row, sizes)
+ row.each_with_index.map do |element, index|
+ element.ljust(sizes[index])
+ end.join(" ") + "\n"
+ end
end
end