summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorjohnnyshields <johnny.shields@gmail.com>2023-02-18 22:46:35 +0900
committergit <svn-admin@ruby-lang.org>2023-03-03 09:50:29 +0000
commit79ede4ae9911fdb180406b1a8adc7ee02e187a50 (patch)
tree6599a55817081ad1180902023daaf00cf1a49879 /spec/bundler
parent6b46057e5c9524e11c004a541bb17a5871767d44 (diff)
downloadruby-79ede4ae9911fdb180406b1a8adc7ee02e187a50.tar.gz
[rubygems/rubygems] Alias CurrentRuby#mswin?, mswin64?, mingw?, x64_mingw? to #windows?. (This is done instead of logging a deprecation warning.)
https://github.com/rubygems/rubygems/commit/b9fcc7c0ab
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/bundler/dependency_spec.rb9
-rw-r--r--spec/bundler/commands/cache_spec.rb12
-rw-r--r--spec/bundler/install/gemfile/platform_spec.rb2
-rw-r--r--spec/bundler/runtime/platform_spec.rb2
4 files changed, 19 insertions, 6 deletions
diff --git a/spec/bundler/bundler/dependency_spec.rb b/spec/bundler/bundler/dependency_spec.rb
index 6e346c36c1..1ef511f1aa 100644
--- a/spec/bundler/bundler/dependency_spec.rb
+++ b/spec/bundler/bundler/dependency_spec.rb
@@ -89,8 +89,11 @@ RSpec.describe Bundler::Dependency do
:windows_30 => Gem::Platform::WINDOWS,
:windows_31 => Gem::Platform::WINDOWS,
:windows_32 => Gem::Platform::WINDOWS,
- :windows_33 => Gem::Platform::WINDOWS,
- :mswin => Gem::Platform::MSWIN,
+ :windows_33 => Gem::Platform::WINDOWS }
+ end
+
+ let(:deprecated) do
+ { :mswin => Gem::Platform::MSWIN,
:mswin_18 => Gem::Platform::MSWIN,
:mswin_19 => Gem::Platform::MSWIN,
:mswin_20 => Gem::Platform::MSWIN,
@@ -151,7 +154,7 @@ RSpec.describe Bundler::Dependency do
# rubocop:enable Naming/VariableNumber
it "includes all platforms" do
- expect(subject).to eq(platforms)
+ expect(subject).to eq(platforms.merge(deprecated))
end
end
end
diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb
index 356a658e7c..790373be1f 100644
--- a/spec/bundler/commands/cache_spec.rb
+++ b/spec/bundler/commands/cache_spec.rb
@@ -211,7 +211,17 @@ RSpec.describe "bundle cache" do
end
context "with --all-platforms" do
- it "puts the gems in vendor/cache even for other rubies" do
+ it "puts the gems in vendor/cache even for other rubies", :bundler => ">= 2.4.0" do
+ gemfile <<-D
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'rack', :platforms => [:ruby_20, :windows_20]
+ D
+
+ bundle "cache --all-platforms"
+ expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
+ end
+
+ it "puts the gems in vendor/cache even for legacy windows rubies", :bundler => ">= 2.4.0" do
gemfile <<-D
source "#{file_uri_for(gem_repo1)}"
gem 'rack', :platforms => [:ruby_20, :x64_mingw_20]
diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb
index e9cf0cb636..624de6455d 100644
--- a/spec/bundler/install/gemfile/platform_spec.rb
+++ b/spec/bundler/install/gemfile/platform_spec.rb
@@ -550,7 +550,7 @@ RSpec.describe "bundle install with platform conditionals" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
- gem "rack", :platform => [:windows, :mingw, :mswin, :x64_mingw, :jruby]
+ gem "rack", :platform => [:windows, :mswin, :mswin64, :mingw, :x64_mingw, :jruby]
G
bundle "install"
diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb
index caf69bf085..5bdc0ffc4f 100644
--- a/spec/bundler/runtime/platform_spec.rb
+++ b/spec/bundler/runtime/platform_spec.rb
@@ -365,7 +365,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do
simulate_windows do
install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
- gem "nokogiri", :platforms => [:mingw, :mswin, :x64_mingw, :jruby]
+ gem "nokogiri", :platforms => [:windows, :mswin, :mswin64, :mingw, :x64_mingw, :jruby]
gem "platform_specific"
G