[rubygems/rubygems] util/rubocop -A --only Style/LineEndConcatenation

https://github.com/rubygems/rubygems/commit/67ece7b8b6
This commit is contained in:
Hiroshi SHIBATA 2023-04-06 11:33:10 +09:00 committed by git
parent bffadcd6d4
commit fb822076d7
23 changed files with 53 additions and 53 deletions

View File

@ -77,7 +77,7 @@ class Gem::BasicSpecification
@ignored = true
if Gem::Platform::RUBY == platform || Gem::Platform.local === platform
warn "Ignoring #{full_name} because its extensions are not built. " +
warn "Ignoring #{full_name} because its extensions are not built. " \
"Try: gem pristine #{name} --version #{version}"
end

View File

@ -48,7 +48,7 @@ class Gem::Commands::InstallCommand < Gem::Command
end
def defaults_str # :nodoc:
"--both --version '#{Gem::Requirement.default}' --no-force\n" +
"--both --version '#{Gem::Requirement.default}' --no-force\n" \
"--install-dir #{Gem.dir} --lock\n" +
install_update_defaults_str
end

View File

@ -95,7 +95,7 @@ class Gem::Commands::UninstallCommand < Gem::Command
end
def defaults_str # :nodoc:
"--version '#{Gem::Requirement.default}' --no-force " +
"--version '#{Gem::Requirement.default}' --no-force " \
"--user-install"
end
@ -183,12 +183,12 @@ that is a dependency of an existing gem. You can use the
uninstall(gem_name)
rescue Gem::GemNotInHomeException => e
spec = e.spec
alert("In order to remove #{spec.name}, please execute:\n" +
alert("In order to remove #{spec.name}, please execute:\n" \
"\tgem uninstall #{spec.name} --install-dir=#{spec.installation_path}")
rescue Gem::UninstallError => e
spec = e.spec
alert_error("Error: unable to successfully uninstall '#{spec.name}' which is " +
"located at '#{spec.full_gem_path}'. This is most likely because" +
alert_error("Error: unable to successfully uninstall '#{spec.name}' which is " \
"located at '#{spec.full_gem_path}'. This is most likely because" \
"the current user does not have the appropriate permissions")
terminate_interaction 1
end

View File

@ -49,7 +49,7 @@ class Gem::Dependency
requirements = requirements.first if requirements.length == 1 # unpack
unless TYPES.include? type
raise ArgumentError, "Valid types are #{TYPES.inspect}, " +
raise ArgumentError, "Valid types are #{TYPES.inspect}, " \
"not #{type.inspect}"
end

View File

@ -75,7 +75,7 @@ class Gem::Doctor
Gem.use_paths @gem_repository.to_s
unless gem_repository?
say "This directory does not appear to be a RubyGems repository, " +
say "This directory does not appear to be a RubyGems repository, " \
"skipping"
say
return

View File

@ -153,7 +153,7 @@ module Gem::GemcutterUtilities
pretty_host = pretty_host(sign_in_host)
say "Enter your #{pretty_host} credentials."
say "Don't have an account yet? " +
say "Don't have an account yet? " \
"Create one at #{sign_in_host}/sign_up"
email = ask " Email: "

View File

@ -262,7 +262,7 @@ class Gem::RequestSet::GemDependencyAPI
raise ArgumentError, "no gemspecs found at #{Dir.pwd}"
else
raise ArgumentError,
"found multiple gemspecs at #{Dir.pwd}, " +
"found multiple gemspecs at #{Dir.pwd}, " \
"use the name: option to specify the one you want"
end
end
@ -791,14 +791,14 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
return true if @installing
unless RUBY_VERSION == version
message = "Your Ruby version is #{RUBY_VERSION}, " +
message = "Your Ruby version is #{RUBY_VERSION}, " \
"but your #{gem_deps_file} requires #{version}"
raise Gem::RubyVersionMismatch, message
end
if engine && engine != Gem.ruby_engine
message = "Your Ruby engine is #{Gem.ruby_engine}, " +
message = "Your Ruby engine is #{Gem.ruby_engine}, " \
"but your #{gem_deps_file} requires #{engine}"
raise Gem::RubyVersionMismatch, message
@ -807,7 +807,7 @@ Gem dependencies file #{@path} includes git reference for both ref/branch and ta
if engine_version
if engine_version != RUBY_ENGINE_VERSION
message =
"Your Ruby engine version is #{Gem.ruby_engine} #{RUBY_ENGINE_VERSION}, " +
"Your Ruby engine version is #{Gem.ruby_engine} #{RUBY_ENGINE_VERSION}, " \
"but your #{gem_deps_file} requires #{engine} #{engine_version}"
raise Gem::RubyVersionMismatch, message

View File

@ -48,7 +48,7 @@ class Gem::RequestSet::Lockfile::Parser
if expected_types && !Array(expected_types).include?(token.type)
unget token
message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " +
message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " \
"expected #{expected_types.inspect}"
raise Gem::RequestSet::Lockfile::ParseError.new message, token.column, token.line, @filename
@ -57,8 +57,8 @@ class Gem::RequestSet::Lockfile::Parser
if expected_value && expected_value != token.value
unget token
message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " +
"expected [#{expected_types.inspect}, " +
message = "unexpected token [#{token.type.inspect}, #{token.value.inspect}], " \
"expected [#{expected_types.inspect}, " \
"#{expected_value.inspect}]"
raise Gem::RequestSet::Lockfile::ParseError.new message, token.column, token.line, @filename

View File

@ -263,7 +263,7 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set
unless rrgv.satisfied_by? Gem.rubygems_version
rg_version = Gem::VERSION
raise Gem::RuntimeRequirementNotMetError,
"#{spec.full_name} requires RubyGems version #{rrgv}. The current RubyGems version is #{rg_version}. " +
"#{spec.full_name} requires RubyGems version #{rrgv}. The current RubyGems version is #{rg_version}. " \
"Try 'gem update --system' to update RubyGems itself."
end
end

View File

@ -517,7 +517,7 @@ module Gem::Security
issuer = alt_name_or_x509_entry expired_certificate, :issuer
raise Gem::Security::Exception,
"#{subject} is not self-signed, contact #{issuer} " +
"#{subject} is not self-signed, contact #{issuer} " \
"to obtain a valid certificate"
end

View File

@ -135,7 +135,7 @@ class Gem::Security::Policy
raise Gem::Security::Exception, "missing root certificate" unless root
raise Gem::Security::Exception,
"root certificate #{root.subject} is not self-signed " +
"root certificate #{root.subject} is not self-signed " \
"(issuer #{root.issuer})" if
root.issuer != root.subject
@ -171,7 +171,7 @@ class Gem::Security::Policy
cert_dgst = digester.digest pkey_str
raise Gem::Security::Exception,
"trusted root certificate #{root.subject} checksum " +
"trusted root certificate #{root.subject} checksum " \
"does not match signing root certificate checksum" unless
save_dgst == cert_dgst
@ -192,8 +192,8 @@ class Gem::Security::Policy
end
def inspect # :nodoc:
("[Policy: %s - data: %p signer: %p chain: %p root: %p " +
"signed-only: %p trusted-only: %p]") % [
"[Policy: %s - data: %p signer: %p chain: %p root: %p " \
"signed-only: %p trusted-only: %p]" % [
@name, @verify_chain, @verify_data, @verify_root, @verify_signer,
@only_signed, @only_trusted
]

View File

@ -199,8 +199,8 @@ class Gem::Uninstaller
executables = executables.map {|exec| formatted_program_filename exec }
remove = if @force_executables.nil?
ask_yes_no("Remove executables:\n" +
"\t#{executables.join ", "}\n\n" +
ask_yes_no("Remove executables:\n" \
"\t#{executables.join ", "}\n\n" \
"in addition to the gem?",
true)
else

View File

@ -1294,7 +1294,7 @@ class TestGem < Gem::TestCase
refute Gem.try_activate "nonexistent"
end
expected = "Ignoring ext-1 because its extensions are not built. " +
expected = "Ignoring ext-1 because its extensions are not built. " \
"Try: gem pristine ext --version 1\n"
assert_equal expected, err
@ -1403,7 +1403,7 @@ class TestGem < Gem::TestCase
end
def test_self_gunzip
input = "\x1F\x8B\b\0\xED\xA3\x1AQ\0\x03\xCBH" +
input = "\x1F\x8B\b\0\xED\xA3\x1AQ\0\x03\xCBH" \
"\xCD\xC9\xC9\a\0\x86\xA6\x106\x05\0\0\0"
output = Gem::Util.gunzip input

View File

@ -778,7 +778,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
@cmd.handle_options %W[--certificate #{bad}]
end
assert_equal "invalid argument: " +
assert_equal "invalid argument: " \
"--certificate #{bad}: invalid X509 certificate",
e.message
end
@ -789,7 +789,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
@cmd.handle_options %W[--private-key #{nonexistent}]
end
assert_equal "invalid argument: " +
assert_equal "invalid argument: " \
"--private-key #{nonexistent}: does not exist",
e.message
@ -807,7 +807,7 @@ ERROR: --private-key not specified and ~/.gem/gem-private_key.pem does not exis
@cmd.handle_options %W[--private-key #{PUBLIC_KEY_FILE}]
end
assert_equal "invalid argument: " +
assert_equal "invalid argument: " \
"--private-key #{PUBLIC_KEY_FILE}: private key not found",
e.message
end

View File

@ -767,7 +767,7 @@ class TestGemCommandsExecCommand < Gem::TestCase
assert_raise Gem::MockGemUi::TermError do
invoke "a"
end
assert_equal "ERROR: Could not find a valid gem 'a' (>= 0) in any repository\n" +
assert_equal "ERROR: Could not find a valid gem 'a' (>= 0) in any repository\n" \
"ERROR: Possible alternatives: a\n", @ui.error
assert_empty @ui.output
assert_empty @installed_specs

View File

@ -287,7 +287,7 @@ gem 'other', version
installer.ensure_loadable_spec
end
assert_equal "The specification for #{a.full_name} is corrupt " +
assert_equal "The specification for #{a.full_name} is corrupt " \
"(SyntaxError)", e.message
end

View File

@ -539,7 +539,7 @@ class TestGemPackage < Gem::Package::TarTestCase
package.extract_tar_gz tgz_io, @destination
end
assert_equal("installing into parent path /absolute.rb of " +
assert_equal("installing into parent path /absolute.rb of " \
"#{@destination} is not allowed", e.message)
end
@ -620,7 +620,7 @@ class TestGemPackage < Gem::Package::TarTestCase
pend "symlink - must be admin with no UAC on Windows" if Errno::EACCES === e
assert_equal("installing symlink 'lib/link' pointing to parent path #{@destination} of " +
assert_equal("installing symlink 'lib/link' pointing to parent path #{@destination} of " \
"#{destination_subdir} is not allowed", e.message)
assert_path_not_exist File.join(@destination, "outside.txt")
@ -655,7 +655,7 @@ class TestGemPackage < Gem::Package::TarTestCase
pend "symlink - must be admin with no UAC on Windows" if Errno::EACCES === e
assert_equal("installing symlink 'link' pointing to parent path #{destination_user_dir} of " +
assert_equal("installing symlink 'link' pointing to parent path #{destination_user_dir} of " \
"#{destination_subdir} is not allowed", e.message)
assert_path_exist destination_user_subdir
@ -749,7 +749,7 @@ class TestGemPackage < Gem::Package::TarTestCase
package.install_location "/absolute.rb", @destination
end
assert_equal("installing into parent path /absolute.rb of " +
assert_equal("installing into parent path /absolute.rb of " \
"#{@destination} is not allowed", e.message)
end
@ -790,7 +790,7 @@ class TestGemPackage < Gem::Package::TarTestCase
parent = File.expand_path File.join @destination, "../relative.rb"
assert_equal("installing into parent path #{parent} of " +
assert_equal("installing into parent path #{parent} of " \
"#{@destination} is not allowed", e.message)
end
@ -805,7 +805,7 @@ class TestGemPackage < Gem::Package::TarTestCase
parent = File.expand_path File.join @destination, filename
assert_equal("installing into parent path #{parent} of " +
assert_equal("installing into parent path #{parent} of " \
"#{@destination} is not allowed", e.message)
end

View File

@ -83,7 +83,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
@package.verify
end
assert_equal "old format gems do not contain signatures " +
assert_equal "old format gems do not contain signatures " \
"and cannot be verified",
e.message
end

View File

@ -985,7 +985,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
temp_client_cert = File.join(__dir__, "client.pem")
with_configured_fetcher(
":ssl_ca_cert: #{temp_ca_cert}\n" +
":ssl_ca_cert: #{temp_ca_cert}\n" \
":ssl_client_cert: #{temp_client_cert}\n"
) do |fetcher|
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
@ -1001,7 +1001,7 @@ PeIQQkFng2VVot/WAQbv3ePqWq07g1BBcwIBAg==
temp_client_cert = File.join(__dir__, "invalid_client.pem")
with_configured_fetcher(
":ssl_ca_cert: #{temp_ca_cert}\n" +
":ssl_ca_cert: #{temp_ca_cert}\n" \
":ssl_client_cert: #{temp_client_cert}\n"
) do |fetcher|
assert_raise Gem::RemoteFetcher::FetchError do

View File

@ -172,7 +172,7 @@ class TestGemSecurity < Gem::TestCase
extension.oid == "subjectAltName"
end
assert_equal "#{child_alt_name.value} is not self-signed, contact " +
assert_equal "#{child_alt_name.value} is not self-signed, contact " \
"#{ALTERNATE_CERT.issuer} to obtain a valid certificate",
e.message
end

View File

@ -105,8 +105,8 @@ class TestGemSecurityPolicy < Gem::TestCase
@chain.check_chain chain, Time.now
end
assert_equal "invalid signing chain: " +
"certificate #{INVALIDCHILD_CERT.subject} " +
assert_equal "invalid signing chain: " \
"certificate #{INVALIDCHILD_CERT.subject} " \
"was not issued by #{CHILD_CERT.subject}", e.message
end
@ -127,7 +127,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@low.check_cert EXPIRED_CERT, nil, Time.now
end
assert_equal "certificate #{EXPIRED_CERT.subject} " +
assert_equal "certificate #{EXPIRED_CERT.subject} " \
"not valid after #{EXPIRED_CERT.not_after}",
e.message
end
@ -137,7 +137,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@low.check_cert FUTURE_CERT, nil, Time.now
end
assert_equal "certificate #{FUTURE_CERT.subject} " +
assert_equal "certificate #{FUTURE_CERT.subject} " \
"not valid before #{FUTURE_CERT.not_before}",
e.message
end
@ -147,7 +147,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@low.check_cert INVALID_ISSUER_CERT, PUBLIC_CERT, Time.now
end
assert_equal "certificate #{INVALID_ISSUER_CERT.subject} " +
assert_equal "certificate #{INVALID_ISSUER_CERT.subject} " \
"was not issued by #{PUBLIC_CERT.subject}",
e.message
end
@ -183,7 +183,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@almost_no.check_key(PUBLIC_CERT, ALTERNATE_KEY)
end
assert_equal "certificate #{PUBLIC_CERT.subject} " +
assert_equal "certificate #{PUBLIC_CERT.subject} " \
"does not match the signing key", e.message
end
@ -208,7 +208,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@chain.check_root chain, Time.now
end
assert_equal "certificate #{INVALID_SIGNER_CERT.subject} " +
assert_equal "certificate #{INVALID_SIGNER_CERT.subject} " \
"was not issued by #{INVALID_SIGNER_CERT.issuer}",
e.message
end
@ -220,7 +220,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@chain.check_root chain, Time.now
end
assert_equal "root certificate #{INVALID_ISSUER_CERT.subject} " +
assert_equal "root certificate #{INVALID_ISSUER_CERT.subject} " \
"is not self-signed (issuer #{INVALID_ISSUER_CERT.issuer})",
e.message
end
@ -260,7 +260,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@high.check_trust [WRONG_KEY_CERT], @digest, @trust_dir
end
assert_equal "trusted root certificate #{PUBLIC_CERT.subject} checksum " +
assert_equal "trusted root certificate #{PUBLIC_CERT.subject} checksum " \
"does not match signing root certificate checksum", e.message
end
@ -285,7 +285,7 @@ class TestGemSecurityPolicy < Gem::TestCase
@high.check_trust [PUBLIC_CERT, CHILD_CERT], @digest, @trust_dir
end
assert_equal "root cert #{PUBLIC_CERT.subject} is not trusted " +
assert_equal "root cert #{PUBLIC_CERT.subject} is not trusted " \
"(root of signing cert #{CHILD_CERT.subject})", e.message
end

View File

@ -1540,7 +1540,7 @@ dependencies: []
refute @ext.contains_requirable_file? "nonexistent"
end
expected = "Ignoring ext-1 because its extensions are not built. " +
expected = "Ignoring ext-1 because its extensions are not built. " \
"Try: gem pristine ext --version 1\n"
assert_equal expected, err

View File

@ -72,7 +72,7 @@ class TestStubSpecification < Gem::TestCase
refute stub.contains_requirable_file? "nonexistent"
end
expected = "Ignoring stub_e-2 because its extensions are not built. " +
expected = "Ignoring stub_e-2 because its extensions are not built. " \
"Try: gem pristine stub_e --version 2\n"
assert_equal expected, err