diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-04-07 09:15:17 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-04-07 05:13:05 +0000 |
commit | 250e97c0fba48d1f87ccecb1b1e1b4bd2a30c388 () | |
tree | b9018bb2916c2e007b7f57981295e4c4f0fd5adc /lib | |
parent | 84ce6fc87347c15cc81939de2d1872984711a4ed (diff) |
[rubygems/rubygems] util/rubocop -A --only Style/FormatString
https://.com/rubygems/rubygems/commit/132a56569d
-rw-r--r-- | lib/rubygems.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/commands/help_command.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/dependency.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/dependency_list.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/deprecate.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/errors.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/ext/builder.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/package.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/package/tar_header.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/resolver/activation_request.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/resolver/conflict.rb | 12 | ||||
-rw-r--r-- | lib/rubygems/resolver/index_specification.rb | 2 | ||||
-rw-r--r-- | lib/rubygems/resolver/installer_set.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/security/policy.rb | 7 | ||||
-rw-r--r-- | lib/rubygems/source/local.rb | 2 |
15 files changed, 21 insertions, 44 deletions
@@ -948,7 +948,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]} elapsed = Time.now - now - ui.say "%2$*1$s: %3$3.3fs" % [-width, msg, elapsed] if display value end @@ -343,7 +343,7 @@ platform. end summary = wrap(summary, summary_width).split "\n" - out << sprintf(format, cmd_name, summary.shift) until summary.empty? do out << "#{wrap_indent}#{summary.shift}" end @@ -74,11 +74,9 @@ class Gem::Dependency def inspect # :nodoc: if prerelease? - "<%s type=%p name=%p requirements=%p prerelease=ok>" % - [self.class, type, name, requirement.to_s] else - "<%s type=%p name=%p requirements=%p>" % - [self.class, type, name, requirement.to_s] end end @@ -105,7 +105,7 @@ class Gem::DependencyList end def inspect # :nodoc: - "%s %p>" % [super[0..-2], map(&:full_name)] end ## @@ -109,7 +109,7 @@ module Gem::Deprecate msg = [ "NOTE: #{target}#{name} is deprecated", repl == :none ? " with no replacement" : "; use #{repl} instead", - ". It will be removed on or after %4d-%02d." % [year, month], "\n#{target}#{name} called from #{Gem.location_of_caller.join(":")}", ] warn "#{msg.join}." unless Gem::Deprecate.skip @@ -134,11 +134,7 @@ module Gem ## # A wordy description of the error. def wordy - "Found %s (%s), but was for platform%s %s" % - [@name, - @version, - @platforms.size == 1 ? "" : "s", - @platforms.join(" ,")] end end @@ -30,13 +30,13 @@ class Gem::Ext::Builder make_program = Shellwords.split(make_program_name) # The installation of the bundled gems is failed when DESTDIR is empty in mswin platform. - destdir = /\bnmake/i !~ make_program_name || ENV["DESTDIR"] && ENV["DESTDIR"] != "" ? "DESTDIR=%s" % ENV["DESTDIR"] : "" env = [destdir] if sitedir - env << "sitearchdir=%s" % sitedir - env << "sitelibdir=%s" % sitedir end targets.each do |target| @@ -70,15 +70,13 @@ class Gem::Package class PathError < Error def initialize(destination, destination_dir) - super "installing into parent path %s of %s is not allowed" % - [destination, destination_dir] end end class SymlinkError < Error def initialize(name, destination, destination_dir) - super "installing symlink '%s' pointing to parent path %s of %s is not allowed" % - [name, destination, destination_dir] end end @@ -241,6 +241,6 @@ class Gem::Package::TarHeader end def oct(num, len) - "%0#{len}o" % num end end @@ -92,9 +92,7 @@ class Gem::Resolver::ActivationRequest end def inspect # :nodoc: - "#<%s for %p from %s>" % [ - self.class, @spec, @request - ] end ## @@ -64,10 +64,7 @@ class Gem::Resolver::Conflict %s MATCHING - matching = matching % [ - dependency, - alternates.join(", "), - ] end explanation = <<-EXPLANATION @@ -82,12 +79,7 @@ class Gem::Resolver::Conflict %s EXPLANATION - explanation % [ - activated, requirement, - request_path(@activated).reverse.join(", depends on\n "), - request_path(@failed_dep).reverse.join(", depends on\n "), - matching - ] end ## @@ -68,7 +68,7 @@ class Gem::Resolver::IndexSpecification < Gem::Resolver::Specification end def inspect # :nodoc: - "#<%s %s source %s>" % [self.class, full_name, @source] end def pretty_print(q) # :nodoc: @@ -187,9 +187,7 @@ class Gem::Resolver::InstallerSet < Gem::Resolver::Set def inspect # :nodoc: always_install = @always_install.map(&:full_name) - "#<%s domain: %s specs: %p always install: %p>" % [ - self.class, @domain, @specs.keys, always_install - ] end ## @@ -192,11 +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]" % [ - @name, @verify_chain, @verify_data, @verify_root, @verify_signer, - @only_signed, @only_trusted - ] end ## @@ -29,7 +29,7 @@ class Gem::Source::Local < Gem::Source def inspect # :nodoc: keys = @specs ? @specs.keys.sort : "NOT LOADED" - "#<%s specs: %p>" % [self.class, keys] end def load_specs(type) # :nodoc: |