From 6f4eaa100f3b1afd0edf99a7f7fa09a17732ff54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Fri, 30 May 2025 12:07:59 +0200 Subject: [PATCH] Remove hardcoded version of rake from Bundler tests Let them run against the version resolved by the `test_gems.rb` gemfile. This should fix ruby-core CI job that was broken by the release of rake 13.3.0. --- spec/bundler/commands/check_spec.rb | 4 ++-- spec/bundler/support/builders.rb | 4 ---- spec/bundler/support/path.rb | 4 ++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb index fe47d54cb6..150ee62878 100644 --- a/spec/bundler/commands/check_spec.rb +++ b/spec/bundler/commands/check_spec.rb @@ -57,7 +57,7 @@ RSpec.describe "bundle check" do bundle :check, raise_on_error: false expect(err).to include("The following gems are missing") - expect(err).to include(" * rake (13.3.0)") + expect(err).to include(" * rake (#{rake_version})") expect(err).to include(" * actionpack (2.3.2)") expect(err).to include(" * activerecord (2.3.2)") expect(err).to include(" * actionmailer (2.3.2)") @@ -76,7 +76,7 @@ RSpec.describe "bundle check" do expect(exitstatus).to be > 0 expect(err).to include("The following gems are missing") expect(err).to include(" * rails (2.3.2)") - expect(err).to include(" * rake (13.3.0)") + expect(err).to include(" * rake (#{rake_version})") expect(err).to include(" * actionpack (2.3.2)") expect(err).to include(" * activerecord (2.3.2)") expect(err).to include(" * actionmailer (2.3.2)") diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb index a4f2ecbdf1..e94ca5bfc5 100644 --- a/spec/bundler/support/builders.rb +++ b/spec/bundler/support/builders.rb @@ -24,10 +24,6 @@ module Spec Gem::Platform.new(platform) end - def rake_version - "13.3.0" - 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 6f7ee589c2..b08a68f111 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -284,6 +284,10 @@ module Spec Dir["#{base_system_gems}/*/*/**/rake*.gem"].first end + def rake_version + File.basename(rake_path).delete_prefix("rake-").delete_suffix(".gem") + end + def sinatra_dependency_paths deps = %w[ mustermann