@@ -506,7 +506,7 @@ def start(given_args = ARGV, config = {})
506506 #
507507 def public_command ( *names )
508508 names . each do |name |
509- class_eval "def #{ name } (*); super end"
509+ class_eval "def #{ name } (*); super end" , __FILE__ , __LINE__
510510 end
511511 end
512512 alias_method :public_task , :public_command
@@ -558,8 +558,7 @@ def print_options(shell, options, group_name = nil)
558558 return if options . empty?
559559
560560 list = [ ]
561- padding = options . map { |o | o . aliases . size } . max . to_i * 4
562-
561+ padding = options . map { |o | o . aliases_for_usage . size } . max . to_i
563562 options . each do |option |
564563 next if option . hide
565564 item = [ option . usage ( padding ) ]
@@ -610,15 +609,15 @@ def build_options(options, scope) #:nodoc:
610609 def find_and_refresh_command ( name ) #:nodoc:
611610 if commands [ name . to_s ]
612611 commands [ name . to_s ]
613- elsif command = all_commands [ name . to_s ] # rubocop:disable AssignmentInCondition
612+ elsif command = all_commands [ name . to_s ] # rubocop:disable Lint/ AssignmentInCondition
614613 commands [ name . to_s ] = command . clone
615614 else
616615 raise ArgumentError , "You supplied :for => #{ name . inspect } , but the command #{ name . inspect } could not be found."
617616 end
618617 end
619618 alias_method :find_and_refresh_task , :find_and_refresh_command
620619
621- # Everytime someone inherits from a Bundler::Thor class, register the klass
620+ # Every time someone inherits from a Bundler::Thor class, register the klass
622621 # and file into baseclass.
623622 def inherited ( klass )
624623 super ( klass )
0 commit comments