4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/blazemeter/command/help.rb', line 4
def cmd_default argv
puts "Usage: blazemeter <command> <options>"
helps = [
{ :cmd => 'help', :help => 'Display this help' },
{ :cmd => 'help:locations', :help => 'Display list of available test geo locations' },
{ :cmd => 'api:init', :help => 'Store your API key' },
{ :cmd => 'api:reset', :help => 'Remove your API key' },
{ :cmd => 'api:validoptions', :help => 'Returns a list of available options that can be used for test creation or modification.' },
{ :cmd => 'test:create', :help => 'generate blazemeter test' },
{ :cmd => 'test:start', :help => 'starts blazemeter test' },
{ :cmd => 'test:stop', :help => 'stops blazemeter test' },
{ :cmd => 'test:update', :help => 'updates blazemeter test' },
{ :cmd => 'test:status', :help => 'show blazemeter test status' },
{ :cmd => 'test:options', :help => 'show blazemeter test options' },
{ :cmd => 'test:query', :help => 'returns the report (a zip file)' }
]
max_cmd_size = helps.inject(0) { |memo, obj| [ obj[:cmd].size, memo ].max } + 4
helps.each do |h|
puts "%*s - %s" % [max_cmd_size, h[:cmd], h[:help]]
end
puts
end
|