aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-13 21:58:27 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-05-14 09:11:28 +0900
commitd4acf254e360096f869f344108ba7ef2ba1f5a92 (patch)
tree1c478f1e45025c0d0e8d7a3b23db993ab68c4dc8
parent65c5a3957877e67bae3bdbf063aac6f257a52ac8 (diff)
downloadruby-d4acf254e360096f869f344108ba7ef2ba1f5a92.tar.gz
Use the gemspec in build_dir directly
-rw-r--r--spec/bundler/support/helpers.rb7
-rw-r--r--spec/bundler/support/path.rb4
2 files changed, 6 insertions, 5 deletions
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index 660a6817fe..b532fdc462 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -328,9 +328,14 @@ module Spec
FileUtils.cp shipped_file, target_shipped_file, :preserve => true
end
+ # for Ruby core repository
+ if File.exist? File.join(build_path, "lib/bundler/bundler.gemspec")
+ FileUtils.mv File.join(build_path, "lib/bundler/bundler.gemspec"), build_path
+ end
+
replace_version_file(version, dir: build_path) # rubocop:disable Style/HashSyntax
- gem_command! "build #{shipped_gemspec}", :dir => build_path
+ gem_command! "build bundler.gemspec", :dir => build_path
yield(bundler_path)
ensure
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index c64f555d90..b851fa389a 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -37,10 +37,6 @@ module Spec
@tracked_files ||= sys_exec(ruby_core? ? "git ls-files -z -- lib/bundler lib/bundler.rb spec/bundler man/bundler*" : "git ls-files -z", :dir => root).split("\x0")
end
- def shipped_gemspec
- @shipped_gemspec ||= ruby_core? ? "lib/bundler/bundler.gemspec" : "bundler.gemspec"
- end
-
def shipped_files
@shipped_files ||= sys_exec(ruby_core? ? "git ls-files -z -- lib/bundler lib/bundler.rb man/bundler* libexec/bundle*" : "git ls-files -z -- lib man exe CHANGELOG.md LICENSE.md README.md bundler.gemspec", :dir => root).split("\x0")
end