Class: Jasmine::Sauce::CI::LocalSauceConfig

Inherits:
SauceConfig
  • Object
show all
Defined in:
lib/jasmine-selenium-sauce/local_sauce_config.rb

Instance Method Summary collapse

Methods inherited from SauceConfig

#browser, #browser_version, #idle_timeout, #jasmine_server_url, #max_duration, #platform, #record_screenshots, #record_video, #saucelabs_server_url, #selenium_client_timeout

Instance Method Details

#jasmine_server_portObject



13
14
15
# File 'lib/jasmine-selenium-sauce/local_sauce_config.rb', line 13

def jasmine_server_port
  ENV['JASMINE_PORT']
end

#ssh_keyObject



21
22
23
24
25
26
27
# File 'lib/jasmine-selenium-sauce/local_sauce_config.rb', line 21

def ssh_key
  if !ssh_key_path.nil? && File.exists?(ssh_key_path)
    return File.read(ssh_key_path)
  else
    return nil
  end
end

#ssh_key_pathObject



17
18
19
# File 'lib/jasmine-selenium-sauce/local_sauce_config.rb', line 17

def ssh_key_path
  ENV['SSH_KEY_PATH']
end

#validateObject

Raises:

  • (ArgumentError)


7
8
9
10
11
# File 'lib/jasmine-selenium-sauce/local_sauce_config.rb', line 7

def validate
  raise ArgumentError.new("SAUCELABS_URL was not set") unless saucelabs_server_url
  raise ArgumentError.new("JASMINE_PORT was not set") unless jasmine_server_port
  raise ArgumentError.new("SAUCE_BROWSER was not set") unless browser
end