mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Normalize heredoc case in rubygems code base
This commit is contained in:
parent
2205ae8af5
commit
0b40279d7d
Notes:
git
2020-05-08 07:39:22 +09:00
7 changed files with 28 additions and 28 deletions
|
@ -394,11 +394,11 @@ module Gem
|
||||||
target[k] = v
|
target[k] = v
|
||||||
when Array
|
when Array
|
||||||
unless Gem::Deprecate.skip
|
unless Gem::Deprecate.skip
|
||||||
warn <<-eowarn
|
warn <<-EOWARN
|
||||||
Array values in the parameter to `Gem.paths=` are deprecated.
|
Array values in the parameter to `Gem.paths=` are deprecated.
|
||||||
Please use a String or nil.
|
Please use a String or nil.
|
||||||
An Array (#{env.inspect}) was passed in from #{caller[3]}
|
An Array (#{env.inspect}) was passed in from #{caller[3]}
|
||||||
eowarn
|
EOWARN
|
||||||
end
|
end
|
||||||
target[k] = v.join File::PATH_SEPARATOR
|
target[k] = v.join File::PATH_SEPARATOR
|
||||||
end
|
end
|
||||||
|
|
|
@ -326,19 +326,19 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use:
|
||||||
|
|
||||||
if !Gem::Licenses.match?(license)
|
if !Gem::Licenses.match?(license)
|
||||||
suggestions = Gem::Licenses.suggestions(license)
|
suggestions = Gem::Licenses.suggestions(license)
|
||||||
message = <<-warning
|
message = <<-WARNING
|
||||||
license value '#{license}' is invalid. Use a license identifier from
|
license value '#{license}' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
|
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
message += "Did you mean #{suggestions.map { |s| "'#{s}'"}.join(', ')}?\n" unless suggestions.nil?
|
message += "Did you mean #{suggestions.map { |s| "'#{s}'"}.join(', ')}?\n" unless suggestions.nil?
|
||||||
warning(message)
|
warning(message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
warning <<-warning if licenses.empty?
|
warning <<-WARNING if licenses.empty?
|
||||||
licenses is empty, but is recommended. Use a license identifier from
|
licenses is empty, but is recommended. Use a license identifier from
|
||||||
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
|
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
|
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
|
||||||
|
|
|
@ -359,7 +359,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
||||||
@cmd.options[:previous_version] = Gem::Version.new '2.0.2'
|
@cmd.options[:previous_version] = Gem::Version.new '2.0.2'
|
||||||
|
|
||||||
File.open 'History.txt', 'w' do |io|
|
File.open 'History.txt', 'w' do |io|
|
||||||
io.puts <<-History_txt
|
io.puts <<-HISTORY_TXT
|
||||||
# coding: UTF-8
|
# coding: UTF-8
|
||||||
|
|
||||||
=== #{Gem::VERSION} / 2013-03-26
|
=== #{Gem::VERSION} / 2013-03-26
|
||||||
|
@ -377,7 +377,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
||||||
|
|
||||||
* Bug fixes:
|
* Bug fixes:
|
||||||
* Yet more bugs fixed
|
* Yet more bugs fixed
|
||||||
History_txt
|
HISTORY_TXT
|
||||||
end
|
end
|
||||||
|
|
||||||
use_ui @ui do
|
use_ui @ui do
|
||||||
|
|
|
@ -23,11 +23,11 @@ class TestGemExtCmakeBuilder < Gem::TestCase
|
||||||
|
|
||||||
def test_self_build
|
def test_self_build
|
||||||
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
|
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
|
||||||
cmakelists.write <<-eo_cmake
|
cmakelists.write <<-EO_CMAKE
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(self_build NONE)
|
project(self_build NONE)
|
||||||
install (FILES test.txt DESTINATION bin)
|
install (FILES test.txt DESTINATION bin)
|
||||||
eo_cmake
|
EO_CMAKE
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.touch File.join(@ext, 'test.txt')
|
FileUtils.touch File.join(@ext, 'test.txt')
|
||||||
|
|
|
@ -83,7 +83,7 @@ gems:
|
||||||
# Generated via:
|
# Generated via:
|
||||||
# x = OpenSSL::PKey::DH.new(2048) # wait a while...
|
# x = OpenSSL::PKey::DH.new(2048) # wait a while...
|
||||||
# x.to_s => pem
|
# x.to_s => pem
|
||||||
TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_end_of_pem_
|
TEST_KEY_DH2048 = OpenSSL::PKey::DH.new <<-_END_OF_PEM_
|
||||||
-----BEGIN DH PARAMETERS-----
|
-----BEGIN DH PARAMETERS-----
|
||||||
MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
|
MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
|
||||||
G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
|
G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
|
||||||
|
@ -92,7 +92,7 @@ cfmVgoSEAo9YLBpzoji2jHkO7Q5IPt4zxbTdlmmGFLc/GO9q7LGHhC+rcMcNTGsM
|
||||||
NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
|
NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
|
||||||
PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
||||||
-----END DH PARAMETERS-----
|
-----END DH PARAMETERS-----
|
||||||
_end_of_pem_
|
_END_OF_PEM_
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@proxies = %w[https_proxy http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
|
@proxies = %w[https_proxy http_proxy HTTP_PROXY http_proxy_user HTTP_PROXY_USER http_proxy_pass HTTP_PROXY_PASS no_proxy NO_PROXY]
|
||||||
|
|
|
@ -396,9 +396,9 @@ ruby "0"
|
||||||
rs = Gem::RequestSet.new
|
rs = Gem::RequestSet.new
|
||||||
|
|
||||||
tf = Tempfile.open 'gem.deps.rb' do |io|
|
tf = Tempfile.open 'gem.deps.rb' do |io|
|
||||||
io.puts <<-gems_deps_rb
|
io.puts <<-GEMS_DEPS_RB
|
||||||
gem "#{name}", :git => "#{repository}"
|
gem "#{name}", :git => "#{repository}"
|
||||||
gems_deps_rb
|
GEMS_DEPS_RB
|
||||||
|
|
||||||
io.flush
|
io.flush
|
||||||
|
|
||||||
|
@ -459,10 +459,10 @@ ruby "0"
|
||||||
rs = Gem::RequestSet.new
|
rs = Gem::RequestSet.new
|
||||||
|
|
||||||
tf = Tempfile.open 'gem.deps.rb' do |io|
|
tf = Tempfile.open 'gem.deps.rb' do |io|
|
||||||
io.puts <<-gems_deps_rb
|
io.puts <<-GEMS_DEPS_RB
|
||||||
gem "#{a_name}", :path => "#{a_directory}"
|
gem "#{a_name}", :path => "#{a_directory}"
|
||||||
gem "#{b_name}", :path => "#{b_directory}"
|
gem "#{b_name}", :path => "#{b_directory}"
|
||||||
gems_deps_rb
|
GEMS_DEPS_RB
|
||||||
|
|
||||||
io.flush
|
io.flush
|
||||||
|
|
||||||
|
|
|
@ -3122,10 +3122,10 @@ Please report a bug if this causes problems.
|
||||||
@a1.validate
|
@a1.validate
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: licenses is empty, but is recommended. Use a license identifier from
|
WARNING: licenses is empty, but is recommended. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_removed_methods
|
def test_removed_methods
|
||||||
|
@ -3151,10 +3151,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
@a1.validate
|
@a1.validate
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: license value 'BSD' is invalid. Use a license identifier from
|
WARNING: license value 'BSD' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_validate_license_values_plus
|
def test_validate_license_values_plus
|
||||||
|
@ -3198,14 +3198,14 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
@a1.validate
|
@a1.validate
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: license value 'GPL-2.0+ FOO' is invalid. Use a license identifier from
|
WARNING: license value 'GPL-2.0+ FOO' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
|
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_validate_license_with_invalid_exception
|
def test_validate_license_with_invalid_exception
|
||||||
|
@ -3216,10 +3216,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
@a1.validate
|
@a1.validate
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: license value 'GPL-2.0+ WITH Autocofn-exception-2.0' is invalid. Use a license identifier from
|
WARNING: license value 'GPL-2.0+ WITH Autocofn-exception-2.0' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_validate_license_gives_suggestions
|
def test_validate_license_gives_suggestions
|
||||||
|
@ -3230,11 +3230,11 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
@a1.validate
|
@a1.validate
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_match <<-warning, @ui.error
|
assert_match <<-WARNING, @ui.error
|
||||||
WARNING: license value 'ruby' is invalid. Use a license identifier from
|
WARNING: license value 'ruby' is invalid. Use a license identifier from
|
||||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||||
Did you mean 'Ruby'?
|
Did you mean 'Ruby'?
|
||||||
warning
|
WARNING
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_validate_empty_files
|
def test_validate_empty_files
|
||||||
|
|
Loading…
Add table
Reference in a new issue