diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-03-16 12:21:48 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-03-17 18:50:55 +0900 |
commit | b304cf324aed40977665ddcfcec7cc992feb949b (patch) | |
tree | 985f0c5428a72efe11e57445078f69b0177254c4 /lib | |
parent | 03736159484cb7f9eeaaed3737beec924a175679 (diff) |
util/rubocop -A --only Layout/ParameterAlignment
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/query_command.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/security.rb | 12 | ||||
-rw-r--r-- | lib/rubygems/security/policy.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/source/local.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/user_interaction.rb | 6 |
5 files changed, 9 insertions, 18 deletions
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index 9d57d0c87e..16e94e626a 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -17,8 +17,7 @@ class Gem::Commands::QueryCommand < Gem::Command alert_warning message unless Gem::Deprecate.skip end - def initialize(name = "query", - summary = "Query gem information in local or remote repositories") + def initialize(name = "query", summary = "Query gem information in local or remote repositories") super name, summary, :domain => :local, :details => false, :versions => true, :installed => nil, :version => Gem::Requirement.default diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb index ab28106056..d92b292b9a 100644 --- a/lib/rubygems/security.rb +++ b/lib/rubygems/security.rb @@ -397,8 +397,7 @@ module Gem::Security # # The +extensions+ restrict the key to the indicated uses. - def self.create_cert(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, - serial = 1) + def self.create_cert(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1) cert = OpenSSL::X509::Certificate.new cert.public_key = get_public_key(key) @@ -449,8 +448,7 @@ module Gem::Security # Creates a self-signed certificate with an issuer and subject of +subject+ # and the given +extensions+ for the +key+. - def self.create_cert_self_signed(subject, key, age = ONE_YEAR, - extensions = EXTENSIONS, serial = 1) + def self.create_cert_self_signed(subject, key, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1) certificate = create_cert subject, key, age, extensions sign certificate, key, certificate, age, extensions, serial @@ -506,8 +504,7 @@ module Gem::Security #-- # TODO increment serial - def self.re_sign(expired_certificate, private_key, age = ONE_YEAR, - extensions = EXTENSIONS) + def self.re_sign(expired_certificate, private_key, age = ONE_YEAR, extensions = EXTENSIONS) raise Gem::Security::Exception, "incorrect signing key for re-signing " + expired_certificate.subject.to_s unless @@ -543,8 +540,7 @@ module Gem::Security # # Returns the newly signed certificate. - def self.sign(certificate, signing_key, signing_cert, - age = ONE_YEAR, extensions = EXTENSIONS, serial = 1) + def self.sign(certificate, signing_key, signing_cert, age = ONE_YEAR, extensions = EXTENSIONS, serial = 1) signee_subject = certificate.subject signee_key = certificate.public_key diff --git a/lib/rubygems/security/policy.rb b/lib/rubygems/security/policy.rb index d4449d670d..a96129b948 100644 --- a/lib/rubygems/security/policy.rb +++ b/lib/rubygems/security/policy.rb @@ -205,8 +205,7 @@ class Gem::Security::Policy # # If +key+ is given it is used to validate the signing certificate. - def verify(chain, key = nil, digests = {}, signatures = {}, - full_name = "(unknown)") + def verify(chain, key = nil, digests = {}, signatures = {}, full_name = "(unknown)") if signatures.empty? if @only_signed raise Gem::Security::Exception, diff --git a/lib/rubygems/source/local.rb b/lib/rubygems/source/local.rb index fdbef38e89..e8553a4289 100644 --- a/lib/rubygems/source/local.rb +++ b/lib/rubygems/source/local.rb @@ -73,8 +73,7 @@ class Gem::Source::Local < Gem::Source end end - def find_gem(gem_name, version = Gem::Requirement.default, # :nodoc: - prerelease = false) + def find_gem(gem_name, version = Gem::Requirement.default, prerelease = false) # :nodoc: load_specs :complete found = [] diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb index 45b57ef33e..12592e4db2 100644 --- a/lib/rubygems/user_interaction.rb +++ b/lib/rubygems/user_interaction.rb @@ -424,8 +424,7 @@ class Gem::StreamUI # +size+ items. Shows the given +initial_message+ when progress starts # and the +terminal_message+ when it is complete. - def initialize(out_stream, size, initial_message, - terminal_message = "complete") + def initialize(out_stream, size, initial_message, terminal_message = "complete") @out = out_stream @total = size @count = 0 @@ -467,8 +466,7 @@ class Gem::StreamUI # +size+ items. Shows the given +initial_message+ when progress starts # and the +terminal_message+ when it is complete. - def initialize(out_stream, size, initial_message, - terminal_message = "complete") + def initialize(out_stream, size, initial_message, terminal_message = "complete") @out = out_stream @total = size @count = 0 |