Skip to content

Commit 0dc86fd

Browse files
deivid-rodriguezhsbt
authored andcommitted
[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. ruby/rubygems@3866d25a00
1 parent 2690d21 commit 0dc86fd

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

spec/bundler/commands/clean_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def should_not_have_gems(*gems)
151151
bundle :clean
152152

153153
digest = Digest(:SHA1).hexdigest(git_path.to_s)
154-
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}")
154+
cache_path = vendored_gems("cache/bundler/git/foo-1.0-#{digest}")
155155
expect(cache_path).to exist
156156
end
157157

spec/bundler/install/gems/compact_index_spec.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,11 +1010,7 @@ def start
10101010
gem "myrack"
10111011
G
10121012

1013-
gem_path = if Bundler.feature_flag.global_gem_cache?
1014-
default_cache_path.dirname.join("cache", "gems", "localgemserver.test.80.dd34752a738ee965a2a4298dc16db6c5", "myrack-1.0.0.gem")
1015-
else
1016-
default_cache_path.dirname.join("myrack-1.0.0.gem")
1017-
end
1013+
gem_path = default_cache_path.dirname.join("myrack-1.0.0.gem")
10181014

10191015
expect(exitstatus).to eq(37)
10201016
expect(err).to eq <<~E.strip

spec/bundler/support/path.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,11 @@ def home(*path)
136136
end
137137

138138
def default_bundle_path(*path)
139-
if Bundler.feature_flag.bundler_4_mode?
140-
local_gem_path(*path)
141-
else
142-
system_gem_path(*path)
143-
end
139+
system_gem_path(*path)
144140
end
145141

146142
def default_cache_path(*path)
147-
if Bundler.feature_flag.global_gem_cache?
148-
home(".bundle/cache", *path)
149-
else
150-
default_bundle_path("cache/bundler", *path)
151-
end
143+
default_bundle_path("cache/bundler", *path)
152144
end
153145

154146
def compact_index_cache_path

0 commit comments

Comments
 (0)