diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-18 09:46:25 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-18 09:46:25 +0000 |
commit | 3661d0521fa2cf4cdf9efa51c69cad4ea93fa2b3 (patch) | |
tree | e621c9e7677a26cb85a46f94ebf4f8eeed073695 /spec/bundler/support/helpers.rb | |
parent | 124957566f041e5c6e8f678dfaf62cae381826dc (diff) |
The ruby core applied the difference structure from bundler upstream repository. We need to modify a configuration for test-bundler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/support/helpers.rb')
-rw-r--r-- | spec/bundler/support/helpers.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index 43bf6af229..fbe63a2641 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -313,12 +313,16 @@ module Spec gem_repo = options.fetch(:gem_repo) { gem_repo1 } gems.each do |g| path = if g == :bundler - Dir.chdir(root) { gem_command! :build, gemspec.to_s } - bundler_path = if ruby_core? - root + "lib/bundler-#{Bundler::VERSION}.gem" + 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").to_s } + FileUtils.rm(root.join("bundler.gemspec")) else - root + "bundler-#{Bundler::VERSION}.gem" + Dir.chdir(root) { gem_command! :build, gemspec.to_s } end + bundler_path = root + "bundler-#{Bundler::VERSION}.gem" elsif g.to_s =~ %r{\A/.*\.gem\z} g else |