diff options
author | Bundlerbot <bot@bundler.io> | 2018-12-01 00:51:33 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2018-12-01 00:51:33 +0000 |
commit | a578c4ee390fadb746252b4bd496f8ee6d90add4 (patch) | |
tree | 2b098adbbca85b9dba134ceb2a132de39900175e | |
parent | addee3dcbf5c00bebecc6f8dcfb2387e2e61e1f4 (diff) | |
parent | 0942a9c8455aab9ada6d1aebf81ca0b4b8d2c579 (diff) | |
download | bundler-a578c4ee390fadb746252b4bd496f8ee6d90add4.tar.gz |
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 <hsbt@ruby-lang.org>
-rw-r--r-- | spec/spec_helper.rb | 12 | ||||
-rw-r--r-- | spec/support/path.rb | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f2ccccc5ef..9355bfb33f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -123,6 +123,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 @@ -147,4 +153,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 cecab45c9b..c28414e083 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 |