class Calabash::Cucumber::LogTailer
@!visibility private
Public Class Methods
tail_in_terminal(path)
click to toggle source
@!visibility private
# File lib/calabash-cucumber/log_tailer.rb, line 8 def self.tail_in_terminal(path) if !File.exist?(path) raise RuntimeError, %Q[ Cannot tail a file that does not exist: #{path} ] end term_part = %Q[xcrun osascript -e 'tell application "Terminal" to do script] tail_part = %Q["tail -n 10000 -F #{path} | grep -v \\"Default: \\\\*\\""'] cmd = "#{term_part} #{tail_part}" if !LogTailer.run_command(cmd) raise RuntimeError, %Q[ Could not tail file: #{path} with command: #{cmd} ] end true end
Private Class Methods
run_command(cmd)
click to toggle source
@!visibility private
# File lib/calabash-cucumber/log_tailer.rb, line 41 def self.run_command(cmd) system(cmd) end