aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-18 09:54:56 -0700
committerAndre Arko <andre@arko.net>2010-04-23 09:58:07 -0700
commit4673e128c8b1ba68deaec57f956286b420f267ff (patch)
tree93d35dc0439e0f9be04eac3f871d378174495f05 /lib
parented2518a90e759ac460f443e35168a189cd060188 (diff)
downloadbundler-4673e128c8b1ba68deaec57f956286b420f267ff.tar.gz
Improve install/lock messaging
Closes #284
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli.rb10
-rw-r--r--lib/bundler/installer.rb2
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 7cfeef56..00cb4796 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -84,6 +84,8 @@ module Bundler
Installer.install(Bundler.root, Bundler.definition, opts)
cache if Bundler.root.join("vendor/cache").exist?
+ Bundler.ui.confirm "Your bundle is complete! " +
+ "Use `bundle show [gemname]` to see where a bundled gem is installed."
rescue GemNotFound => e
if Bundler.definition.sources.empty?
Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :gemcutter'"
@@ -94,11 +96,13 @@ module Bundler
desc "lock", "Locks the bundle to the current set of dependencies, including all child dependencies."
def lock
if locked?
- Bundler.ui.info("The bundle is already locked, relocking.")
+ Bundler.ui.info("Your bundle is already locked, relocking.")
remove_lockfiles
end
Bundler.runtime.lock
+ Bundler.ui.confirm("Your bundle is now locked. " +
+ "Use `bundle show [gemname]` to list the gems in the environment.")
rescue GemNotFound, VersionConflict => e
Bundler.ui.error(e.message)
Bundler.ui.warn "Run `bundle install` to install missing gems."
@@ -109,9 +113,9 @@ module Bundler
def unlock
if locked?
remove_lockfiles
- Bundler.ui.info("The bundle is now unlocked. The dependencies may be changed.")
+ Bundler.ui.info("Your bundle is now unlocked. The dependencies may be changed.")
else
- Bundler.ui.info("The bundle is not currently locked.")
+ Bundler.ui.info("Your bundle is not currently locked.")
end
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index bfd41487..f7d7c0f7 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -37,8 +37,6 @@ module Bundler
end
lock
-
- Bundler.ui.confirm "Your bundle is complete! Use `bundle show gemname` to see where a bundled gem is installed."
end
private