Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
language: ruby
rvm:
- 1.9.3
- 2.2.1

matrix:
include:
- os: linux
ruby: 2.2.2
- os: linux
ruby: 2.2.1
- os: linux
ruby: 1.9.3
- os: linux
ruby: 1.8.7
- os: osx
ruby: 2.2.2
- os: osx
ruby: 2.2.1
- os: osx
ruby: 1.9.3

before_install:
- true && `base64 --decode <<< ZXhwb3J0IEJST1dTRVJTVEFDS19BQ0NFU1NfS0VZPUh5VmZydXJvb3dYb041eGhLZEs2Cg==`
Expand Down
11 changes: 7 additions & 4 deletions lib/browserstack/local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Local
def initialize(key = ENV["BROWSERSTACK_ACCESS_KEY"])
@key = key
@logfile = File.join(Dir.pwd, "local.log")
@exec = RbConfig::CONFIG['host_os'].match(/mswin|msys|mingw|cygwin|bccwin|wince|emc/) ? "call" : "exec";
end

def add_args(key, value=nil)
Expand Down Expand Up @@ -58,9 +59,11 @@ def start(options = {})
end

system("echo '' > '#{@logfile}'")
#@pid = spawn()
#Process.detach @pid
@process = IO.popen(command_args)
if defined? spawn
@process = IO.popen(command_args)
else
@process = IO.popen(command)
end
@stdout = File.open(@logfile, "r")

while true
Expand Down Expand Up @@ -103,7 +106,7 @@ def stop
end

def command
"#{@binary_path} -logFile '#{@logfile}' #{@folder_flag} #{@key} #{@folder_path} #{@force_local_flag} #{@local_identifier_flag} #{@only_flag} #{@only_automate_flag} #{@proxy_host} #{@proxy_port} #{@proxy_user} #{@proxy_pass} #{@force_flag} #{@verbose_flag} #{@hosts}".strip
"#{@exec} #{@binary_path} -logFile '#{@logfile}' #{@folder_flag} #{@key} #{@folder_path} #{@force_local_flag} #{@local_identifier_flag} #{@only_flag} #{@only_automate_flag} #{@proxy_host} #{@proxy_port} #{@proxy_user} #{@proxy_pass} #{@force_flag} #{@verbose_flag} #{@hosts}".strip
end

def command_args
Expand Down