Skip to content

Commit 95fdaa5

Browse files
deivid-rodriguezhsbt
authored andcommitted
(Temporarily?) delay path changes and global cache changes
There are several issues with these which I'm not sure I'll have time to address properly. I prefer to keep our default branch in a releasable state just in case. Once they are fixed, this can be reverted.
1 parent 48a79cd commit 95fdaa5

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

lib/bundler/cli/common.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def self.patch_level_options(options)
130130
def self.clean_after_install?
131131
clean = Bundler.settings[:clean]
132132
return clean unless clean.nil?
133-
clean ||= Bundler.feature_flag.bundler_4_mode? && Bundler.settings[:path].nil?
133+
clean ||= Bundler.feature_flag.bundler_5_mode? && Bundler.settings[:path].nil?
134134
clean &&= !Bundler.use_system_gems?
135135
clean
136136
end

lib/bundler/feature_flag.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def self.settings_method(name, key, &default)
3030
settings_flag(:allow_offline_install) { bundler_4_mode? }
3131
settings_flag(:cache_all) { bundler_4_mode? }
3232
settings_flag(:forget_cli_options) { bundler_4_mode? }
33-
settings_flag(:global_gem_cache) { bundler_4_mode? }
33+
settings_flag(:global_gem_cache) { bundler_5_mode? }
3434
settings_flag(:lockfile_checksums) { bundler_4_mode? }
3535
settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
3636
settings_flag(:update_requires_all_flag) { bundler_5_mode? }

lib/bundler/settings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def path
272272
def use_system_gems?
273273
return true if system_path
274274
return false if explicit_path
275-
!Bundler.feature_flag.bundler_4_mode?
275+
!Bundler.feature_flag.bundler_5_mode?
276276
end
277277

278278
def base_path

spec/bundler/commands/clean_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def should_not_have_gems(*gems)
427427
should_not_have_gems "foo-1.0"
428428
end
429429

430-
it "automatically cleans when path has not been set", bundler: "4" do
430+
it "automatically cleans when path has not been set", bundler: "5" do
431431
build_repo2
432432

433433
install_gemfile <<-G

spec/bundler/commands/install_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
expect(bundled_app(".bundle")).not_to exist
3939
end
4040

41+
it "will create a ./.bundle by default", bundler: "5" do
42+
install_gemfile <<-G
43+
source "https://gem.repo1"
44+
gem "myrack"
45+
G
46+
47+
expect(bundled_app(".bundle")).to exist
48+
end
49+
4150
it "does not create ./.bundle by default when installing to system gems" do
4251
install_gemfile <<-G, env: { "BUNDLE_PATH__SYSTEM" => "true" }
4352
source "https://gem.repo1"

spec/bundler/support/filters.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def inspect
3232

3333
config.filter_run_when_matching :focus unless ENV["CI"]
3434

35-
config.before(:each, bundler: "4") do
36-
bundle "config simulate_version 4"
35+
config.before(:each, :bundler) do |example|
36+
bundle "config simulate_version #{example.metadata[:bundler]}"
3737
end
3838
end

0 commit comments

Comments
 (0)