diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-03-09 21:00:37 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-03-11 12:12:04 +0100 |
commit | 68c938fac65958fb3ba7e29d20001add97022477 (patch) | |
tree | eec2e4f80efee687d737a294a3ee0455d6d718e3 | |
parent | 140b5de76f2e23fc44333d55efb689ad27a81828 (diff) | |
download | bundler-68c938fac65958fb3ba7e29d20001add97022477.tar.gz |
Build local bundler on a "thread-safe folder"thread_safe_local_bundler
-rw-r--r-- | spec/support/helpers.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index dde8daaf6f..db5177f628 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -299,12 +299,17 @@ module Spec end def with_built_bundler + bundler_path = tmp + "bundler-#{Bundler::VERSION}.gem" + with_root_gemspec do |gemspec| - gem_command! "build #{gemspec}", :dir => root + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.0.0") + gem_command! "build #{gemspec} --output #{bundler_path}", :dir => root + else + gem_command! "build #{gemspec}", :dir => root + FileUtils.mv root + File.basename(bundler_path), bundler_path + end end - bundler_path = root + "bundler-#{Bundler::VERSION}.gem" - begin yield(bundler_path) ensure |