29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/setup.rb', line 29
def cml_options
options={}
optparse = OptionParser.new do |opts|
opts.banner = "Usage: runregress [options]"
opts.on("-v", "--verbose", "Run in verbose mode") do|v|
options[:verbose] = v
end
opts.on("-s", "--setup", "Setup new projet") do |s|
options[:setup] = true
scaffold
end
opts.on('-l', '--logfile FILENAME', 'Write Log to FILE') do |file|
options[:logfile] = file
puts "using file name: #{file}"
end
opts.on('-r', '--test_list FILENAME', 'File with Tests for this regression') do |file|
options[:regression_file] = file
puts "\nRunning Regression with Test_List from: #{file} \n"
end
opts.on('-t', '--test test1,test2', Array, 'tests to run') do |tests|
options[:testlist] = tests
puts "Running Tests: #{options[:testlist]}"
end
opts.on('-n', '--new PROJECTNAME','Create new project')do |projectname|
options[:projectname] = projectname
end
opts.on("-h", "--help", "Display this screen") do |h|
puts opts
exit
end
end.parse!
options
end
|