lib/bundler/cli.rb in bundler-1.0.2 vs lib/bundler/cli.rb in bundler-1.0.3
- old
+ new
@@ -154,11 +154,15 @@
method_option "production", :type => :boolean, :banner =>
"Deprecated, please use --deployment instead"
def install(path = nil)
opts = options.dup
opts[:without] ||= []
- opts[:without].map! { |g| g.to_sym }
+ if opts[:without].size == 1
+ opts[:without].map!{|g| g.split(" ") }
+ opts[:without].flatten!
+ end
+ opts[:without].map!{|g| g.to_sym }
ENV['BUNDLE_GEMFILE'] = File.expand_path(opts[:gemfile]) if opts[:gemfile]
if opts[:production]
@@ -188,22 +192,22 @@
"your `Gemfile`."
exit 1
end
if opts[:deployment] || opts[:frozen]
- Bundler.settings[:frozen] = '1'
-
unless Bundler.default_lockfile.exist?
flag = opts[:deployment] ? '--deployment' : '--frozen'
raise ProductionError, "The #{flag} flag requires a Gemfile.lock. Please make " \
"sure you have checked your Gemfile.lock into version control " \
"before deploying."
end
if Bundler.root.join("vendor/cache").exist?
opts[:local] = true
end
+
+ Bundler.settings[:frozen] = '1'
end
# Can't use Bundler.settings for this because settings needs gemfile.dirname
Bundler.settings[:path] = nil if opts[:system]
Bundler.settings[:path] = "vendor/bundle" if opts[:deployment]
@@ -214,21 +218,32 @@
Bundler.settings.without = opts[:without] unless opts[:without].empty?
Bundler.ui.be_quiet! if opts[:quiet]
Installer.install(Bundler.root, Bundler.definition, opts)
Bundler.load.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."
- Bundler.ui.confirm "\nYour bundle was installed to `#{Bundler.settings[:path]}`" if Bundler.settings[:path]
+ if Bundler.settings[:path]
+ relative_path = Bundler.settings[:path]
+ relative_path = "./" + relative_path unless relative_path[0] == ?/
+ Bundler.ui.confirm "Your bundle is complete! " +
+ "It was installed into #{relative_path}"
+ else
+ Bundler.ui.confirm "Your bundle is complete! " +
+ "Use `bundle show [gemname]` to see where a bundled gem is installed."
+ end
if path
- Bundler.ui.warn "\nIf you meant to install it to your system, please remove the\n" \
- "`#{path}` directory and run `bundle install --system`"
+ Bundler.ui.warn "The path argument to `bundle install` is deprecated. " +
+ "It will be removed in version 1.1. " +
+ "Please use `bundle install --path #{path}` instead."
end
rescue GemNotFound => e
+ if opts[:local]
+ Bundler.ui.warn "Some gems seem to be missing from your vendor/cache directory."
+ end
+
if Bundler.definition.no_sources?
- Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :gemcutter'"
+ Bundler.ui.warn "Your Gemfile doesn't have any sources. You can add one with a line like 'source :rubygems'"
end
raise e
end
desc "update", "update the current environment"