From 4bb5ce8188c7623106d124d3398c6b73bfa8ecd4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 16 Mar 2023 13:00:54 +0900 Subject: [rubygems/rubygems] util/rubocop -A --only Style/StringLiteralsInInterpolation https://github.com/rubygems/rubygems/commit/cb554f6eb7 --- lib/rubygems/commands/cleanup_command.rb | 2 +- lib/rubygems/commands/contents_command.rb | 2 +- lib/rubygems/commands/help_command.rb | 4 ++-- lib/rubygems/commands/owner_command.rb | 2 +- lib/rubygems/commands/setup_command.rb | 2 +- lib/rubygems/commands/stale_command.rb | 2 +- lib/rubygems/commands/update_command.rb | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/rubygems/commands') diff --git a/lib/rubygems/commands/cleanup_command.rb b/lib/rubygems/commands/cleanup_command.rb index beeb9b161f..86c61bc336 100644 --- a/lib/rubygems/commands/cleanup_command.rb +++ b/lib/rubygems/commands/cleanup_command.rb @@ -89,7 +89,7 @@ If no gems are named all gems in GEM_HOME are cleaned. verbose do skipped = @default_gems.map {|spec| spec.full_name } - "Skipped default gems: #{skipped.join ', '}" + "Skipped default gems: #{skipped.join ", "}" end end diff --git a/lib/rubygems/commands/contents_command.rb b/lib/rubygems/commands/contents_command.rb index c5fdfca31e..314b50e93e 100644 --- a/lib/rubygems/commands/contents_command.rb +++ b/lib/rubygems/commands/contents_command.rb @@ -91,7 +91,7 @@ prefix or only the files that are requireable. def files_in_gem(spec) gem_path = spec.full_gem_path - extra = "/{#{spec.require_paths.join ','}}" if options[:lib_only] + extra = "/{#{spec.require_paths.join ","}}" if options[:lib_only] glob = "#{gem_path}#{extra}/**/*" prefix_re = /#{Regexp.escape(gem_path)}\// diff --git a/lib/rubygems/commands/help_command.rb b/lib/rubygems/commands/help_command.rb index bf4ffefbb7..a4d9f39d9a 100644 --- a/lib/rubygems/commands/help_command.rb +++ b/lib/rubygems/commands/help_command.rb @@ -327,7 +327,7 @@ platform. summary_width = 80 - margin_width - desc_width wrap_indent = " " * (margin_width + desc_width) - format = "#{' ' * margin_width}%-#{desc_width}s%s" + format = "#{" " * margin_width}%-#{desc_width}s%s" @command_manager.command_names.each do |cmd_name| command = @command_manager[cmd_name] @@ -366,7 +366,7 @@ platform. command = @command_manager[possibilities.first] command.invoke("--help") elsif possibilities.size > 1 - alert_warning "Ambiguous command #{command_name} (#{possibilities.join(', ')})" + alert_warning "Ambiguous command #{command_name} (#{possibilities.join(", ")})" else alert_warning "Unknown command #{command_name}. Try: gem help commands" end diff --git a/lib/rubygems/commands/owner_command.rb b/lib/rubygems/commands/owner_command.rb index 959a6186dc..0ef8c45e97 100644 --- a/lib/rubygems/commands/owner_command.rb +++ b/lib/rubygems/commands/owner_command.rb @@ -78,7 +78,7 @@ permission to. say "Owners for gem: #{name}" owners.each do |owner| - say "- #{owner['email'] || owner['handle'] || owner['id']}" + say "- #{owner["email"] || owner["handle"] || owner["id"]}" end end end diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb index 5b3284382f..efc387a69f 100644 --- a/lib/rubygems/commands/setup_command.rb +++ b/lib/rubygems/commands/setup_command.rb @@ -133,7 +133,7 @@ prefix and suffix. If ruby was installed as `ruby18`, gem will be installed as `gem18`. By default, this RubyGems will install gem as: - #{Gem.default_exec_format % 'gem'} + #{Gem.default_exec_format % "gem"} EOF end diff --git a/lib/rubygems/commands/stale_command.rb b/lib/rubygems/commands/stale_command.rb index 0246f42e3e..9468fce3f4 100644 --- a/lib/rubygems/commands/stale_command.rb +++ b/lib/rubygems/commands/stale_command.rb @@ -33,7 +33,7 @@ longer using. end gem_to_atime.sort_by {|_, atime| atime }.each do |name, atime| - say "#{name} at #{atime.strftime '%c'}" + say "#{name} at #{atime.strftime "%c"}" end end end diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 6d2a42162e..1801d8be28 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -127,10 +127,10 @@ command to remove old versions. if updated.empty? say "Nothing to update" else - say "Gems updated: #{updated_names.join(' ')}" + say "Gems updated: #{updated_names.join(" ")}" end - say "Gems already up-to-date: #{up_to_date_names.join(' ')}" unless up_to_date_names.empty? - say "Gems not currently installed: #{not_installed_names.join(' ')}" unless not_installed_names.empty? + say "Gems already up-to-date: #{up_to_date_names.join(" ")}" unless up_to_date_names.empty? + say "Gems not currently installed: #{not_installed_names.join(" ")}" unless not_installed_names.empty? end def fetch_remote_gems(spec) # :nodoc: -- cgit v1.2.3