ruby-changes:61537
From: Josef <ko1@a...>
Date: Fri, 5 Jun 2020 07:34:15 +0900 (JST)
Subject: [ruby-changes:61537] 464e094fce (master): [rubygems/rubygems] Require ext only in validate_extension, mention gemspec in warning.
https://git.ruby-lang.org/ruby.git/commit/?id=464e094fce From 464e094fce3267d44c6878fda5481b178df42f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= <josef.simanek@g...> Date: Sat, 9 May 2020 00:23:19 +0200 Subject: [rubygems/rubygems] Require ext only in validate_extension, mention gemspec in warning. https://github.com/rubygems/rubygems/commit/5e31e1a421 diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb index 3a30750..1723969 100644 --- a/lib/rubygems/specification_policy.rb +++ b/lib/rubygems/specification_policy.rb @@ -1,4 +1,3 @@ https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification_policy.rb#L1 -require 'rubygems/ext' require 'rubygems/user_interaction' class Gem::SpecificationPolicy @@ -421,13 +420,14 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification_policy.rb#L420 end def validate_extensions # :nodoc: + require 'rubygems/ext' builder = Gem::Ext::Builder.new(@specification) rake_extension = @specification.extensions.any? {|s| builder.builder_for(s) == Gem::Ext::RakeBuilder } rake_dependency = @specification.dependencies.any? {|d| d.name == 'rake'} warning <<-WARNING if rake_extension && !rake_dependency -You have specified rake based extension, but rake is not added as dependency. It is recommended to add rake as a dependency since there's no guarantee rake will be already installed. +You have specified rake based extension, but rake is not added as dependency. It is recommended to add rake as a dependency in gemspec since there's no guarantee rake will be already installed. WARNING end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/