From 29d8a50d264be0c9cf1ddfc9fc2ce37724755b38 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 20 Nov 2025 20:02:29 +0900 Subject: [ruby/rubygems] Keep legacy windows platform, not removed them https://github.com/ruby/rubygems/commit/f360af8e3b --- spec/bundler/bundler/dsl_spec.rb | 8 ++++---- spec/bundler/commands/cache_spec.rb | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'spec') 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 -- cgit v1.2.3