mirror of https://github.com/rails/rails
Merge pull request #46009 from johnnyshields/bundler-use-windows-platform
Bundler should use platform :windows instead of :mingw, etc.
This commit is contained in:
commit
e6d4ac0e50
6
Gemfile
6
Gemfile
|
@ -128,7 +128,7 @@ group :test do
|
|||
gem "benchmark-ips"
|
||||
end
|
||||
|
||||
platforms :ruby, :mswin, :mswin64, :mingw, :x64_mingw do
|
||||
platforms :ruby, :windows do
|
||||
gem "nokogiri", ">= 1.8.1", "!= 1.11.0"
|
||||
|
||||
# Needed for compiling the ActionDispatch::Journey parser.
|
||||
|
@ -173,8 +173,8 @@ if ENV["ORACLE_ENHANCED"]
|
|||
gem "activerecord-oracle_enhanced-adapter", github: "rsim/oracle-enhanced", branch: "master"
|
||||
end
|
||||
|
||||
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
||||
gem "wdm", ">= 0.1.0", platforms: [:mingw, :mswin, :x64_mingw, :mswin64]
|
||||
gem "tzinfo-data", platforms: [:windows, :jruby]
|
||||
gem "wdm", ">= 0.1.0", platforms: [:windows]
|
||||
|
||||
# The error_highlight gem only works on CRuby 3.1 or later.
|
||||
# Also, Rails depends on a new API available since error_highlight 0.4.0.
|
||||
|
|
|
@ -631,4 +631,4 @@ DEPENDENCIES
|
|||
websocket-client-simple!
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.17
|
||||
2.3.22
|
||||
|
|
|
@ -479,6 +479,10 @@ module Rails
|
|||
!(options[:skip_bundle] || options[:pretend])
|
||||
end
|
||||
|
||||
def bundler_windows_platforms
|
||||
Gem.rubygems_version >= Gem::Version.new("3.3.22") ? "windows" : "mswin mswin64 mingw x64_mingw"
|
||||
end
|
||||
|
||||
def depends_on_system_test?
|
||||
!(options[:skip_system_test] || options[:skip_test] || options[:api])
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ ruby <%= "\"#{Gem.ruby_version}\"" -%>
|
|||
<% end -%>
|
||||
|
||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
||||
gem "tzinfo-data", platforms: %i[ <%= bundler_windows_platforms %> jruby ]
|
||||
<% if depend_on_bootsnap? -%>
|
||||
|
||||
# Reduces boot times through caching; required in config/boot.rb
|
||||
|
@ -41,7 +41,7 @@ gem "bootsnap", require: false
|
|||
|
||||
group :development, :test do
|
||||
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
||||
gem "debug", platforms: %i[ mri mingw x64_mingw ]
|
||||
gem "debug", platforms: %i[ mri <%= bundler_windows_platforms %> ]
|
||||
end
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ gemspec
|
|||
# Start debugger with binding.b [https://github.com/ruby/debug]
|
||||
# gem "debug", ">= 1.0.0"
|
||||
<% end -%>
|
||||
<% if RUBY_PLATFORM.match?(/bccwin|cygwin|emx|mingw|mswin|wince|java/) -%>
|
||||
<% if RUBY_PLATFORM.match?(/mingw|mswin|java/) -%>
|
||||
|
||||
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
||||
gem "tzinfo-data", platforms: %i[ <%= bundler_windows_platforms %> jruby ]
|
||||
<% end -%>
|
||||
|
|
|
@ -92,6 +92,7 @@ module GeneratorsTestHelper
|
|||
depends_on_system_test: false,
|
||||
options: ActiveSupport::OrderedOptions.new,
|
||||
skip_sprockets: false,
|
||||
bundler_windows_platforms: "windows",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue