From 6ca52090ed7e3d85d15ddd2093745512e055803f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 3 Jun 2025 08:43:18 +0900 Subject: [PATCH] Remove hardcoded version of rake from Bundler tests The original commit is https://github.com/rubygems/rubygems/commit/85f73e42a563ac6848ba22aeae344a5bdc5a9ed7 --- spec/bundler/support/builders.rb | 4 ---- spec/bundler/support/path.rb | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb index 4d713d8708..a0a9d348ab 100644 --- a/spec/bundler/support/builders.rb +++ b/spec/bundler/support/builders.rb @@ -22,10 +22,6 @@ module Spec Gem::Platform.new(platform) end - def rake_version - "13.2.1" - end - def build_repo1 build_repo gem_repo1 do FileUtils.cp rake_path, "#{gem_repo1}/gems/" diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb index b26e77d376..5807624ba9 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -280,6 +280,10 @@ module Spec Dir["#{base_system_gems}/#{Bundler.ruby_scope}/**/rake*.gem"].first end + def rake_version + File.basename(rake_path).delete_prefix("rake-").delete_suffix(".gem") + end + private def git_ls_files(glob)