class Object

Public Instance Methods

get_credentials() click to toggle source

Should get the values from the .browserstack file

# File lib/screenshooter.rb, line 11
def get_credentials
  if ENV['BROWSERSTACK_USERNAME'] and ENV['BROWSERSTACK_TOKEN']
    [ENV['BROWSERSTACK_USERNAME'], ENV['BROWSERSTACK_TOKEN']]
  else
    keypair = File.open("#{Dir.home}/.browserstack", &:readline)
    keypair.strip.split(":")
  end
end