Skip to content

Commit 29d8a50

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Keep legacy windows platform, not removed them
ruby/rubygems@f360af8e3b
1 parent e15b4e1 commit 29d8a50

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/bundler/dsl.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ def normalize_options(name, version, opts)
427427
windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
428428
if windows_platforms.any?
429429
windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
430-
removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
431-
Bundler::SharedHelpers.feature_removed! removed_message
430+
deprecated_message = "Platform #{windows_platforms} will be removed in the future. Please use platform :windows instead."
431+
Bundler::SharedHelpers.feature_deprecated! deprecated_message
432432
end
433433

434434
# Save sources passed in a key

spec/bundler/bundler/dsl_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@
221221
to raise_error(Bundler::GemfileError, /is not a valid platform/)
222222
end
223223

224-
it "raises an error for legacy windows platforms" do
225-
expect(Bundler::SharedHelpers).to receive(:feature_removed!).with(/\APlatform :mswin, :x64_mingw has been removed/)
224+
it "warn for legacy windows platforms" do
225+
expect(Bundler::SharedHelpers).to receive(:feature_deprecated!).with(/\APlatform :mswin, :x64_mingw will be removed in the future./)
226226
subject.gem("foo", platforms: [:mswin, :jruby, :x64_mingw])
227227
end
228228

@@ -291,8 +291,8 @@
291291
end
292292

293293
describe "#platforms" do
294-
it "raises an error for legacy windows platforms" do
295-
expect(Bundler::SharedHelpers).to receive(:feature_removed!).with(/\APlatform :mswin64, :mingw has been removed/)
294+
it "warn for legacy windows platforms" do
295+
expect(Bundler::SharedHelpers).to receive(:feature_deprecated!).with(/\APlatform :mswin64, :mingw will be removed in the future./)
296296
subject.platforms(:mswin64, :jruby, :mingw) do
297297
subject.gem("foo")
298298
end

spec/bundler/commands/cache_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@
207207
expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).to exist
208208
end
209209

210-
it "prints an error when using legacy windows rubies" do
210+
it "prints a warn when using legacy windows rubies" do
211211
gemfile <<-D
212212
source "https://gem.repo1"
213213
gem 'myrack', :platforms => [:ruby_20, :x64_mingw_20]
214214
D
215215

216216
bundle "cache --all-platforms", raise_on_error: false
217-
expect(err).to include("removed")
218-
expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).not_to exist
217+
expect(err).to include("will be removed in the future")
218+
expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).to exist
219219
end
220220

221221
it "does not attempt to install gems in without groups" do

0 commit comments

Comments
 (0)