lib/true_automation/client.rb in true_automation-0.3.14 vs lib/true_automation/client.rb in true_automation-0.3.16
- old
+ new
@@ -8,10 +8,11 @@
@pid = nil
def start(options)
@port = options[:port] || 9515
+ remote = options[:remote]
@executable = ENV['TRUEAUTOMATION_EXEC'] || 'trueautomation'
if find_executable(@executable).nil?
raise "`#{@executable}` not found. Can not find TrueAutomation.IO client"
end
@@ -20,10 +21,10 @@
puts "TrueAutomation.IO client #{trueautomation_version.strip}"
Dir.mkdir('log') unless File.exist?('log')
logfile = "log/trueautomation-#{Time.now.strftime('%Y%m%dT%H%M%S')}.log"
- @pid = spawn("#{@executable} --log-file #{logfile} --port #{@port}")
+ @pid = spawn("#{@executable} --log-file #{logfile} --port #{@port} #{remote}")
puts "Started TrueAutomation.IO client with pid #{@pid} listening to port #{@port}"
@pid
end