From 583fbc627c2ad69457e37fc909f7aaf889d53483 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 16 Mar 2023 11:49:24 +0900 Subject: [PATCH] [rubygems/rubygems] util/rubocop -A --only Layout/EmptyLinesAroundModuleBody https://github.com/rubygems/rubygems/commit/48c88466b7 --- lib/rubygems/compatibility.rb | 1 - lib/rubygems/core_ext/kernel_gem.rb | 2 -- lib/rubygems/core_ext/kernel_require.rb | 2 -- lib/rubygems/deprecate.rb | 2 -- lib/rubygems/gemcutter_utilities.rb | 1 - lib/rubygems/install_update_options.rb | 1 - lib/rubygems/installer_uninstaller_utils.rb | 2 -- lib/rubygems/local_remote_options.rb | 2 -- lib/rubygems/mock_gem_ui.rb | 1 - lib/rubygems/query_utils.rb | 2 -- lib/rubygems/safe_yaml.rb | 1 - lib/rubygems/security.rb | 2 -- lib/rubygems/security/policies.rb | 2 -- lib/rubygems/text.rb | 1 - lib/rubygems/user_interaction.rb | 3 --- lib/rubygems/util.rb | 2 -- lib/rubygems/version_option.rb | 1 - test/rubygems/helper.rb | 1 - 18 files changed, 29 deletions(-) diff --git a/lib/rubygems/compatibility.rb b/lib/rubygems/compatibility.rb index b4c1ef16fa..d04ab6483d 100644 --- a/lib/rubygems/compatibility.rb +++ b/lib/rubygems/compatibility.rb @@ -38,5 +38,4 @@ module Gem ConfigMap[key.to_sym] = RbConfig::CONFIG[key] end end - end diff --git a/lib/rubygems/core_ext/kernel_gem.rb b/lib/rubygems/core_ext/kernel_gem.rb index b2f97b9ed9..674d8608af 100644 --- a/lib/rubygems/core_ext/kernel_gem.rb +++ b/lib/rubygems/core_ext/kernel_gem.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true module Kernel - ## # Use Kernel#gem to activate a specific version of +gem_name+. # @@ -66,5 +65,4 @@ module Kernel end private :gem - end diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb index 568ac347b4..94802571a6 100644 --- a/lib/rubygems/core_ext/kernel_require.rb +++ b/lib/rubygems/core_ext/kernel_require.rb @@ -8,7 +8,6 @@ require "monitor" module Kernel - RUBYGEMS_ACTIVATION_MONITOR = Monitor.new # :nodoc: # Make sure we have a reference to Ruby's original Kernel#require @@ -164,5 +163,4 @@ module Kernel end private :require - end diff --git a/lib/rubygems/deprecate.rb b/lib/rubygems/deprecate.rb index 56505512c3..6d700e9be1 100644 --- a/lib/rubygems/deprecate.rb +++ b/lib/rubygems/deprecate.rb @@ -69,7 +69,6 @@ # end module Gem::Deprecate - def self.skip # :nodoc: @skip ||= false end @@ -160,5 +159,4 @@ module Gem::Deprecate end module_function :rubygems_deprecate, :rubygems_deprecate_command, :skip_during - end diff --git a/lib/rubygems/gemcutter_utilities.rb b/lib/rubygems/gemcutter_utilities.rb index 959365e2b1..40098d74bc 100644 --- a/lib/rubygems/gemcutter_utilities.rb +++ b/lib/rubygems/gemcutter_utilities.rb @@ -6,7 +6,6 @@ require_relative "text" # Utility methods for using the RubyGems API. module Gem::GemcutterUtilities - ERROR_CODE = 1 API_SCOPES = %i[index_rubygems push_rubygem yank_rubygem add_owner remove_owner access_webhooks show_dashboard].freeze diff --git a/lib/rubygems/install_update_options.rb b/lib/rubygems/install_update_options.rb index f369183c64..e0d975bf81 100644 --- a/lib/rubygems/install_update_options.rb +++ b/lib/rubygems/install_update_options.rb @@ -195,5 +195,4 @@ module Gem::InstallUpdateOptions def install_update_defaults_str "--document=ri" end - end diff --git a/lib/rubygems/installer_uninstaller_utils.rb b/lib/rubygems/installer_uninstaller_utils.rb index d97b4e29b1..c5c2a52bab 100644 --- a/lib/rubygems/installer_uninstaller_utils.rb +++ b/lib/rubygems/installer_uninstaller_utils.rb @@ -4,7 +4,6 @@ # Helper methods for both Gem::Installer and Gem::Uninstaller module Gem::InstallerUninstallerUtils - def regenerate_plugins_for(spec, plugins_dir) plugins = spec.plugins return if plugins.empty? @@ -25,5 +24,4 @@ module Gem::InstallerUninstallerUtils def remove_plugins_for(spec, plugins_dir) FileUtils.rm_f Gem::Util.glob_files_in_dir("#{spec.name}#{Gem.plugin_suffix_pattern}", plugins_dir) end - end diff --git a/lib/rubygems/local_remote_options.rb b/lib/rubygems/local_remote_options.rb index 2717612a7c..0cf7564ce5 100644 --- a/lib/rubygems/local_remote_options.rb +++ b/lib/rubygems/local_remote_options.rb @@ -12,7 +12,6 @@ require_relative "../rubygems" # Mixin methods for local and remote Gem::Command options. module Gem::LocalRemoteOptions - ## # Allows Gem::OptionParser to handle HTTP URIs. @@ -144,5 +143,4 @@ module Gem::LocalRemoteOptions def remote? options[:domain] == :remote || options[:domain] == :both end - end diff --git a/lib/rubygems/mock_gem_ui.rb b/lib/rubygems/mock_gem_ui.rb index 9cf3469709..d5a0fa2be6 100644 --- a/lib/rubygems/mock_gem_ui.rb +++ b/lib/rubygems/mock_gem_ui.rb @@ -27,7 +27,6 @@ class Gem::MockGemUi < Gem::StreamUI class SystemExitException < RuntimeError; end module TTY - attr_accessor :tty def tty?() diff --git a/lib/rubygems/query_utils.rb b/lib/rubygems/query_utils.rb index 3dc080a649..a3ae79fb3a 100644 --- a/lib/rubygems/query_utils.rb +++ b/lib/rubygems/query_utils.rb @@ -6,7 +6,6 @@ require_relative "version_option" require_relative "text" module Gem::QueryUtils - include Gem::Text include Gem::LocalRemoteOptions include Gem::VersionOption @@ -347,5 +346,4 @@ module Gem::QueryUtils summary = truncate_text(spec.summary, "the summary for #{spec.full_name}") entry << "\n\n" << format_text(summary, 68, 4) end - end diff --git a/lib/rubygems/safe_yaml.rb b/lib/rubygems/safe_yaml.rb index 3a1ae3bcfc..c6135e9eb2 100644 --- a/lib/rubygems/safe_yaml.rb +++ b/lib/rubygems/safe_yaml.rb @@ -1,5 +1,4 @@ module Gem - ### # This module is used for safely loading YAML specs from a gem. The # `safe_load` method defined on this module is specifically designed for diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb index 5dda8fa14f..606cd241f7 100644 --- a/lib/rubygems/security.rb +++ b/lib/rubygems/security.rb @@ -325,7 +325,6 @@ require_relative "openssl" # http://pablotron.org/ module Gem::Security - ## # Gem::Security default exception type @@ -608,7 +607,6 @@ module Gem::Security end reset - end if Gem::HAVE_OPENSSL diff --git a/lib/rubygems/security/policies.rb b/lib/rubygems/security/policies.rb index d28005223e..368a24e95d 100644 --- a/lib/rubygems/security/policies.rb +++ b/lib/rubygems/security/policies.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true module Gem::Security - ## # No security policy: all package signature checks are disabled. @@ -111,5 +110,4 @@ module Gem::Security "HighSecurity" => HighSecurity, # SigningPolicy is not intended for use by `gem -P` so do not list it }.freeze - end diff --git a/lib/rubygems/text.rb b/lib/rubygems/text.rb index be811525f2..1cd466f997 100644 --- a/lib/rubygems/text.rb +++ b/lib/rubygems/text.rb @@ -4,7 +4,6 @@ # A collection of text-wrangling methods module Gem::Text - ## # Remove any non-printable characters and make the text suitable for # printing. diff --git a/lib/rubygems/user_interaction.rb b/lib/rubygems/user_interaction.rb index 8ba1ec7e4f..f22a24a718 100644 --- a/lib/rubygems/user_interaction.rb +++ b/lib/rubygems/user_interaction.rb @@ -13,7 +13,6 @@ require_relative "text" # module will have access to the +ui+ method that returns the default UI. module Gem::DefaultUserInteraction - include Gem::Text ## @@ -68,7 +67,6 @@ module Gem::DefaultUserInteraction def use_ui(new_ui, &block) Gem::DefaultUserInteraction.use_ui(new_ui, &block) end - end ## @@ -91,7 +89,6 @@ end # end module Gem::UserInteraction - include Gem::DefaultUserInteraction ## diff --git a/lib/rubygems/util.rb b/lib/rubygems/util.rb index 05e5788932..b19e22aef9 100644 --- a/lib/rubygems/util.rb +++ b/lib/rubygems/util.rb @@ -5,7 +5,6 @@ require_relative "deprecate" # This module contains various utility methods as module methods. module Gem::Util - ## # Zlib::GzipReader wrapper that unzips +data+. @@ -111,5 +110,4 @@ module Gem::Util path end end - end diff --git a/lib/rubygems/version_option.rb b/lib/rubygems/version_option.rb index a487a0bc24..4dcd2c9266 100644 --- a/lib/rubygems/version_option.rb +++ b/lib/rubygems/version_option.rb @@ -11,7 +11,6 @@ require_relative "../rubygems" # Mixin methods for --version and --platform Gem::Command options. module Gem::VersionOption - ## # Add the --platform option to the option parser. diff --git a/test/rubygems/helper.rb b/test/rubygems/helper.rb index 1fc72e2e41..cf30378f06 100644 --- a/test/rubygems/helper.rb +++ b/test/rubygems/helper.rb @@ -25,7 +25,6 @@ require "benchmark" # stdlib require "rubygems/mock_gem_ui" module Gem - ## # Allows setting the gem path searcher.