summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2025-11-20 20:02:29 +0900
committergit <svn-admin@ruby-lang.org>2025-11-20 23:11:47 +0000
commit29d8a50d264be0c9cf1ddfc9fc2ce37724755b38 (patch)
tree12f667ee867e1071a8763c942ee36cf9443244d0
parente15b4e1c56e826655e6fd10e32bdf974edf4b980 (diff)
[ruby/rubygems] Keep legacy windows platform, not removed them
https://github.com/ruby/rubygems/commit/f360af8e3b
-rw-r--r--lib/bundler/dsl.rb4
-rw-r--r--spec/bundler/bundler/dsl_spec.rb8
-rw-r--r--spec/bundler/commands/cache_spec.rb6
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index 13e0783a43..6f06c4e918 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -427,8 +427,8 @@ module Bundler
windows_platforms = platforms.select {|pl| pl.to_s.match?(/mingw|mswin/) }
if windows_platforms.any?
windows_platforms = windows_platforms.map! {|pl| ":#{pl}" }.join(", ")
- removed_message = "Platform #{windows_platforms} has been removed. Please use platform :windows instead."
- Bundler::SharedHelpers.feature_removed! removed_message
+ deprecated_message = "Platform #{windows_platforms} will be removed in the future. Please use platform :windows instead."
+ Bundler::SharedHelpers.feature_deprecated! deprecated_message
end
# Save sources passed in a key
diff --git a/spec/bundler/bundler/dsl_spec.rb b/spec/bundler/bundler/dsl_spec.rb
index 286dfa7115..a19f251be5 100644
--- a/spec/bundler/bundler/dsl_spec.rb
+++ b/spec/bundler/bundler/dsl_spec.rb
@@ -221,8 +221,8 @@ RSpec.describe Bundler::Dsl do
to raise_error(Bundler::GemfileError, /is not a valid platform/)
end
- it "raises an error for legacy windows platforms" do
- expect(Bundler::SharedHelpers).to receive(:feature_removed!).with(/\APlatform :mswin, :x64_mingw has been removed/)
+ it "warn for legacy windows platforms" do
+ expect(Bundler::SharedHelpers).to receive(:feature_deprecated!).with(/\APlatform :mswin, :x64_mingw will be removed in the future./)
subject.gem("foo", platforms: [:mswin, :jruby, :x64_mingw])
end
@@ -291,8 +291,8 @@ RSpec.describe Bundler::Dsl do
end
describe "#platforms" do
- it "raises an error for legacy windows platforms" do
- expect(Bundler::SharedHelpers).to receive(:feature_removed!).with(/\APlatform :mswin64, :mingw has been removed/)
+ it "warn for legacy windows platforms" do
+ expect(Bundler::SharedHelpers).to receive(:feature_deprecated!).with(/\APlatform :mswin64, :mingw will be removed in the future./)
subject.platforms(:mswin64, :jruby, :mingw) do
subject.gem("foo")
end
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb
index 2414e1ca02..bd92a84e18 100644
--- a/spec/bundler/commands/cache_spec.rb
+++ b/spec/bundler/commands/cache_spec.rb
@@ -207,15 +207,15 @@ RSpec.describe "bundle cache" do
expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).to exist
end
- it "prints an error when using legacy windows rubies" do
+ it "prints a warn when using legacy windows rubies" do
gemfile <<-D
source "https://gem.repo1"
gem 'myrack', :platforms => [:ruby_20, :x64_mingw_20]
D
bundle "cache --all-platforms", raise_on_error: false
- expect(err).to include("removed")
- expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).not_to exist
+ expect(err).to include("will be removed in the future")
+ expect(bundled_app("vendor/cache/myrack-1.0.0.gem")).to exist
end
it "does not attempt to install gems in without groups" do