20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/nestor/cli.rb', line 20
def start
Watchr.options.debug = options[:debug]
if options[:script] then
puts "Launching with custom script #{options[:script].inspect}"
else
puts "Launching..."
end
puts "Using #{options[:framework].inspect} framework with #{options[:testlib].inspect} as the testing library"
mapper = mapper_instance(options[:framework], options[:testlib])
machine = Nestor::Machine.new(mapper, :quick => options[:quick])
script_path = options[:script] ? Pathname.new(options[:script]) : nil
script = Nestor::Script.new(script_path || mapper.class.default_script_path)
options[:require].each do |path|
puts "Loading #{path.inspect} plugin"
require path
end
script.nestor_machine = machine
Watchr::Controller.new(script, Watchr.handler.new).run
end
|