[bundler/bundler] Drop rubygems 2.5.0 and 2.5.1 support

https://github.com/bundler/bundler/commit/8ecd722b9f
This commit is contained in:
David Rodríguez 2019-07-11 11:33:03 +02:00 коммит произвёл Hiroshi SHIBATA
Родитель fc42423b8d
Коммит 31541d7389
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F9CF13417264FAC2
5 изменённых файлов: 8 добавлений и 26 удалений

Просмотреть файл

@ -32,7 +32,7 @@ Gem::Specification.new do |s|
end
s.required_ruby_version = ">= 2.3.0"
s.required_rubygems_version = ">= 2.5.0"
s.required_rubygems_version = ">= 2.5.2"
s.add_development_dependency "automatiek", "~> 0.1.0"
s.add_development_dependency "rake", "~> 12.0"

Просмотреть файл

@ -314,19 +314,6 @@ module Bundler
end
end
# RubyGems-generated binstubs call Kernel#gem
def binstubs_call_gem?
!provides?(">= 2.5.2")
end
# only 2.5.2+ has all of the stub methods we want to use, and since this
# is a performance optimization _only_,
# we'll restrict ourselves to the most
# recent RG versions instead of all versions that have stubs
def stubs_provide_full_functionality?
provides?(">= 2.5.2")
end
def replace_gem(specs, specs_by_name)
reverse_rubygems_kernel_mixin
@ -335,7 +322,6 @@ module Bundler
kernel = (class << ::Kernel; self; end)
[kernel, ::Kernel].each do |kernel_class|
redefine_method(kernel_class, :gem) do |dep, *reqs|
executables ||= specs.map(&:executables).flatten if ::Bundler.rubygems.binstubs_call_gem?
if executables && executables.include?(File.basename(caller.first.split(":").first))
break
end

Просмотреть файл

@ -314,12 +314,10 @@ module Bundler
# no-op, since we validate when re-serializing the gemspec
def validate_spec(_spec); end
if Bundler.rubygems.stubs_provide_full_functionality?
def load_gemspec(file)
stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.untaint
StubSpecification.from_stub(stub)
end
def load_gemspec(file)
stub = Gem::StubSpecification.gemspec_stub(file, install_path.parent, install_path.parent)
stub.full_gem_path = Pathname.new(file).dirname.expand_path(root).to_s.untaint
StubSpecification.from_stub(stub)
end
def git_scope

Просмотреть файл

@ -63,10 +63,8 @@ module Bundler
stub.loaded_from
end
if Bundler.rubygems.stubs_provide_full_functionality?
def matches_for_glob(glob)
stub.matches_for_glob(glob)
end
def matches_for_glob(glob)
stub.matches_for_glob(glob)
end
def raw_require_paths

Просмотреть файл

@ -851,7 +851,7 @@ __FILE__: #{path.to_s.inspect}
bundle :install, :system_bundler => true, :path => "vendor/bundler"
end
it "overrides disable_shared_gems so bundler can be found", :ruby_repo, :rubygems => ">= 2.5.2" do
it "overrides disable_shared_gems so bundler can be found", :ruby_repo do
system_gems :bundler
file = bundled_app("file_that_bundle_execs.rb")
create_file(file, <<-RB)