[rubygems/rubygems] Remove unnecessary branching

We now run specs against a single version, so I prefer to keep a single
branch. Once we bump the major version, this will need very little
updates, and that seems fine.

3866d25a00
This commit is contained in:
David Rodríguez 2025-07-24 21:49:35 +02:00 committed by Hiroshi SHIBATA
parent 2690d21067
commit 0dc86fd843
3 changed files with 4 additions and 16 deletions

View file

@ -151,7 +151,7 @@ RSpec.describe "bundle clean" do
bundle :clean
digest = Digest(:SHA1).hexdigest(git_path.to_s)
cache_path = Bundler.feature_flag.global_gem_cache? ? home(".bundle/cache/git/foo-1.0-#{digest}") : vendored_gems("cache/bundler/git/foo-1.0-#{digest}")
cache_path = vendored_gems("cache/bundler/git/foo-1.0-#{digest}")
expect(cache_path).to exist
end

View file

@ -1010,11 +1010,7 @@ RSpec.describe "compact index api" do
gem "myrack"
G
gem_path = if Bundler.feature_flag.global_gem_cache?
default_cache_path.dirname.join("cache", "gems", "localgemserver.test.80.dd34752a738ee965a2a4298dc16db6c5", "myrack-1.0.0.gem")
else
default_cache_path.dirname.join("myrack-1.0.0.gem")
end
gem_path = default_cache_path.dirname.join("myrack-1.0.0.gem")
expect(exitstatus).to eq(37)
expect(err).to eq <<~E.strip

View file

@ -136,19 +136,11 @@ module Spec
end
def default_bundle_path(*path)
if Bundler.feature_flag.bundler_4_mode?
local_gem_path(*path)
else
system_gem_path(*path)
end
system_gem_path(*path)
end
def default_cache_path(*path)
if Bundler.feature_flag.global_gem_cache?
home(".bundle/cache", *path)
else
default_bundle_path("cache/bundler", *path)
end
default_bundle_path("cache/bundler", *path)
end
def compact_index_cache_path