summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/query_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/query_command.rb')
-rw-r--r--lib/rubygems/commands/query_command.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/rubygems/commands/query_command.rb b/lib/rubygems/commands/query_command.rb
index 5896bec44e..3b527974a3 100644
--- a/lib/rubygems/commands/query_command.rb
+++ b/lib/rubygems/commands/query_command.rb
@@ -1,7 +1,8 @@
# frozen_string_literal: true
-require_relative '../command'
-require_relative '../query_utils'
-require_relative '../deprecate'
+
+require_relative "../command"
+require_relative "../query_utils"
+require_relative "../deprecate"
class Gem::Commands::QueryCommand < Gem::Command
extend Gem::Deprecate
@@ -9,7 +10,7 @@ class Gem::Commands::QueryCommand < Gem::Command
include Gem::QueryUtils
- alias warning_without_suggested_alternatives deprecation_warning
+ alias_method :warning_without_suggested_alternatives, :deprecation_warning
def deprecation_warning
warning_without_suggested_alternatives
@@ -17,15 +18,14 @@ class Gem::Commands::QueryCommand < Gem::Command
alert_warning message unless Gem::Deprecate.skip
end
- def initialize(name = 'query',
- summary = 'Query gem information in local or remote repositories')
+ def initialize(name = "query", summary = "Query gem information in local or remote repositories")
super name, summary,
- :name => //, :domain => :local, :details => false, :versions => true,
- :installed => nil, :version => Gem::Requirement.default
+ domain: :local, details: false, versions: true,
+ installed: nil, version: Gem::Requirement.default
- add_option('-n', '--name-matches REGEXP',
- 'Name of gem(s) to query on matches the',
- 'provided REGEXP') do |value, options|
+ add_option("-n", "--name-matches REGEXP",
+ "Name of gem(s) to query on matches the",
+ "provided REGEXP") do |value, options|
options[:name] = /#{value}/i
end