diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-06 05:26:46 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-06 05:26:46 +0000 |
commit | 80ba379c242ce1d92005403423717cf0f74a74db (patch) | |
tree | 205b9150a8833779a3b9607ec8e5c7b5cd1ecce3 /lib | |
parent | afae107a4c969845c58985159a0ce51f80e920ca (diff) | |
download | ruby-80ba379c242ce1d92005403423717cf0f74a74db.tar.gz |
* lib/rubygems/command_manager.rb: Removed string concatenation
syntax. [Bug #6265]
* lib/rubygems/commands/install_command.rb: ditto
* lib/rubygems/commands/uninstall_command.rb: ditto
* lib/rubygems/indexer.rb: ditto
* lib/rubygems/security/policy.rb: ditto
* lib/rubygems/security.rb: ditto
* lib/rubygems/uninstaller.rb: ditto
* test/rubygems/test_gem_commands_cert_command.rb: ditto
* test/rubygems/test_gem_package.rb: ditto
* test/rubygems/test_gem_security.rb: ditto
* test/rubygems/test_gem_security_policy.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/command_manager.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/commands/install_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/uninstall_command.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/indexer.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/security.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/security/policy.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/uninstaller.rb | 4 |
7 files changed, 14 insertions, 15 deletions
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb index e39c509ef9..2af582177d 100644 --- a/lib/rubygems/command_manager.rb +++ b/lib/rubygems/command_manager.rb @@ -176,8 +176,7 @@ class Gem::CommandManager if possibilities.size > 1 then raise Gem::CommandLineError, - "Ambiguous command #{cmd_name} " \ - "matches [#{possibilities.join(', ')}]" + "Ambiguous command #{cmd_name} matches [#{possibilities.join(', ')}]" elsif possibilities.empty? then raise Gem::CommandLineError, "Unknown command #{cmd_name}" end diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb index 883526c2a5..0b58fa665e 100644 --- a/lib/rubygems/commands/install_command.rb +++ b/lib/rubygems/commands/install_command.rb @@ -48,7 +48,7 @@ class Gem::Commands::InstallCommand < Gem::Command end def defaults_str # :nodoc: - "--both --version '#{Gem::Requirement.default}' --document --no-force\n" \ + "--both --version '#{Gem::Requirement.default}' --document --no-force\n" + "--install-dir #{Gem.dir}" end diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb index 736574ddff..56aa8ee57f 100644 --- a/lib/rubygems/commands/uninstall_command.rb +++ b/lib/rubygems/commands/uninstall_command.rb @@ -76,8 +76,8 @@ class Gem::Commands::UninstallCommand < Gem::Command end def defaults_str # :nodoc: - "--version '#{Gem::Requirement.default}' --no-force " \ - "--install-dir #{Gem.dir}\n" \ + "--version '#{Gem::Requirement.default}' --no-force " + + "--install-dir #{Gem.dir}\n" + "--user-install" end @@ -101,7 +101,7 @@ class Gem::Commands::UninstallCommand < Gem::Command Gem::Uninstaller.new(gem_name, options).uninstall 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}") end end diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb index 77282f27ef..85c90f7d78 100644 --- a/lib/rubygems/indexer.rb +++ b/lib/rubygems/indexer.rb @@ -54,8 +54,8 @@ class Gem::Indexer require 'zlib' unless defined?(Builder::XChar) then - raise "Gem::Indexer requires that the XML Builder library be installed:" \ - "\n\tgem install builder" + raise "Gem::Indexer requires that the XML Builder library be installed:" + + "\n\tgem install builder" end options = { :build_modern => true }.merge options diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb index bec30e9238..2485729488 100644 --- a/lib/rubygems/security.rb +++ b/lib/rubygems/security.rb @@ -463,7 +463,7 @@ module Gem::Security def self.re_sign expired_certificate, private_key, age = ONE_YEAR, extensions = EXTENSIONS raise Gem::Security::Exception, - "incorrect signing key for re-signing " \ + "incorrect signing key for re-signing " + "#{expired_certificate.subject}" unless expired_certificate.public_key.to_pem == private_key.public_key.to_pem @@ -473,7 +473,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 diff --git a/lib/rubygems/security/policy.rb b/lib/rubygems/security/policy.rb index d22b7ce5bd..c34b7605c3 100644 --- a/lib/rubygems/security/policy.rb +++ b/lib/rubygems/security/policy.rb @@ -112,7 +112,7 @@ class Gem::Security::Policy root = chain.first 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.to_s != root.subject.to_s # HACK to_s is for ruby 1.8 @@ -144,7 +144,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 @@ -152,7 +152,7 @@ class Gem::Security::Policy end def inspect # :nodoc: - "[Policy: %s - data: %p signer: %p chain: %p root: %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, diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index b1500b0748..77b312177d 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -178,8 +178,8 @@ class Gem::Uninstaller executables = executables.map { |exec| formatted_program_filename exec } remove = if @force_executables.nil? then - 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 |