summaryrefslogtreecommitdiff
path: root/spec/bundler/support
diff options
context:
space:
mode:
authorshields <shields@tablecheck.com>2022-08-28 22:40:02 +0900
committergit <svn-admin@ruby-lang.org>2022-08-29 00:33:15 +0900
commit8799c912052f8bb957a65edd103e0064cac94598 (patch)
tree6bd697fbc6a44e96d12adfc161196572bd029ab5 /spec/bundler/support
parent1486ffe03913076889290e38d86a7bdaca4e6fbd (diff)
[rubygems/rubygems] Add platform :windows as a shortcut for all Windows platforms
https://github.com/rubygems/rubygems/commit/f3c49ad3f7
Diffstat (limited to 'spec/bundler/support')
-rw-r--r--spec/bundler/support/builders.rb10
-rw-r--r--spec/bundler/support/helpers.rb2
-rw-r--r--spec/bundler/support/platforms.rb20
3 files changed, 26 insertions, 6 deletions
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index a4d4c9f085..2af11e9874 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -110,19 +110,27 @@ module Spec
build_gem "platform_specific" do |s|
s.platform = "x86-mswin32"
- s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 MSWIN'"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0 x86-mswin32'"
+ end
+
+ build_gem "platform_specific" do |s|
+ s.platform = "x64-mswin64"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0 x64-mswin64'"
end
build_gem "platform_specific" do |s|
s.platform = "x86-mingw32"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0 x86-mingw32'"
end
build_gem "platform_specific" do |s|
s.platform = "x64-mingw32"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0 x64-mingw32'"
end
build_gem "platform_specific" do |s|
s.platform = "x64-mingw-ucrt"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0 x64-mingw-ucrt'"
end
build_gem "platform_specific" do |s|
diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb
index af6e338853..f4ee93ccc0 100644
--- a/spec/bundler/support/helpers.rb
+++ b/spec/bundler/support/helpers.rb
@@ -445,7 +445,7 @@ module Spec
ENV["BUNDLER_SPEC_PLATFORM"] = old if block_given?
end
- def simulate_windows(platform = mswin)
+ def simulate_windows(platform = x86_mswin32)
old = ENV["BUNDLER_SPEC_WINDOWS"]
ENV["BUNDLER_SPEC_WINDOWS"] = "true"
simulate_platform platform do
diff --git a/spec/bundler/support/platforms.rb b/spec/bundler/support/platforms.rb
index 1ad7778403..d3aefe004a 100644
--- a/spec/bundler/support/platforms.rb
+++ b/spec/bundler/support/platforms.rb
@@ -24,20 +24,32 @@ module Spec
Gem::Platform.new(["x86", "linux", nil])
end
- def mswin
+ def x86_mswin32
Gem::Platform.new(["x86", "mswin32", nil])
end
- def mingw
+ def x64_mswin64
+ Gem::Platform.new(["x64", "mswin64", nil])
+ end
+
+ def x86_mingw32
Gem::Platform.new(["x86", "mingw32", nil])
end
- def x64_mingw
+ def x64_mingw32
Gem::Platform.new(["x64", "mingw32", nil])
end
+ def x64_mingw_ucrt
+ Gem::Platform.new(["x64", "mingw", "ucrt"])
+ end
+
+ def windows_platforms
+ [x86_mswin32, x64_mswin64, x86_mingw32, x64_mingw32, x64_mingw_ucrt]
+ end
+
def all_platforms
- [rb, java, linux, mswin, mingw, x64_mingw]
+ [rb, java, linux, windows_platforms].flatten
end
def local