summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-07-21 14:21:56 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-07-23 12:51:36 -0500
commitdcd9963876f1405a19671a6bd34d42a6add9e16a (patch)
tree1cfee962063fdf074972211b6f0fe99ae329bf7b /lib/bundler
parent07fedc3f9ee972d5da43f8a77a162bf2c9ca4b1b (diff)
downloadbundler-dcd9963876f1405a19671a6bd34d42a6add9e16a.tar.gz
Update the specs for the default bundle path being ./.bundle
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/cli/clean.rb9
-rw-r--r--lib/bundler/cli/install.rb2
-rw-r--r--lib/bundler/settings.rb2
-rw-r--r--lib/bundler/source/git.rb4
4 files changed, 8 insertions, 9 deletions
diff --git a/lib/bundler/cli/clean.rb b/lib/bundler/cli/clean.rb
index 71b2969192..4a407fbae7 100644
--- a/lib/bundler/cli/clean.rb
+++ b/lib/bundler/cli/clean.rb
@@ -16,11 +16,10 @@ module Bundler
protected
def require_path_or_force
- if Bundler.use_system_gems? && !options[:force]
- raise InvalidOption, "Cleaning all the gems on your system is dangerous! " \
- "If you're sure you want to remove every system gem not in this " \
- "bundle, run `bundle clean --force`."
- end
+ return unless Bundler.use_system_gems? && !options[:force]
+ raise InvalidOption, "Cleaning all the gems on your system is dangerous! " \
+ "If you're sure you want to remove every system gem not in this " \
+ "bundle, run `bundle clean --force`."
end
end
end
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 53db0026f8..771ff6f5dc 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -196,6 +196,8 @@ module Bundler
Bundler.settings.set_command_option :without, options[:without] - options[:with]
Bundler.settings.set_command_option :with, options[:with]
end
+
+ options[:force] = options[:redownload]
end
def warn_ambiguous_gems
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 78dcf89160..ffdac1f979 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -236,7 +236,7 @@ module Bundler
def base_path
path = explicit_path
- path ||= ".bundle" if default_install_uses_path
+ path ||= ".bundle" unless use_system_gems?
path ||= Bundler.rubygems.gem_dir
path
end
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 020cf74766..eb605771f4 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -172,13 +172,11 @@ module Bundler
print_using_message "Using #{version_message(spec)} from #{self}"
- if requires_checkout? && !@copied && !force
+ if (requires_checkout? && !@copied) || force
Bundler.ui.debug " * Checking out revision: #{ref}"
git_proxy.copy_to(install_path, submodules)
serialize_gemspecs_in(install_path)
@copied = true
- elsif force
- git_proxy.copy_to(install_path, submodules)
end
generate_bin_options = { :disable_extensions => !Bundler.rubygems.spec_missing_extensions?(spec), :build_args => options[:build_args] }