From 194c69a5ae213103dcd9d285c5650bdeeac7165c Mon Sep 17 00:00:00 2001 From: Bundlerbot Date: Sat, 1 Dec 2018 00:51:33 +0000 Subject: Merge #6818 6818: Following up ruby core changes. r=hsbt a=hsbt ### What is your fix for the problem, implemented in this PR? These changes enabled to use the same configuration of executables in ruby core repository. * To use libexec instead of bin directory. * Restore exe direcotry for bundler.gemspec while running test suite. ### Why did you choose this fix out of the possible options? The ruby core repository uses `exe` directory for other usage. I chose `libexec` instead of `exe` in ruby core. And, The location of `bundler.gemspec` is not the root of the repository on ruby core. We should restore `libexec` to `exe` under the `lib` dir. see. https://github.com/ruby/ruby/blob/trunk/lib/bundler.gemspec Co-authored-by: SHIBATA Hiroshi (cherry picked from commit a578c4ee390fadb746252b4bd496f8ee6d90add4) (cherry picked from commit 1871506eeccee2b0b83b0ec0a6eb8f6638f44845) --- spec/spec_helper.rb | 12 ++++++++++++ spec/support/path.rb | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 30d3bda130..0646719c4c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -131,6 +131,12 @@ RSpec.configure do |config| Gem.ruby = orig_ruby if ENV["BUNDLE_RUBY"] end + config.before :suite do + if ENV["BUNDLE_RUBY"] + FileUtils.cp_r Spec::Path.bindir, File.join(Spec::Path.root, "lib", "exe") + end + end + config.before :all do build_repo1 end @@ -155,4 +161,10 @@ RSpec.configure do |config| Dir.chdir(original_wd) ENV.replace(original_env) end + + config.after :suite do + if ENV["BUNDLE_RUBY"] + FileUtils.rm_rf File.join(Spec::Path.root, "lib", "exe") + end + end end diff --git a/spec/support/path.rb b/spec/support/path.rb index 2eea088eea..76fa89d3cc 100644 --- a/spec/support/path.rb +++ b/spec/support/path.rb @@ -13,7 +13,7 @@ module Spec end def bindir - @bindir ||= root.join(ruby_core? ? "bin" : "exe") + @bindir ||= root.join(ruby_core? ? "libexec" : "exe") end def spec_dir -- cgit v1.2.1