summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-11-28 12:11:34 -0800
committerAndre Arko <andre@arko.net>2014-11-28 14:40:14 -0800
commit65f584777c212b65ec73a3bcea8fd7f813372863 (patch)
treee811d5b563f4985da010fca3b99393d993b86cbf /lib
parentcb367acfbd5e5ff0ac47e45c647eabd1ef8bee7a (diff)
downloadbundler-65f584777c212b65ec73a3bcea8fd7f813372863.tar.gz
Refine completion messages
Now that we’re printing the number of gems requested and installed in the bundle, it seems good to put those on the same line as the message that says “your bundle is complete!”. While we’re updating that message, it seems good to remove “your”, because it’s unclear whose bundle it is anyway. It’s just A Bundle, or The Bundle, which means we don’t need a pronoun or possessive.
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb25
-rw-r--r--lib/bundler/cli/outdated.rb2
-rw-r--r--lib/bundler/cli/update.rb2
3 files changed, 19 insertions, 10 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 70e1cf5f4e..7f3aae15d5 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -80,24 +80,22 @@ module Bundler
Installer.install(Bundler.root, definition, options)
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"] && !Bundler.settings[:frozen]
+ Bundler.ui.confirm "Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}."
+ confirm_without_groups
+
if Bundler.settings[:path]
absolute_path = File.expand_path(Bundler.settings[:path])
relative_path = absolute_path.sub(File.expand_path('.'), '.')
- Bundler.ui.confirm "Your bundle is complete!"
- without_groups_messages
- Bundler.ui.confirm "It was installed into #{relative_path}"
+ Bundler.ui.confirm "Bundled gems are installed into #{relative_path}."
else
- Bundler.ui.confirm "Your bundle is complete!"
- without_groups_messages
Bundler.ui.confirm "Use `bundle show [gemname]` to see where a bundled gem is installed."
end
- Bundler.ui.confirm "#{definition.dependencies.count} dependencies in total, #{definition.specs.count} gems installed."
-
Installer.post_install_messages.to_a.each do |name, msg|
Bundler.ui.confirm "Post-install message from #{name}:"
Bundler.ui.info msg
end
+
Installer.ambiguous_gems.to_a.each do |name, installed_from_uri, *also_found_in_uris|
Bundler.ui.error "Warning: the gem '#{name}' was found in multiple sources."
Bundler.ui.error "Installed from: #{installed_from_uri}"
@@ -136,11 +134,22 @@ module Bundler
"application for all non-root users on this machine.", :wrap => true
end
- def without_groups_messages
+ def confirm_without_groups
if Bundler.settings.without.any?
require "bundler/cli/common"
Bundler.ui.confirm Bundler::CLI::Common.without_groups_message
end
end
+
+ def dependencies_count_for(definition)
+ count = definition.dependencies.count
+ "#{count} Gemfile #{count == 1 ? 'dependency' : 'dependencies'}"
+ end
+
+ def gems_installed_for(definition)
+ count = definition.specs.count
+ "#{count} #{count == 1 ? 'gem' : 'gems'} now installed"
+ end
+
end
end
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 22c2f377b6..c6e0f6ba29 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -70,7 +70,7 @@ module Bundler
end
if out_count.zero?
- Bundler.ui.info "Your bundle is up to date!\n"
+ Bundler.ui.info "Bundle up to date!\n"
else
exit 1
end
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index dd15de9936..c3c7c683c9 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -56,7 +56,7 @@ module Bundler
Bundler::CLI::Clean.new(options).run
end
- Bundler.ui.confirm "Your bundle is updated!"
+ Bundler.ui.confirm "Bundle updated!"
without_groups_messages
end