File tree Expand file tree Collapse file tree 3 files changed +22
-35
lines changed
Expand file tree Collapse file tree 3 files changed +22
-35
lines changed Original file line number Diff line number Diff line change 77
88class Gem ::Commands ::ListCommand < Gem ::Commands ::QueryCommand
99
10- def initialize ( name = 'list' ,
11- summary = 'Display gems whose name starts with STRING' )
12- super name , summary
10+ def initialize
11+ super 'list' , 'Display gems whose name starts with STRING'
1312
1413 remove_option ( '--name-matches' )
1514 end
@@ -27,9 +26,8 @@ def usage # :nodoc:
2726 end
2827
2928 def execute
30- name = get_one_optional_argument || ''
31- options [ :name ] = /^#{ name } /i
32-
29+ string = get_one_optional_argument || ''
30+ options [ :name ] = /^#{ string } /i
3331 super
3432 end
3533
Original file line number Diff line number Diff line change 11require 'rubygems/command'
2- require 'rubygems/commands/list_command '
2+ require 'rubygems/commands/query_command '
33
4- class Gem ::Commands ::SearchCommand < Gem ::Commands ::ListCommand
4+ class Gem ::Commands ::SearchCommand < Gem ::Commands ::QueryCommand
55
66 def initialize
77 super 'search' , 'Display all gems whose name contains STRING'
88
9- @defaults [ :domain ] = :remote
9+ remove_option '--name-matches'
10+ end
11+
12+ def arguments # :nodoc:
13+ "STRING fragment of gem name to search for"
1014 end
1115
1216 def defaults_str # :nodoc:
13- "--remote --no-details"
17+ "--local --no-details"
18+ end
19+
20+ def usage # :nodoc:
21+ "#{ program_name } [STRING]"
22+ end
23+
24+ def execute
25+ string = get_one_optional_argument
26+ options [ :name ] = /#{ string } /i
27+ super
1428 end
1529
1630end
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments