ruby-changes:61079
From: David <ko1@a...>
Date: Fri, 8 May 2020 07:39:46 +0900 (JST)
Subject: [ruby-changes:61079] 0b40279d7d (master): Normalize heredoc case in rubygems code base
https://git.ruby-lang.org/ruby.git/commit/?id=0b40279d7d From 0b40279d7dcd741ee8401f6b5fd2edbd431ea0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Mon, 20 Apr 2020 18:32:51 +0200 Subject: Normalize heredoc case in rubygems code base diff --git a/lib/rubygems.rb b/lib/rubygems.rb index 9c074a3..dc26ea8 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -394,11 +394,11 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/rubygems.rb#L394 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 diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb index 4b525df..e830d9a 100644 --- a/lib/rubygems/specification_policy.rb +++ b/lib/rubygems/specification_policy.rb @@ -326,19 +326,19 @@ duplicate dependency on #{dep}, (#{prev.requirement}) use: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification_policy.rb#L326 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/, '') diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 4a0244c..cd4812b 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -359,7 +359,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L359 @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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_setup_command.rb#L377 * Bug fixes: * Yet more bugs fixed - History_txt + HISTORY_TXT end use_ui @ui do diff --git a/test/rubygems/test_gem_ext_cmake_builder.rb b/test/rubygems/test_gem_ext_cmake_builder.rb index 05673e1..899fde6 100644 --- a/test/rubygems/test_gem_ext_cmake_builder.rb +++ b/test/rubygems/test_gem_ext_cmake_builder.rb @@ -23,11 +23,11 @@ class TestGemExtCmakeBuilder < Gem::TestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_ext_cmake_builder.rb#L23 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') diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb index cdb0062..2385772 100644 --- a/test/rubygems/test_gem_remote_fetcher.rb +++ b/test/rubygems/test_gem_remote_fetcher.rb @@ -83,7 +83,7 @@ gems: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_remote_fetcher.rb#L83 # 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 https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_remote_fetcher.rb#L92 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] diff --git a/test/rubygems/test_gem_request_set.rb b/test/rubygems/test_gem_request_set.rb index f7a9191..98efe5d 100644 --- a/test/rubygems/test_gem_request_set.rb +++ b/test/rubygems/test_gem_request_set.rb @@ -396,9 +396,9 @@ ruby "0" https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set.rb#L396 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" https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_request_set.rb#L459 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 diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 875d277..e056850 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -3122,10 +3122,10 @@ Please report a bug if this causes problems. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3122 @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. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3151 @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. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3198 @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. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3216 @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. https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L3230 @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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/