summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2016-12-27 10:48:25 +0000
committerThe Bundler Bot <bot@bundler.io>2016-12-27 10:48:25 +0000
commit5fef8dcb0eeda222fed881975534ebe8bce388bd (patch)
tree46635976b506008299a07339461d8fd07e7fdec3
parentf90b514adb5ad1cf1a8fa1cda6f692d85db0e26c (diff)
parent743f5d6b35ae0d316d4f41a67b98af595da3d3fb (diff)
downloadbundler-5fef8dcb0eeda222fed881975534ebe8bce388bd.tar.gz
Auto merge of #5279 - bundler:seg-parallel-extensions, r=indirect
[GemInstaller] Allow installing extensions in parallel I believe this closes #4684 \c @lynnco
-rw-r--r--lib/bundler/installer/gem_installer.rb4
-rw-r--r--lib/bundler/rubygems_integration.rb8
-rw-r--r--lib/bundler/source/rubygems.rb1
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb
index 84dee979b5..b6eb221389 100644
--- a/lib/bundler/installer/gem_installer.rb
+++ b/lib/bundler/installer/gem_installer.rb
@@ -52,12 +52,12 @@ module Bundler
end
def install
- spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone)
+ spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => [spec_settings])
end
def install_with_settings
# Build arguments are global, so this is mutexed
- Bundler.rubygems.with_build_args([spec_settings]) { install }
+ Bundler.rubygems.install_with_build_args([spec_settings]) { install }
end
def out_of_space_message
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb
index 8ec9df53e8..391316c749 100644
--- a/lib/bundler/rubygems_integration.rb
+++ b/lib/bundler/rubygems_integration.rb
@@ -253,6 +253,10 @@ module Bundler
end
end
+ def install_with_build_args(args)
+ with_build_args(args) { yield }
+ end
+
def gem_from_path(path, policy = nil)
require "rubygems/format"
Gem::Format.from_file_by_path(path, policy)
@@ -720,6 +724,10 @@ module Bundler
def repository_subdirectories
Gem::REPOSITORY_SUBDIRECTORIES
end
+
+ def install_with_build_args(args)
+ yield
+ end
end
# RubyGems 2.1.0
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 53d3a84fb0..1ff2f6c6ed 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -141,6 +141,7 @@ module Bundler
:ignore_dependencies => true,
:wrappers => true,
:env_shebang => true,
+ :build_args => opts[:build_args],
:bundler_expected_checksum => spec.respond_to?(:checksum) && spec.checksum
).install
end