summaryrefslogtreecommitdiff
path: root/spec/support/builders.rb
diff options
context:
space:
mode:
authorNick LaMuro <nicklamuro@gmail.com>2017-08-07 17:32:58 -0500
committerNick LaMuro <nicklamuro@gmail.com>2017-08-14 16:00:41 -0500
commit4bc46ea111ddd8b124ec0c75a288040dd46416cc (patch)
treef03c18e8bd9dc80015122b281df548535266d7ef /spec/support/builders.rb
parent0d84c9c5156df8f722e91e961a63849b51a4ed11 (diff)
downloadbundler-4bc46ea111ddd8b124ec0c75a288040dd46416cc.tar.gz
Use Bundler::Installer for bundle pristine
Using a combination of Bundler::Installer and Bundler::GemInstaller to install the gems in `bundle pristine` allows the code for making use of bundler config being respected to be reused when installing a gem. Makes use of the compiled Makefile for c-extensions to confirm that the args are passed properly (honestly... a little hacky, but no real other way to do this on older versions of rubygems).
Diffstat (limited to 'spec/support/builders.rb')
-rw-r--r--spec/support/builders.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index df731adf14..b5a567bc17 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -562,10 +562,17 @@ module Spec
write "ext/extconf.rb", <<-RUBY
require "mkmf"
+
# exit 1 unless with_config("simple")
extension_name = "very_simple_binary_c"
- dir_config extension_name
+ if extra_lib_dir = with_config("ext-lib")
+ # add extra libpath if --with-ext-lib is
+ # passed in as a build_arg
+ dir_config extension_name, nil, extra_lib_dir
+ else
+ dir_config extension_name
+ end
create_makefile extension_name
RUBY
write "ext/very_simple_binary.c", <<-C