From 4aca77edde91f826aa243e268bf1ef5214530583 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 8 Dec 2020 16:33:39 +0900 Subject: Merge prepare version of RubyGems 3.2.0 --- lib/rubygems/commands/query_command.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/rubygems/commands/query_command.rb') diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb index 406a34e549..789afd6509 100644 --- a/lib/rubygems/commands/query_command.rb +++ b/lib/rubygems/commands/query_command.rb @@ -9,6 +9,14 @@ class Gem::Commands::QueryCommand < Gem::Command include Gem::QueryUtils + alias warning_without_suggested_alternatives deprecation_warning + def deprecation_warning + warning_without_suggested_alternatives + + message = "It is recommended that you use `gem search` or `gem list` instead.\n" + alert_warning message unless Gem::Deprecate.skip + end + def initialize(name = 'query', summary = 'Query gem information in local or remote repositories') super name, summary, @@ -23,4 +31,13 @@ class Gem::Commands::QueryCommand < Gem::Command add_query_options end + + def description # :nodoc: + <<-EOF +The query command is the basis for the list and search commands. + +You should really use the list and search commands instead. This command +is too hard to use. + EOF + end end -- cgit v1.2.3