lib/brightbox-cli/commands/servers-show.rb in brightbox-cli-0.18.1 vs lib/brightbox-cli/commands/servers-show.rb in brightbox-cli-1.0.0.rc1

- old
+ new

@@ -1,18 +1,21 @@ module Brightbox - desc 'Show detailed server info' - arg_name 'server-id...' - command [:show] do |c| + command [:servers] do |cmd| - c.action do |global_options,options,args| + cmd.desc "Show detailed server info" + cmd.arg_name "server-id..." + cmd.command [:show] do |c| - raise "You must specify servers to show" if args.empty? + c.action do |global_options, options, args| - servers = DetailedServer.find_or_call(args) do |id| - raise "Couldn't find server #{id}" - end + raise "You must specify servers to show" if args.empty? - table_opts = global_options.merge(:vertical => true) - render_table(servers, table_opts) + servers = DetailedServer.find_or_call(args) do |id| + raise "Couldn't find server #{id}" + end + + table_opts = global_options.merge(:vertical => true) + render_table(servers, table_opts) + end end end end