aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/commands/query_command.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 16:33:39 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-08 17:30:02 +0900
commit4aca77edde91f826aa243e268bf1ef5214530583 (patch)
treeef0cf1a95fcced00ca5fa40f3412c567bf95d705 /lib/rubygems/commands/query_command.rb
parent6a6a24df9b72750d12f9b15192bdb7517e668efb (diff)
downloadruby-4aca77edde91f826aa243e268bf1ef5214530583.tar.gz
Merge prepare version of RubyGems 3.2.0
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r--lib/rubygems/commands/query_command.rb17
1 files changed, 17 insertions, 0 deletions
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