Class: Jasmine::Sauce::CI::SauceConfig

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

Direct Known Subclasses

LocalSauceConfig

Instance Method Summary collapse

Instance Method Details

#browserObject



21
22
23
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 21

def browser
  ENV['SAUCE_BROWSER']
end

#browser_versionObject



29
30
31
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 29

def browser_version
  ENV['SAUCE_BROWSER_VERSION']
end

#idle_timeoutObject



41
42
43
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 41

def idle_timeout
   ENV['SAUCE_IDLE_TIMEOUT'] ? ENV['SAUCE_IDLE_TIMEOUT'] : 90
end

#jasmine_server_urlObject



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

def jasmine_server_url
  ENV['JASMINE_URL']
end

#max_durationObject



45
46
47
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 45

def max_duration
   ENV['SAUCE_MAX_DURATION'] ? ENV['SAUCE_MAX_DURATION'] : 180
end

#platformObject



25
26
27
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 25

def platform
   ENV['SAUCE_PLATFORM'] ? ENV['SAUCE_PLATFORM'].to_s.upcase.to_sym : :VISTA
end

#record_screenshotsObject



33
34
35
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 33

def record_screenshots
  ENV['SAUCE_SCREENSHOTS'] ? ENV['SAUCE_SCREENSHOTS'] : false
end

#record_videoObject



37
38
39
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 37

def record_video
   ENV['SAUCE_VIDEO'] ? ENV['SAUCE_VIDEO'] : false
end

#saucelabs_server_urlObject



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

def saucelabs_server_url
  ENV['SAUCELABS_URL']
end

#selenium_client_timeoutObject



49
50
51
# File 'lib/jasmine-selenium-sauce/sauce_config.rb', line 49

def selenium_client_timeout
  ENV['SELENIUM_CLIENT_TIMEOUT'] ? ENV['SELENIUM_CLIENT_TIMEOUT'] : 120
end

#validateObject

Raises:

  • (ArgumentError)


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

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