Skip to content

Commit 9e56614

Browse files
deivid-rodriguezhsbt
authored andcommitted
[rubygems/rubygems] Remove "double CI" for testing Bundler 4 mode
Since now every functionality that changes in Bundler 4 is under a setting, we can enable that setting to test the new functionality, without having to run our full CI twice. This can actually be seen as increasing coverage, because Bundler 4 functionality will now be tested on Windows, MacOS, or any other environment where previously "Bundler 4 mode" was not running. rubygems/rubygems@1cb3e009fc
1 parent 0761af2 commit 9e56614

40 files changed

+131
-152
lines changed

lib/bundler/feature_flag.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def deprecated_major?(target_major_version)
5050
@major_version >= target_major_version
5151
end
5252

53-
attr_reader :bundler_version
54-
5553
def initialize(bundler_version)
5654
@bundler_version = Gem::Version.create(bundler_version)
5755
@major_version = @bundler_version.segments.first

spec/bundler/bundler/cli_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def out_with_macos_man_workaround
250250
end
251251

252252
RSpec.describe "bundler executable" do
253-
it "shows the bundler version just as the `bundle` executable does", bundler: "2" do
253+
it "shows the bundler version just as the `bundle` executable does" do
254254
bundler "--version"
255255
expect(out).to eq("Bundler version #{Bundler::VERSION}")
256256
end

spec/bundler/bundler/current_ruby_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@
139139
end
140140

141141
describe "Deprecated platform" do
142-
it "Outputs a deprecation warning when calling maglev?", bundler: "2" do
142+
it "Outputs a deprecation warning when calling maglev?" do
143143
expect(Bundler.ui).to receive(:warn).with(/`CurrentRuby#maglev\?` is deprecated with no replacement./)
144144

145145
Bundler.current_ruby.maglev?
146146
end
147147

148-
it "Outputs a deprecation warning when calling maglev_31?", bundler: "2" do
148+
it "Outputs a deprecation warning when calling maglev_31?" do
149149
expect(Bundler.ui).to receive(:warn).with(/`CurrentRuby#maglev_31\?` is deprecated with no replacement./)
150150

151151
Bundler.current_ruby.maglev_31?

spec/bundler/bundler/dsl_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
)
104104
end
105105

106-
context "default hosts", bundler: "2" do
106+
context "default hosts" do
107107
it "converts :github to URI using https" do
108108
subject.gem("sparks", github: "indirect/sparks")
109109
github_uri = "https://github.com/indirect/sparks.git"

spec/bundler/bundler/settings_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
C
334334

335335
expect(Bundler.ui).not_to receive(:warn)
336-
expect(settings.all).to eq(simulated_version ? ["simulate_version"] : [])
336+
expect(settings.all).to be_empty
337337
end
338338

339339
it "converts older keys with dashes" do

spec/bundler/cache/path_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
expect(bundled_app("vendor/cache/foo-1.0")).not_to exist
9898
end
9999

100-
it "does not cache path gems by default", bundler: "2" do
100+
it "does not cache path gems by default" do
101101
build_lib "foo"
102102

103103
install_gemfile <<-G

spec/bundler/commands/binstubs_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
expect(bundled_app("exec/myrackup")).to exist
169169
end
170170

171-
it "setting is saved for bundle install", bundler: "2" do
171+
it "setting is saved for bundle install" do
172172
install_gemfile <<-G
173173
source "https://gem.repo1"
174174
gem "myrack"

spec/bundler/commands/cache_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
end
159159
end
160160

161-
context "with --path", bundler: "2" do
161+
context "with --path" do
162162
it "sets root directory for gems" do
163163
gemfile <<-D
164164
source "https://gem.repo1"
@@ -221,7 +221,7 @@
221221
expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).to exist
222222
end
223223

224-
it "puts the gems in vendor/cache even for legacy windows rubies, but prints a warning", bundler: "2" do
224+
it "puts the gems in vendor/cache even for legacy windows rubies, but prints a warning" do
225225
gemfile <<-D
226226
source "https://gem.repo1"
227227
gem 'myrack', :platforms => [:ruby_20, :x64_mingw_20]

spec/bundler/commands/check_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
expect(err).to include("Bundler can't satisfy your Gemfile's dependencies.")
124124
end
125125

126-
it "remembers --without option from install", bundler: "2" do
126+
it "remembers --without option from install" do
127127
gemfile <<-G
128128
source "https://gem.repo1"
129129
group :foo do
@@ -272,7 +272,7 @@
272272
expect(last_command).to be_failure
273273
end
274274

275-
context "--path", bundler: "2" do
275+
context "--path" do
276276
context "after installing gems in the proper directory" do
277277
before do
278278
gemfile <<-G

spec/bundler/commands/clean_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def should_not_have_gems(*gems)
383383
expect(out).to include("myrack (1.0.0)").and include("thin (1.0)")
384384
end
385385

386-
it "--clean should override the bundle setting on install", bundler: "2" do
386+
it "--clean should override the bundle setting on install" do
387387
gemfile <<-G
388388
source "https://gem.repo1"
389389
@@ -405,7 +405,7 @@ def should_not_have_gems(*gems)
405405
should_not_have_gems "thin-1.0"
406406
end
407407

408-
it "--clean should override the bundle setting on update", bundler: "2" do
408+
it "--clean should override the bundle setting on update" do
409409
build_repo2
410410

411411
gemfile <<-G

0 commit comments

Comments
 (0)