From dba2a0b62a86dc3ac5bb358c525777208199f330 Mon Sep 17 00:00:00 2001 From: Todd Lynam Date: Thu, 27 Oct 2016 21:12:38 -0700 Subject: Improve readability of outdated --- lib/bundler/cli.rb | 1 + lib/bundler/cli/outdated.rb | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'lib') diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 0083f7e7de..c3dc691c11 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -407,6 +407,7 @@ module Bundler "Use minimal formatting for more parseable output" method_option "only-explicit", :type => :boolean, :banner => "Only list gems specified in your Gemfile, not their dependencies" + method_option "pretty", :type => :boolean, :banner => "Use pretty formatting" def outdated(*gems) require_relative "cli/outdated" Outdated.new(options, gems).run diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index ae40d05021..b5b3356f86 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -111,6 +111,21 @@ module Bundler print_gems(gems) end + elsif options[:pretty] + header = ["Gem Name", "Installed", "New", "Requested", "Groups"] + header << "Load Path" if options[:verbose] + + outdated_gems_list.map! do |gem| + current_version = "#{gem[:current_spec].version}#{gem[:current_spec].git_version}" + spec_version = "#{gem[:active_spec].version}#{gem[:active_spec].git_version}" + dependency = gem[:dependency].requirement if gem[:dependency] && gem[:dependency].specific? + + ret_val = [gem[:active_spec].name, current_version, spec_version, dependency.to_s, gem[:groups].to_s] + ret_val << gem[:active_spec].loaded_from if options[:verbose] + ret_val + end + + print_indented header, *outdated_gems_list else print_gems(outdated_gems_list) end @@ -253,5 +268,23 @@ module Bundler version_section = spec.version.segments[version_portion_index, 1] version_section.to_a[0].to_i end + + def print_indented(*data) + columns = data.first.size + + column_sizes = Array.new(columns) do |index| + data.max_by {|row| row[index].to_s.length }[index].length + end + + data.sort_by! {|row| row[0] } + + data.each do |row| + row = row.each_with_index.map do |element, index| + element.to_s.ljust(column_sizes[index]) + end + + Bundler.ui.info row.join(" ") + "\n" + end + end end end -- cgit v1.2.1 From c004288901687775f68545e3f01750851d5707b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 30 Sep 2019 18:19:56 +0200 Subject: Extract table header to a method --- lib/bundler/cli/outdated.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index b5b3356f86..9da8fc8f1d 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -112,9 +112,6 @@ module Bundler print_gems(gems) end elsif options[:pretty] - header = ["Gem Name", "Installed", "New", "Requested", "Groups"] - header << "Load Path" if options[:verbose] - outdated_gems_list.map! do |gem| current_version = "#{gem[:current_spec].version}#{gem[:current_spec].git_version}" spec_version = "#{gem[:active_spec].version}#{gem[:active_spec].git_version}" @@ -125,7 +122,7 @@ module Bundler ret_val end - print_indented header, *outdated_gems_list + print_indented table_header, *outdated_gems_list else print_gems(outdated_gems_list) end @@ -286,5 +283,11 @@ module Bundler Bundler.ui.info row.join(" ") + "\n" end end + + def table_header + header = ["Gem Name", "Installed", "New", "Requested", "Groups"] + header << "Load Path" if options[:verbose] + header + end end end -- cgit v1.2.1 From cf0ac921e5c2dcfbdeb55155392ca68c10f1fd53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 30 Sep 2019 18:25:27 +0200 Subject: Make hash alignment style more diff-friendly With this, if we rename the hash, we don't have to change the indentation of every entry to keep it consistent. --- lib/bundler/cli/outdated.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 9da8fc8f1d..d69404278a 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -87,10 +87,12 @@ module Bundler groups = dependency.groups.join(", ") end - outdated_gems_list << { :active_spec => active_spec, - :current_spec => current_spec, - :dependency => dependency, - :groups => groups } + outdated_gems_list << { + :active_spec => active_spec, + :current_spec => current_spec, + :dependency => dependency, + :groups => groups, + } end if outdated_gems_list.empty? -- cgit v1.2.1 From 3742b33af58a3619044facbbaa2bd48fb80cfa60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 30 Sep 2019 18:30:35 +0200 Subject: Rename outdated_gems_list The list part doesn't add much and it's very implementation dependent. --- lib/bundler/cli/outdated.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index d69404278a..fc58b6a3db 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -3,7 +3,7 @@ module Bundler class CLI::Outdated attr_reader :options, :gems, :options_include_groups, :filter_options_patch, :sources, :strict - attr_accessor :outdated_gems_list + attr_accessor :outdated_gems def initialize(options, gems) @options = options @@ -12,7 +12,7 @@ module Bundler @filter_options_patch = options.keys & %w[filter-major filter-minor filter-patch] - @outdated_gems_list = [] + @outdated_gems = [] @options_include_groups = [:group, :groups].any? do |v| options.keys.include?(v.to_s) @@ -87,7 +87,7 @@ module Bundler groups = dependency.groups.join(", ") end - outdated_gems_list << { + outdated_gems << { :active_spec => active_spec, :current_spec => current_spec, :dependency => dependency, @@ -95,7 +95,7 @@ module Bundler } end - if outdated_gems_list.empty? + if outdated_gems.empty? display_nothing_outdated_message else unless options[:parseable] @@ -103,7 +103,7 @@ module Bundler end if options_include_groups - outdated_gems_list.group_by {|g| g[:groups] }.sort.each do |groups, gems| + outdated_gems.group_by {|g| g[:groups] }.sort.each do |groups, gems| contains_group = groups.split(", ").include?(options[:group]) next unless options[:groups] || contains_group @@ -114,7 +114,7 @@ module Bundler print_gems(gems) end elsif options[:pretty] - outdated_gems_list.map! do |gem| + outdated_gems.map! do |gem| current_version = "#{gem[:current_spec].version}#{gem[:current_spec].git_version}" spec_version = "#{gem[:active_spec].version}#{gem[:active_spec].git_version}" dependency = gem[:dependency].requirement if gem[:dependency] && gem[:dependency].specific? @@ -124,9 +124,9 @@ module Bundler ret_val end - print_indented table_header, *outdated_gems_list + print_indented table_header, *outdated_gems else - print_gems(outdated_gems_list) + print_gems(outdated_gems) end exit 1 -- cgit v1.2.1 From f6ef1505b3d3f62c6d29d4bc2e71034f9a68efc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 30 Sep 2019 18:44:07 +0200 Subject: Add a bit more space between columns --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index fc58b6a3db..0b17c2b9f3 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -282,7 +282,7 @@ module Bundler element.to_s.ljust(column_sizes[index]) end - Bundler.ui.info row.join(" ") + "\n" + Bundler.ui.info row.join(" ") + "\n" end end -- cgit v1.2.1 From 3ed6cf852871c1caca0a9978b7574cd89ce59364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 27 Sep 2019 12:03:52 +0200 Subject: Change "Gem Name" header to just "Gem" --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 0b17c2b9f3..8d2d32f0c1 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -287,7 +287,7 @@ module Bundler end def table_header - header = ["Gem Name", "Installed", "New", "Requested", "Groups"] + header = ["Gem", "Installed", "New", "Requested", "Groups"] header << "Load Path" if options[:verbose] header end -- cgit v1.2.1 From 17e71ea01291b2f9ee2417c31bbe95efb9602767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 27 Sep 2019 12:20:30 +0200 Subject: Change "New" header to "Latest" The output feels a bit cleaner because there's more space, and the term is more clear in my opinion. --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 8d2d32f0c1..e97501d692 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -287,7 +287,7 @@ module Bundler end def table_header - header = ["Gem", "Installed", "New", "Requested", "Groups"] + header = ["Gem", "Installed", "Latest", "Requested", "Groups"] header << "Load Path" if options[:verbose] header end -- cgit v1.2.1 From 78ae7d9ee81cf43257ff9f8e75c05b00f7c80196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 27 Sep 2019 12:26:20 +0200 Subject: Remove outdated header I don't think it adds much to the output? --- lib/bundler/cli/outdated.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index e97501d692..fd0ec5a3a3 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -98,10 +98,6 @@ module Bundler if outdated_gems.empty? display_nothing_outdated_message else - unless options[:parseable] - Bundler.ui.info(header_outdated_message) - end - if options_include_groups outdated_gems.group_by {|g| g[:groups] }.sort.each do |groups, gems| contains_group = groups.split(", ").include?(options[:group]) @@ -139,14 +135,6 @@ module Bundler "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\"" end - def header_outdated_message - if options[:pre] - "Outdated gems included in the bundle (including pre-releases):" - else - "Outdated gems included in the bundle:" - end - end - def header_group_message(groups) if groups.empty? "===== Without group =====" -- cgit v1.2.1 From fb72186924cf2f1dcbbbe3c88586753debf31352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 16:13:04 +0200 Subject: Change "Load Path" header to just "Path" --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index fd0ec5a3a3..19e596b074 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -276,7 +276,7 @@ module Bundler def table_header header = ["Gem", "Installed", "Latest", "Requested", "Groups"] - header << "Load Path" if options[:verbose] + header << "Path" if options[:verbose] header end end -- cgit v1.2.1 From 5ab4db12e8b943c8bb8ecebc0b043a67e9a5f42a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 16:30:39 +0200 Subject: Change "Installed" column to "Locked" The "Latest" version may also be installed, so I think it's more accurate to use "Locked" here. --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 19e596b074..3c2b47333a 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -275,7 +275,7 @@ module Bundler end def table_header - header = ["Gem", "Installed", "Latest", "Requested", "Groups"] + header = ["Gem", "Locked", "Latest", "Requested", "Groups"] header << "Path" if options[:verbose] header end -- cgit v1.2.1 From 0c9aeb96fb1e263830de65f335f1c091da06a7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 11:07:12 +0200 Subject: Consistenly pass strings to method that prints a table --- lib/bundler/cli/outdated.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 3c2b47333a..f04c875273 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -116,7 +116,7 @@ module Bundler dependency = gem[:dependency].requirement if gem[:dependency] && gem[:dependency].specific? ret_val = [gem[:active_spec].name, current_version, spec_version, dependency.to_s, gem[:groups].to_s] - ret_val << gem[:active_spec].loaded_from if options[:verbose] + ret_val << gem[:active_spec].loaded_from.to_s if options[:verbose] ret_val end @@ -260,14 +260,14 @@ module Bundler columns = data.first.size column_sizes = Array.new(columns) do |index| - data.max_by {|row| row[index].to_s.length }[index].length + data.max_by {|row| row[index].length }[index].length end data.sort_by! {|row| row[0] } data.each do |row| row = row.each_with_index.map do |element, index| - element.to_s.ljust(column_sizes[index]) + element.ljust(column_sizes[index]) end Bundler.ui.info row.join(" ") + "\n" -- cgit v1.2.1 From 95e9bd9651e718b06a6cf468a275db71dd2f8952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 10:58:33 +0200 Subject: Move row justification logic to a method --- lib/bundler/cli/outdated.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1 From 37ae646105e6b08bd0766bf300b74e2f38de4799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 10:58:55 +0200 Subject: Strip row trailing spaces --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 826bcdfe90..152954a4fc 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -279,7 +279,7 @@ module Bundler def justify(row, sizes) row.each_with_index.map do |element, index| element.ljust(sizes[index]) - end.join(" ") + "\n" + end.join(" ").strip + "\n" end end end -- cgit v1.2.1 From eb47767be21e36b8d456c7788155e9cb91e6db85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 12:47:33 +0200 Subject: Remove --pretty option and make it the default --- lib/bundler/cli.rb | 1 - lib/bundler/cli/outdated.rb | 63 ++++++++++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 28 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index c3dc691c11..0083f7e7de 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -407,7 +407,6 @@ module Bundler "Use minimal formatting for more parseable output" method_option "only-explicit", :type => :boolean, :banner => "Only list gems specified in your Gemfile, not their dependencies" - method_option "pretty", :type => :boolean, :banner => "Use pretty formatting" def outdated(*gems) require_relative "cli/outdated" Outdated.new(options, gems).run diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 152954a4fc..926794da9e 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -99,30 +99,24 @@ module Bundler display_nothing_outdated_message else if options_include_groups - outdated_gems.group_by {|g| g[:groups] }.sort.each do |groups, gems| + relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems| contains_group = groups.split(", ").include?(options[:group]) next unless options[:groups] || contains_group - unless options[:parseable] - Bundler.ui.info(header_group_message(groups)) - end + gems + end.compact - print_gems(gems) - end - elsif options[:pretty] - outdated_gems.map! do |gem| - current_version = "#{gem[:current_spec].version}#{gem[:current_spec].git_version}" - spec_version = "#{gem[:active_spec].version}#{gem[:active_spec].git_version}" - dependency = gem[:dependency].requirement if gem[:dependency] && gem[:dependency].specific? - - ret_val = [gem[:active_spec].name, current_version, spec_version, dependency.to_s, gem[:groups].to_s] - ret_val << gem[:active_spec].loaded_from.to_s if options[:verbose] - ret_val + if options[:parseable] + relevant_outdated_gems.each do |gems| + print_gems(gems) + end + else + print_gems_table(relevant_outdated_gems) end - - print_indented table_header, *outdated_gems - else + elsif options[:parseable] print_gems(outdated_gems) + else + print_gems_table(outdated_gems) end exit 1 @@ -135,14 +129,6 @@ module Bundler "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\"" end - def header_group_message(groups) - if groups.empty? - "===== Without group =====" - else - "===== #{groups_text("Group", groups)} =====" - end - end - def nothing_outdated_message if filter_options_patch.any? display = filter_options_patch.map do |o| @@ -186,6 +172,19 @@ module Bundler end end + def print_gems_table(gems_list) + data = gems_list.map do |gem| + gem_column_for( + gem[:current_spec], + gem[:active_spec], + gem[:dependency], + gem[:groups], + ) + end + + print_indented([table_header] + data) + 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 @@ -209,6 +208,16 @@ module Bundler Bundler.ui.info output_message.rstrip end + def gem_column_for(current_spec, active_spec, dependency, groups) + current_version = "#{current_spec.version}#{current_spec.git_version}" + spec_version = "#{active_spec.version}#{active_spec.git_version}" + dependency = dependency.requirement if dependency + + ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s] + ret_val << active_spec.loaded_from.to_s if options[:verbose] + ret_val + end + def check_for_deployment_mode! return unless Bundler.frozen_bundle? suggested_command = if Bundler.settings.locations("frozen")[:global] @@ -256,7 +265,7 @@ module Bundler version_section.to_a[0].to_i end - def print_indented(*data) + def print_indented(data) columns = data.first.size column_sizes = Array.new(columns) do |index| -- cgit v1.2.1 From a65304f0da902cbbad775d0fb46dc939ebb4961d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 11:01:03 +0200 Subject: Don't include table header when ordering --- lib/bundler/cli/outdated.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 926794da9e..242d60b629 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -265,13 +265,16 @@ module Bundler version_section.to_a[0].to_i end - def print_indented(data) - columns = data.first.size + def print_indented(matrix) + header = matrix[0] + data = matrix[1..-1] - column_sizes = Array.new(columns) do |index| - data.max_by {|row| row[index].length }[index].length + column_sizes = Array.new(header.size) do |index| + matrix.max_by {|row| row[index].length }[index].length end + Bundler.ui.info justify(header, column_sizes) + data.sort_by! {|row| row[0] } data.each do |row| -- cgit v1.2.1 From f5ddf680f1bba8bd3720b50829611c1d4ff10fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 12:44:48 +0200 Subject: Inline one method All the other screen output and checks for `--parseable` are doing inline, so let's do it here too. --- lib/bundler/cli/outdated.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 242d60b629..7f66eaae74 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -96,7 +96,9 @@ module Bundler end if outdated_gems.empty? - display_nothing_outdated_message + unless options[:parseable] + Bundler.ui.info(nothing_outdated_message) + end else if options_include_groups relevant_outdated_gems = outdated_gems.group_by {|g| g[:groups] }.sort.flat_map do |groups, gems| @@ -155,12 +157,6 @@ module Bundler active_spec end - def display_nothing_outdated_message - unless options[:parseable] - Bundler.ui.info(nothing_outdated_message) - end - end - def print_gems(gems_list) gems_list.each do |gem| print_gem( -- cgit v1.2.1 From 73ff5d58831161aa73fbe21e8600c509d63bda8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 1 Oct 2019 16:12:48 +0200 Subject: Normalize `bundle outdated --verbose` option handling `--parseable` checks `Bundler.ui.debug?` instead of look at the option directly. --- lib/bundler/cli/outdated.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 7f66eaae74..5599017e98 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -210,7 +210,7 @@ module Bundler dependency = dependency.requirement if dependency ret_val = [active_spec.name, current_version, spec_version, dependency.to_s, groups.to_s] - ret_val << active_spec.loaded_from.to_s if options[:verbose] + ret_val << active_spec.loaded_from.to_s if Bundler.ui.debug? ret_val end @@ -280,7 +280,7 @@ module Bundler def table_header header = ["Gem", "Locked", "Latest", "Requested", "Groups"] - header << "Path" if options[:verbose] + header << "Path" if Bundler.ui.debug? header end -- cgit v1.2.1 From 76b1d8916a0d1204e263a874b4babb757a6de2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sat, 12 Oct 2019 16:53:59 +0200 Subject: Rename "Locked" to "Current" --- lib/bundler/cli/outdated.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 5599017e98..3d4922f8b5 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -279,7 +279,7 @@ module Bundler end def table_header - header = ["Gem", "Locked", "Latest", "Requested", "Groups"] + header = ["Gem", "Current", "Latest", "Requested", "Groups"] header << "Path" if Bundler.ui.debug? header end -- cgit v1.2.1