diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/source/git.rb | 7 | ||||
-rw-r--r-- | lib/bundler/source/path.rb | 13 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index d1757a4a93..30ff27c446 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -161,7 +161,9 @@ module Bundler local_specs end - def install(spec, force = false) + def install(spec, options = {}) + force = options[:force] + Bundler.ui.info "Using #{version_message(spec)} from #{self}" if requires_checkout? && !@copied && !force @@ -170,7 +172,8 @@ module Bundler serialize_gemspecs_in(install_path) @copied = true end - generate_bin(spec, !Bundler.rubygems.spec_missing_extensions?(spec)) + generate_bin_options = { :disable_extensions => !Bundler.rubygems.spec_missing_extensions?(spec), :build_args => options[:build_args] } + generate_bin(spec, generate_bin_options) requires_checkout? ? spec.post_install_message : nil end diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index 87a490446c..4661a6d068 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -71,9 +71,9 @@ module Bundler File.basename(expanded_path.to_s) end - def install(spec, force = false) + def install(spec, options = {}) Bundler.ui.info "Using #{version_message(spec)} from #{self}" - generate_bin(spec, :disable_extensions) + generate_bin(spec, :disable_extensions => true) nil # no post-install message end @@ -193,7 +193,7 @@ module Bundler path end - def generate_bin(spec, disable_extensions = false) + def generate_bin(spec, options = {}) gem_dir = Pathname.new(spec.full_gem_path) # Some gem authors put absolute paths in their gemspec @@ -208,7 +208,12 @@ module Bundler end end.compact - installer = Path::Installer.new(spec, :env_shebang => false, :disable_extensions => disable_extensions) + installer = Path::Installer.new( + spec, + :env_shebang => false, + :disable_extensions => options[:disable_extensions], + :build_args => options[:build_args] + ) installer.post_install rescue Gem::InvalidSpecificationException => e Bundler.ui.warn "\n#{spec.name} at #{spec.full_gem_path} did not have a valid gemspec.\n" \ |