Method: Autocuke::Runtime#run!
- Defined in:
- lib/autocuke/runtime.rb
#run! ⇒ Object
Starts the EM reactor and watches each of the runtime’s files Raises an Autocuke::NoFileError if the list of files is empty
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/autocuke/runtime.rb', line 18 def run! raise Autocuke::NoFileError.new("No files given to watch!") if files.empty? log if .verbose # file watching requires kqueue on OSX EM.kqueue = true if EM.kqueue? EM.run { watch_feature_files puts "autocuke is up and running!" trap "SIGINT", proc{ puts "\nbye-bye!" exit } } end |