summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2018-12-01 00:51:33 +0000
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2018-12-11 09:30:39 +0900
commit194c69a5ae213103dcd9d285c5650bdeeac7165c (patch)
treed7f6f6594d540b44784cae1c0cb7abe8c2fbee9a
parentab73067a9b32339669e146dfae619e856b85a799 (diff)
downloadbundler-194c69a5ae213103dcd9d285c5650bdeeac7165c.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> (cherry picked from commit a578c4ee390fadb746252b4bd496f8ee6d90add4) (cherry picked from commit 1871506eeccee2b0b83b0ec0a6eb8f6638f44845)
-rw-r--r--spec/spec_helper.rb12
-rw-r--r--spec/support/path.rb2
2 files changed, 13 insertions, 1 deletions
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