summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/installer.rb6
-rw-r--r--lib/bundler/source/rubygems.rb15
2 files changed, 14 insertions, 7 deletions
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 0e72f5a17b..d0a7dc4fda 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -102,13 +102,15 @@ module Bundler
settings = Bundler.settings["build.#{spec.name}"]
messages = nil
+ install_options = { :force => force, :ensure_builtin_gems_cached => standalone }
+
if settings
# Build arguments are global, so this is mutexed
Bundler.rubygems.with_build_args [settings] do
- messages = spec.source.install(spec, force)
+ messages = spec.source.install(spec, install_options)
end
else
- messages = spec.source.install(spec, force)
+ messages = spec.source.install(spec, install_options)
end
install_message, post_install_message, debug_message = *messages
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 1b43d2e11f..b9e3920db0 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -85,15 +85,20 @@ module Bundler
end
end
- def install(spec, force = false)
- if builtin_gem?(spec)
- if builtin_requires_caching = !cached_path(spec)
- cached_built_in_gem(spec)
+ def install(spec, opts = {})
+ force = opts[:force]
+ ensure_builtin_gems_cached = opts[:ensure_builtin_gems_cached]
+
+ if ensure_builtin_gems_cached && builtin_gem?(spec)
+ if !cached_path(spec)
+ cached_built_in_gem(spec) unless spec.remote
+ force = true
else
spec.loaded_from = loaded_from(spec)
end
end
- return ["Using #{version_message(spec)}", nil] if installed_specs[spec].any? && !force && !builtin_requires_caching
+
+ return ["Using #{version_message(spec)}", nil] if installed_specs[spec].any? && !force
# Download the gem to get the spec, because some specs that are returned