Merge pull request #15873 from Bo98/bundler-2.4

utils/gems: update to Bundler 2.4
This commit is contained in:
Mike McQuaid 2023-08-16 08:33:48 +01:00 committed by GitHub
commit b3db5c7af7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 9 deletions

View File

@ -230,4 +230,4 @@ RUBY VERSION
ruby 2.6.10p210 ruby 2.6.10p210
BUNDLED WITH BUNDLED WITH
2.3.26 2.4.18

View File

@ -10,7 +10,7 @@ require "English"
module Homebrew module Homebrew
# Keep in sync with the `Gemfile.lock`'s BUNDLED WITH. # Keep in sync with the `Gemfile.lock`'s BUNDLED WITH.
# After updating this, run `brew vendor-gems --update=--bundler`. # After updating this, run `brew vendor-gems --update=--bundler`.
HOMEBREW_BUNDLER_VERSION = "2.3.26" HOMEBREW_BUNDLER_VERSION = "2.4.18"
module_function module_function
@ -65,6 +65,8 @@ module Homebrew
require "rubygems" require "rubygems"
raise "RubyGems too old!" if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.2.0") raise "RubyGems too old!" if Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.2.0")
ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"] = "1"
# Match where our bundler gems are. # Match where our bundler gems are.
gem_home = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}" gem_home = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/ruby/#{RbConfig::CONFIG["ruby_version"]}"
Gem.paths = { Gem.paths = {

View File

@ -14,6 +14,9 @@ unless defined?(Gem)
end end
end end
end end
if Gem.respond_to?(:discover_gems_on_require=)
Gem.discover_gems_on_require = false
else
kernel = (class << ::Kernel; self; end) kernel = (class << ::Kernel; self; end)
[kernel, ::Kernel].each do |k| [kernel, ::Kernel].each do |k|
if k.private_method_defined?(:gem_original_require) if k.private_method_defined?(:gem_original_require)
@ -23,6 +26,7 @@ kernel = (class << ::Kernel; self; end)
k.send(:private, :require) if private_require k.send(:private, :require) if private_require
end end
end end
end
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/i18n-1.14.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/i18n-1.14.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/minitest-5.19.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/minitest-5.19.0/lib")