aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/support/helpers.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-15 18:53:51 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 17:08:51 +0900
commit09455301ef81bc6207e6d3ba1034c35851575e18 (patch)
tree07f53ec69dc470f49b0386713d726b4f1e647c24 /spec/bundler/support/helpers.rb
parent20c5154f0b79faf83c9c889f12da7da1ba9d6eb1 (diff)
downloadruby-09455301ef81bc6207e6d3ba1034c35851575e18.tar.gz
[bundler/bundler] Extract a `with_root_gemspec` helper
https://github.com/bundler/bundler/commit/f20c2bdf6a
Diffstat (limited to 'spec/bundler/support/helpers.rb')
-rw-r--r--spec/bundler/support/helpers.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index 058c7a893d..6f982b4f4c 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -298,13 +298,7 @@ module Spec
gem_repo = options.fetch(:gem_repo) { gem_repo1 }
gems.each do |g|
path = if g == :bundler
- if ruby_core?
- spec = Gem::Specification.load(gemspec.to_s)
- spec.bindir = "libexec"
- File.open(root.join("bundler.gemspec").to_s, "w") {|f| f.write spec.to_ruby }
- Dir.chdir(root) { gem_command! :build, root.join("bundler.gemspec") }
- FileUtils.rm(root.join("bundler.gemspec"))
- else
+ with_root_gemspec do |gemspec|
Dir.chdir(root) { gem_command! :build, gemspec }
end
bundler_path = root.join("bundler-#{Bundler::VERSION}.gem")