summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/common.rb')
-rw-r--r--lib/bundler/cli/common.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 5ec541f722..cec7bcadb4 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -14,17 +14,18 @@ module Bundler
Bundler.ui.info msg
end
- def self.output_without_groups_message
+ def self.output_without_groups_message(command)
return if Bundler.settings[:without].empty?
- Bundler.ui.confirm without_groups_message
+ Bundler.ui.confirm without_groups_message(command)
end
- def self.without_groups_message
+ def self.without_groups_message(command)
+ command_in_past_tense = command == :install ? "installed" : "updated"
groups = Bundler.settings[:without]
group_list = [groups[0...-1].join(", "), groups[-1..-1]].
reject {|s| s.to_s.empty? }.join(" and ")
group_str = groups.size == 1 ? "group" : "groups"
- "Gems in the #{group_str} #{group_list} were not installed."
+ "Gems in the #{group_str} #{group_list} were not #{command_in_past_tense}."
end
def self.select_spec(name, regex_match = nil)