bin/tork in tork-18.2.2 vs bin/tork in tork-18.2.3

- old
+ new

@@ -1,9 +1,9 @@ #!/usr/bin/env ruby =begin ======================================================================= -# TORK 1 2012-07-11 18.2.2 +# TORK 1 2012-09-26 18.2.3 ## NAME tork - Continuous testing tool for Ruby @@ -42,15 +42,15 @@ # backend #----------------------------------------------------------------------------- require 'tork/client' -warn 'tork: Absorbing test execution overhead...' +warn "#{$0}: Absorbing test execution overhead..." @driver = Tork::Client::Transceiver.new('tork-driver') do |event, *details| case event_sym = event.to_sym - when :load then warn 'tork: Overhead absorbed. Ready for testing!' - when :over then warn 'tork: Reabsorbing changed overhead files...' + when :load then warn "#{$0}: Overhead absorbed. Ready for testing!" + when :over then warn "#{$0}: Reabsorbing changed overhead files..." else test_file, line_numbers, log_file, worker_number, exit_status = details message = [event.upcase, [test_file, *line_numbers].join(':'), exit_status].compact.join(' ') @@ -76,22 +76,18 @@ 'f' => :rerun_failed_test_files, 'o' => :reabsorb_overhead_files, 'q' => :quit, } -begin - while key = STDIN.gets - if command = COMMANDS[key.strip] - warn "tork: Sending #{command.to_s.inspect} command..." - @driver.send [command] - break if command == :quit - else # invalid command - COMMANDS.each do |k, cmd| - warn "tork: Type #{k} then ENTER to #{cmd.to_s.tr('_', ' ')}." - end +while key = STDIN.gets + if command = COMMANDS[key.strip] + warn "#{$0}: Sending #{command.to_s.inspect} command..." + @driver.send [command] + break if command == :quit + else # invalid command + COMMANDS.each do |key, cmd| + warn "#{$0}: Type #{key} then ENTER to #{cmd.to_s.tr('_', ' ')}." end end -rescue Interrupt - # forced quit end Process.waitall