[rubygems/rubygems] Revert cadb66037d9b58c80fc795f39384d533229a1f73

https://github.com/rubygems/rubygems/commit/5c3158d975
This commit is contained in:
bronzdoc 2019-07-31 06:33:40 -06:00 коммит произвёл Hiroshi SHIBATA
Родитель 8eb2921f56
Коммит 87bc29fe28
3 изменённых файлов: 29 добавлений и 0 удалений

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

@ -133,6 +133,7 @@ class Gem::Specification < Gem::BasicSpecification
@@default_value = {
:authors => [],
:autorequire => nil,
:bindir => 'bin',
:cert_chain => [],
:date => nil,
@ -705,6 +706,13 @@ class Gem::Specification < Gem::BasicSpecification
alias :activated? :activated
##
# Autorequire was used by old RubyGems to automatically require a file.
#
# Deprecated: It is neither supported nor functional.
attr_accessor :autorequire # :nodoc:
##
# Sets the default executable for this gem.
#

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

@ -369,6 +369,9 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
warning "description and summary are identical"
end
# TODO: raise at some given date
warning "deprecated autorequire specified" if autorequire
executables.each do |executable|
validate_shebang_line_in(executable)
end

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

@ -23,6 +23,7 @@ require_paths:
- lib
files:
- lib/keyedlist.rb
autorequire: keyedlist
author: Florian Gross
email: flgr@ccan.de
has_rdoc: true
@ -36,6 +37,7 @@ Gem::Specification.new do |s|
s.summary = %q{A Hash which automatically computes keys.}
s.files = [%q{lib/keyedlist.rb}]
s.require_paths = [%q{lib}]
s.autorequire = %q{keyedlist}
s.author = %q{Florian Gross}
s.email = %q{flgr@ccan.de}
end
@ -677,6 +679,7 @@ end
def test_self_attribute_names
expected_value = %w[
authors
autorequire
bindir
cert_chain
date
@ -2691,6 +2694,21 @@ end
end
end
def test_validate_autorequire
util_setup_validate
Dir.chdir @tempdir do
@a1.autorequire = 'code'
use_ui @ui do
@a1.validate
end
assert_match "#{w}: deprecated autorequire specified\n",
@ui.error, 'error'
end
end
def test_validate_dependencies
util_setup_validate