bin/tl in testlab-0.6.15 vs bin/tl in testlab-0.6.16
- old
+ new
@@ -44,25 +44,30 @@
desc 'Quiet mode'
default_value false
switch [:q, :quiet]
+desc 'Path to Labfile'
+arg_name 'path/to/file'
+default_value File.join(Dir.pwd, 'Labfile')
+flag [:l, :labfile]
+
pre do |global,command,options,args|
- (global[:v] == true) and ENV['LOG_LEVEL'] = 'DEBUG'
+ (global[:verbose] == true) and ENV['LOG_LEVEL'] = 'DEBUG'
log_file = File.join(Dir.pwd, "testlab-#{HOSTNAME}.log")
@logger = ZTK::Logger.new(log_file)
@logger.debug { "global(#{global.inspect})" }
@logger.debug { "options(#{options.inspect})" }
@logger.debug { "args(#{args.inspect})" }
@ui = ZTK::UI.new(:logger => @logger)
- @testlab = TestLab.new(:ui => @ui)
+ @testlab = TestLab.new(:ui => @ui, :labfile => global[:labfile])
TestLab::Utility.log_header(@testlab).each { |line| @logger.info { line } }
- if (global[:q] == false)
+ if (global[:quiet] == false)
message = format_message("TestLab v#{TestLab::VERSION} Loaded".black.bold)
@testlab.ui.stdout.puts(message)
end
true