summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-12-24 19:53:47 +0100
committerSamuel Giddins <segiddins@segiddins.me>2016-12-25 14:58:59 -0600
commit743f5d6b35ae0d316d4f41a67b98af595da3d3fb (patch)
treeee2846363575f0f3b4152679cb080d3ddc0929a0
parent8b5bf94f2f7666d4547b7fbe4719f2e840df4914 (diff)
downloadbundler-seg-parallel-extensions.tar.gz
[GemInstaller] Allow installing extensions in parallelseg-parallel-extensions
-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