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
|
||||
when Array
|
||||
unless Gem::Deprecate.skip
|
||||
warn <<-eowarn
|
||||
warn <<-EOWARN
|
||||
Array values in the parameter to `Gem.paths=` are deprecated.
|
||||
Please use a String or nil.
|
||||
An Array (#{env.inspect}) was passed in from #{caller[3]}
|
||||
eowarn
|
||||
EOWARN
|
||||
end
|
||||
target[k] = v.join File::PATH_SEPARATOR
|
||||
end
|
||||
|
|
|
@ -326,19 +326,19 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use:
|
|||
|
||||
if !Gem::Licenses.match?(license)
|
||||
suggestions = Gem::Licenses.suggestions(license)
|
||||
message = <<-warning
|
||||
message = <<-WARNING
|
||||
license value '#{license}' is invalid. Use a license identifier from
|
||||
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?
|
||||
warning(message)
|
||||
end
|
||||
end
|
||||
|
||||
warning <<-warning if licenses.empty?
|
||||
warning <<-WARNING if licenses.empty?
|
||||
licenses is empty, but is recommended. Use a license identifier from
|
||||
http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard license.
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
|
||||
|
|
|
@ -359,7 +359,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||
@cmd.options[:previous_version] = Gem::Version.new '2.0.2'
|
||||
|
||||
File.open 'History.txt', 'w' do |io|
|
||||
io.puts <<-History_txt
|
||||
io.puts <<-HISTORY_TXT
|
||||
# coding: UTF-8
|
||||
|
||||
=== #{Gem::VERSION} / 2013-03-26
|
||||
|
@ -377,7 +377,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase
|
|||
|
||||
* Bug fixes:
|
||||
* Yet more bugs fixed
|
||||
History_txt
|
||||
HISTORY_TXT
|
||||
end
|
||||
|
||||
use_ui @ui do
|
||||
|
|
|
@ -23,11 +23,11 @@ class TestGemExtCmakeBuilder < Gem::TestCase
|
|||
|
||||
def test_self_build
|
||||
File.open File.join(@ext, 'CMakeLists.txt'), 'w' do |cmakelists|
|
||||
cmakelists.write <<-eo_cmake
|
||||
cmakelists.write <<-EO_CMAKE
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(self_build NONE)
|
||||
install (FILES test.txt DESTINATION bin)
|
||||
eo_cmake
|
||||
EO_CMAKE
|
||||
end
|
||||
|
||||
FileUtils.touch File.join(@ext, 'test.txt')
|
||||
|
|
|
@ -83,7 +83,7 @@ gems:
|
|||
# Generated via:
|
||||
# x = OpenSSL::PKey::DH.new(2048) # wait a while...
|
||||
# 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-----
|
||||
MIIBCAKCAQEA3Ze2EHSfYkZLUn557torAmjBgPsqzbodaRaGZtgK1gEU+9nNJaFV
|
||||
G1JKhmGUiEDyIW7idsBpe4sX/Wqjnp48Lr8IeI/SlEzLdoGpf05iRYXC8Cm9o8aM
|
||||
|
@ -92,7 +92,7 @@ cfmVgoSEAo9YLBpzoji2jHkO7Q5IPt4zxbTdlmmGFLc/GO9q7LGHhC+rcMcNTGsM
|
|||
NP0fuvVAIB158VnQ0liHSwcl6+9vE1mL0Jo/qEXQxl0+UdKDjaGfTsn6HIrwTnmJ
|
||||
PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
|
||||
-----END DH PARAMETERS-----
|
||||
_end_of_pem_
|
||||
_END_OF_PEM_
|
||||
|
||||
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]
|
||||
|
|
|
@ -396,9 +396,9 @@ ruby "0"
|
|||
rs = Gem::RequestSet.new
|
||||
|
||||
tf = Tempfile.open 'gem.deps.rb' do |io|
|
||||
io.puts <<-gems_deps_rb
|
||||
io.puts <<-GEMS_DEPS_RB
|
||||
gem "#{name}", :git => "#{repository}"
|
||||
gems_deps_rb
|
||||
GEMS_DEPS_RB
|
||||
|
||||
io.flush
|
||||
|
||||
|
@ -459,10 +459,10 @@ ruby "0"
|
|||
rs = Gem::RequestSet.new
|
||||
|
||||
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 "#{b_name}", :path => "#{b_directory}"
|
||||
gems_deps_rb
|
||||
GEMS_DEPS_RB
|
||||
|
||||
io.flush
|
||||
|
||||
|
|
|
@ -3122,10 +3122,10 @@ Please report a bug if this causes problems.
|
|||
@a1.validate
|
||||
end
|
||||
|
||||
assert_match <<-warning, @ui.error
|
||||
assert_match <<-WARNING, @ui.error
|
||||
WARNING: licenses is empty, but is recommended. Use a license identifier from
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
def test_removed_methods
|
||||
|
@ -3151,10 +3151,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
@a1.validate
|
||||
end
|
||||
|
||||
assert_match <<-warning, @ui.error
|
||||
assert_match <<-WARNING, @ui.error
|
||||
WARNING: license value 'BSD' is invalid. Use a license identifier from
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
def test_validate_license_values_plus
|
||||
|
@ -3198,14 +3198,14 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
@a1.validate
|
||||
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
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
warning
|
||||
assert_match <<-warning, @ui.error
|
||||
WARNING
|
||||
assert_match <<-WARNING, @ui.error
|
||||
WARNING: license value 'GPL-2.0 FOO' is invalid. Use a license identifier from
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
def test_validate_license_with_invalid_exception
|
||||
|
@ -3216,10 +3216,10 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
@a1.validate
|
||||
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
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
def test_validate_license_gives_suggestions
|
||||
|
@ -3230,11 +3230,11 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
@a1.validate
|
||||
end
|
||||
|
||||
assert_match <<-warning, @ui.error
|
||||
assert_match <<-WARNING, @ui.error
|
||||
WARNING: license value 'ruby' is invalid. Use a license identifier from
|
||||
http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
||||
Did you mean 'Ruby'?
|
||||
warning
|
||||
WARNING
|
||||
end
|
||||
|
||||
def test_validate_empty_files
|
||||
|
|
Loading…
Add table
Reference in a new issue