summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/outdated.rb
diff options
context:
space:
mode:
authorGuillermo Guerrero <wolf.fox1985@gmail.com>2019-03-23 11:10:40 +0100
committerGuillermo Guerrero <wolf.fox1985@gmail.com>2019-04-28 18:00:04 +0200
commit2bbc83284b7ef27496804cb1669ff8dace78c36f (patch)
tree1c639819efe8587d09821429926064d2489ae345 /lib/bundler/cli/outdated.rb
parentb7de89fa8c1e39251051d26298a902c2630b2e2b (diff)
downloadbundler-2bbc83284b7ef27496804cb1669ff8dace78c36f.tar.gz
Small fix with plural.
Fixed rubocop. Refactors. Rollback style.
Diffstat (limited to 'lib/bundler/cli/outdated.rb')
-rw-r--r--lib/bundler/cli/outdated.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 3a0521de1e..857caf0a03 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -133,7 +133,7 @@ module Bundler
unless options[:parseable]
if groups
- Bundler.ui.info "===== Group #{groups} ====="
+ Bundler.ui.info "===== #{groups_text("Group", groups)} ====="
else
Bundler.ui.info "===== Without group ====="
end
@@ -167,6 +167,10 @@ module Bundler
private
+ def groups_text(group_text, groups)
+ "#{group_text}#{groups.split(",").size > 1 ? "s" : ""} \"#{groups}\""
+ end
+
def retrieve_active_spec(strict, definition, current_spec)
if strict
active_spec = definition.find_resolved_spec(current_spec)
@@ -212,7 +216,7 @@ module Bundler
elsif options_include_groups || !groups
" * #{spec_outdated_info}"
else
- " * #{spec_outdated_info} in groups \"#{groups}\""
+ " * #{spec_outdated_info} in #{groups_text("group", groups)}"
end
Bundler.ui.info output_message.rstrip