1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Prepare to release rubygems-3.2.1 and bundler-2.2.1

This commit is contained in:
Hiroshi SHIBATA 2020-12-15 08:32:54 +09:00
parent 7898f4243f
commit 2fa9f3c032
Notes: git 2020-12-15 10:54:36 +09:00
27 changed files with 329 additions and 129 deletions

View file

@ -82,7 +82,7 @@ module Bundler
search_object = if source.is_a?(Source::Path)
Dependency.new(name, version)
else
self
ruby_platform_materializes_to_ruby_platform? ? self : Dependency.new(name, version)
end
platform_object = Gem::Platform.new(platform)
candidates = source.specs.search(search_object)
@ -129,5 +129,19 @@ module Bundler
@specification.send(method, *args, &blk)
end
#
# Bundler 2.2.0 was the first version that records the full resolution
# including platform specific gems in the lockfile, which means that if a
# gem with RUBY platform is recorded, the RUBY platform version of the gem
# should be installed. Previously bundler would record only generic versions
# in the lockfile and then install the most specific platform variant if
# available.
#
def ruby_platform_materializes_to_ruby_platform?
locked_bundler_version = Bundler.locked_bundler_version
locked_bundler_version.nil? || Gem::Version.new(locked_bundler_version) >= Gem::Version.new("2.2.0")
end
end
end