Sha256: 072018acc4444b7fffaab471b155e208603b2b8561d766b769c77f0a455dd24b
Contents?: true
Size: 1.09 KB
Versions: 25
Compression:
Stored size: 1.09 KB
Contents
module Sauce module Utilities class Connect def self.start_from_config(config) self.start(:host => config[:application_host], :port => config[:application_port], :quiet => true) end def self.start(options={}) begin require "sauce/connect" rescue LoadError => e STDERR.puts 'Please install the `sauce-connect` gem if you intend on using Sauce Connect with your tests!' exit(1) end if ParallelTests.first_process? unless @tunnel @tunnel = Sauce::Connect.new options @tunnel.connect @tunnel.wait_until_ready end @tunnel else while not File.exist? "sauce_connect.ready" sleep 0.5 end end end def self.close if @tunnel if ParallelTests.first_process? ParallelTests.wait_for_other_processes_to_finish @tunnel.disconnect @tunnel = nil end end end class << self attr_reader :tunnel end end end end
Version data entries
25 entries across 25 versions & 2 rubygems