diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-09-23 21:59:35 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-09-23 22:01:44 +0900 |
commit | b717f73402dc6f2d6ba6a1d72d9c8543a4f2cd27 () | |
tree | 9d4a4c198aa124592552c66e2a3e6d130b6486eb /lib/rubygems/commands | |
parent | a46841612c846f00f31ff63d886620d66cdea5b3 (diff) |
Revert "Manually merged from https://.com/rubygems/rubygems/pull/2636"
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://.com/rubygems/rubygems/pull/3820
35 files changed, 0 insertions, 70 deletions
@@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/package' class Gem::Commands::BuildCommand < Gem::Command - def initialize super 'build', 'Build a gem from a gemspec' @@ -108,5 +107,4 @@ Gems can be saved to a specified filename with the output option: terminate_interaction 1 end end - end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/security' class Gem::Commands::CertCommand < Gem::Command - def initialize super 'cert', 'Manage RubyGems certificates and signing settings', :add => [], :remove => [], :list => [], :build => [], :sign => [] @@ -312,5 +311,4 @@ For further reading on signing gems see `ri Gem::Security`. # It's simple, but is all we need email =~ /\A.+@.+\z/ end - end if defined?(OpenSSL::SSL) @@ -5,7 +5,6 @@ require 'rubygems/validator' require 'rubygems/doctor' class Gem::Commands::CheckCommand < Gem::Command - include Gem::VersionOption def initialize @@ -90,5 +89,4 @@ specifications and will clean up gems that have been partially uninstalled. def usage # :nodoc: "#{program_name} [OPTIONS] [GEMNAME ...]" end - end @@ -4,7 +4,6 @@ require 'rubygems/dependency_list' require 'rubygems/uninstaller' class Gem::Commands::CleanupCommand < Gem::Command - def initialize super 'cleanup', 'Clean up old versions of installed gems', @@ -181,5 +180,4 @@ If no gems are named all gems in GEM_HOME are cleaned. # Restore path Gem::Uninstaller may have changed Gem.use_paths @original_home, *@original_path end - end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/version_option' class Gem::Commands::ContentsCommand < Gem::Command - include Gem::VersionOption def initialize @@ -186,5 +185,4 @@ prefix or only the files that are requireable. [i, File.join(i, "specifications")] end.flatten end - end @@ -4,7 +4,6 @@ require 'rubygems/local_remote_options' require 'rubygems/version_option' class Gem::Commands::DependencyCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::VersionOption @@ -215,5 +214,4 @@ use with other commands. /\A#{Regexp.union(*args)}/ end end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::EnvironmentCommand < Gem::Command - def initialize super 'environment', 'Display information about the RubyGems environment' end @@ -172,5 +171,4 @@ lib/rubygems/defaults/operating_system.rb return nil end - end @@ -4,7 +4,6 @@ require 'rubygems/local_remote_options' require 'rubygems/version_option' class Gem::Commands::FetchCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::VersionOption @@ -73,5 +72,4 @@ then repackaging it. say "Downloaded #{spec.full_name}" end end - end @@ -8,7 +8,6 @@ require 'rubygems/indexer' # See `gem help generate_index` class Gem::Commands::GenerateIndexCommand < Gem::Command - def initialize super 'generate_index', 'Generates the index files for a gem server directory', @@ -83,5 +82,4 @@ Marshal::MINOR_VERSION constants. It is used to ensure compatibility. end end end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::HelpCommand < Gem::Command - # :stopdoc: EXAMPLES = <<-EOF.freeze Some examples of 'gem' usage. @@ -370,5 +369,4 @@ platform. alert_warning "Unknown command #{command_name}. Try: gem help commands" end end - end @@ -4,7 +4,6 @@ require 'rubygems/command' require 'rubygems/query_utils' class Gem::Commands::InfoCommand < Gem::Command - include Gem::QueryUtils def initialize @@ -36,5 +35,4 @@ class Gem::Commands::InfoCommand < Gem::Command def defaults_str "--local" end - end @@ -12,7 +12,6 @@ require 'rubygems/version_option' # See `gem help install` class Gem::Commands::InstallCommand < Gem::Command - attr_reader :installed_specs # :nodoc: include Gem::VersionOption @@ -270,5 +269,4 @@ You can use `i` command instead of `install`. gems = @installed_specs.length == 1 ? 'gem' : 'gems' say "#{@installed_specs.length} #{gems} installed" end - end @@ -6,7 +6,6 @@ require 'rubygems/query_utils' # Searches for gems starting with the supplied argument. class Gem::Commands::ListCommand < Gem::Command - include Gem::QueryUtils def initialize @@ -39,5 +38,4 @@ To search for remote gems use the search command. def usage # :nodoc: "#{program_name} [REGEXP ...]" end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::LockCommand < Gem::Command - def initialize super 'lock', 'Generate a lockdown list of gems', :strict => false @@ -106,5 +105,4 @@ lock it down to the exact version. gemspecs.find {|path| File.exist? path } end - end @@ -3,7 +3,6 @@ require 'rubygems/command' unless defined? Gem::Commands::MirrorCommand class Gem::Commands::MirrorCommand < Gem::Command - def initialize super('mirror', 'Mirror all gem files (requires rubygems-mirror)') begin @@ -22,6 +21,5 @@ The mirror command has been moved to the rubygems-mirror gem. def execute alert_error "Install the rubygems-mirror gem for the mirror command" end - end end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/version_option' class Gem::Commands::OpenCommand < Gem::Command - include Gem::VersionOption def initialize @@ -82,5 +81,4 @@ class Gem::Commands::OpenCommand < Gem::Command say "Unable to find gem '#{name}'" end - end @@ -5,7 +5,6 @@ require 'rubygems/spec_fetcher' require 'rubygems/version_option' class Gem::Commands::OutdatedCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::VersionOption @@ -30,5 +29,4 @@ update the gems with the update or install commands. say "#{spec.name} (#{spec.version} < #{remote_version})" end end - end @@ -5,7 +5,6 @@ require 'rubygems/gemcutter_utilities' require 'rubygems/text' class Gem::Commands::OwnerCommand < Gem::Command - include Gem::Text include Gem::LocalRemoteOptions include Gem::GemcutterUtilities @@ -109,5 +108,4 @@ permission to. request.add_field "OTP", options[:otp] if options[:otp] end end - end @@ -5,7 +5,6 @@ require 'rubygems/installer' require 'rubygems/version_option' class Gem::Commands::PristineCommand < Gem::Command - include Gem::VersionOption def initialize @@ -188,5 +187,4 @@ extensions will be restored. say "Restored #{spec.full_name}" end end - end @@ -5,7 +5,6 @@ require 'rubygems/gemcutter_utilities' require 'rubygems/package' class Gem::Commands::PushCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::GemcutterUtilities @@ -104,5 +103,4 @@ The push command will use ~/.gem/credentials to authenticate to a server, but yo gem_metadata["allowed_push_host"] ] end - end @@ -4,7 +4,6 @@ require 'rubygems/query_utils' require 'rubygems/deprecate' class Gem::Commands::QueryCommand < Gem::Command - extend Gem::Deprecate rubygems_deprecate_command @@ -24,5 +23,4 @@ class Gem::Commands::QueryCommand < Gem::Command add_query_options end - end @@ -5,7 +5,6 @@ require 'rubygems/rdoc' require 'fileutils' class Gem::Commands::RdocCommand < Gem::Command - include Gem::VersionOption def initialize @@ -93,5 +92,4 @@ Use --overwrite to force rebuilding of documentation. end end end - end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/query_utils' class Gem::Commands::SearchCommand < Gem::Command - include Gem::QueryUtils def initialize @@ -38,5 +37,4 @@ To list local gems use the list command. def usage # :nodoc: "#{program_name} [REGEXP]" end - end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/server' class Gem::Commands::ServerCommand < Gem::Command - def initialize super 'server', 'Documentation and gem repository HTTP server', :port => 8808, :gemdir => [], :daemon => false @@ -82,5 +81,4 @@ You can set up a shortcut to gem server documentation using the URL: options[:gemdir] = Gem.path if options[:gemdir].empty? Gem::Server.run options end - end @@ -6,7 +6,6 @@ require 'rubygems/command' # RubyGems checkout or tarball. class Gem::Commands::SetupCommand < Gem::Command - HISTORY_HEADER = /^===\s*[\d.a-zA-Z]+\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze VERSION_MATCHER = /^===\s*([\d.a-zA-Z]+)\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze @@ -736,5 +735,4 @@ abort "#{deprecation_message}" def bin_file_names @bin_file_names ||= [] end - end @@ -3,7 +3,6 @@ require 'rubygems/command' require 'rubygems/gemcutter_utilities' class Gem::Commands::SigninCommand < Gem::Command - include Gem::GemcutterUtilities def initialize @@ -31,5 +30,4 @@ class Gem::Commands::SigninCommand < Gem::Command def execute sign_in options[:host] end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::SignoutCommand < Gem::Command - def initialize super 'signout', 'Sign out from all the current sessions.' end @@ -29,5 +28,4 @@ class Gem::Commands::SignoutCommand < Gem::Command say 'You have successfully signed out from all sessions.' end end - end @@ -5,7 +5,6 @@ require 'rubygems/spec_fetcher' require 'rubygems/local_remote_options' class Gem::Commands::SourcesCommand < Gem::Command - include Gem::LocalRemoteOptions def initialize @@ -220,5 +219,4 @@ To remove a source use the --remove argument: say "*** Unable to remove #{desc} source cache ***" end end - end @@ -5,7 +5,6 @@ require 'rubygems/version_option' require 'rubygems/package' class Gem::Commands::SpecificationCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::VersionOption @@ -143,5 +142,4 @@ Specific fields in the specification can be extracted in YAML format: say "\n" end end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::StaleCommand < Gem::Command - def initialize super('stale', 'List gems along with access times') end @@ -37,5 +36,4 @@ longer using. say "#{name} at #{atime.strftime '%c'}" end end - end @@ -10,7 +10,6 @@ require 'fileutils' # See `gem help uninstall` class Gem::Commands::UninstallCommand < Gem::Command - include Gem::VersionOption def initialize @@ -195,5 +194,4 @@ that is a dependency of an existing gem. You can use the def uninstall(gem_name) Gem::Uninstaller.new(gem_name, options).uninstall end - end @@ -13,7 +13,6 @@ module Gem::Security # :nodoc: end class Gem::Commands::UnpackCommand < Gem::Command - include Gem::VersionOption include Gem::SecurityOption @@ -173,5 +172,4 @@ command help for an example. path end - end @@ -10,7 +10,6 @@ require 'rubygems/install_message' # must come before rdoc for messaging require 'rubygems/rdoc' class Gem::Commands::UpdateCommand < Gem::Command - include Gem::InstallUpdateOptions include Gem::LocalRemoteOptions include Gem::VersionOption @@ -310,5 +309,4 @@ command to remove old versions. result end - end @@ -2,7 +2,6 @@ require 'rubygems/command' class Gem::Commands::WhichCommand < Gem::Command - def initialize super 'which', 'Find the location of a library file you can require', :search_gems_first => false, :show_all => false @@ -85,5 +84,4 @@ requiring to see why it does not behave as you expect. def usage # :nodoc: "#{program_name} FILE [FILE ...]" end - end @@ -5,7 +5,6 @@ require 'rubygems/version_option' require 'rubygems/gemcutter_utilities' class Gem::Commands::YankCommand < Gem::Command - include Gem::LocalRemoteOptions include Gem::VersionOption include Gem::GemcutterUtilities @@ -97,5 +96,4 @@ data you will need to change them immediately and yank your gem. def get_platform_from_requirements(requirements) Gem.platforms[1].to_s if requirements.key? :added_platform end - end |