aux/picky/cli.rb in picky-4.0.0pre1 vs aux/picky/cli.rb in picky-4.0.0pre2

- old
+ new

@@ -36,11 +36,15 @@ # Displays usage information. # def execute name, args, params commands = Picky::CLI.mapping.map do |command, object_and_params| _, *params = object_and_params - " picky #{command} #{params_to_s(params)}" + ary = [] + ary << " picky" + ary << command + ary << params_to_s(params) unless params.empty? + ary.join ' ' end.join(?\n) Kernel.puts "Possible commands:\n#{commands}\n" end end @@ -101,10 +105,10 @@ # Maps commands to the other gem's command. # # TODO Try to load the other gems and get the commands dynamically. # @@mapping = { - :generate => [Generate, :'{client,server,sinatra_client,unicorn_server,all_in_one}', :'app_directory_name'], + :generate => [Generate, :'{client,server,all_in_one}', :'app_directory_name'], :help => [Help], :live => [Live, 'host:port/path (default: localhost:8080/admin)', 'port (default: 4568)'], :search => [Search, :url_or_path, 'amount of ids (default 20)'], :stats => [Statistics, :'logfile (e.g. log/search.log)', 'port (default: 4567)'] } \ No newline at end of file