Class: SauceWhisk::Sauce

Inherits:
Object
  • Object
show all
Extended by:
RestRequestBuilder
Defined in:
lib/sauce_whisk/info.rb

Class Method Summary collapse

Methods included from RestRequestBuilder

auth_details, delete, fully_qualified_resource, get, make_request, post, put, request_from_rest_client

Class Method Details

.auth_detailsObject



8
9
10
# File 'lib/sauce_whisk/info.rb', line 8

def self.auth_details
  {}
end

.operational?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/sauce_whisk/info.rb', line 34

def self.operational?
  service_status[:service_operational]
end

.platforms(force = false) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/sauce_whisk/info.rb', line 22

def self.platforms (force = false)
  unless force
    @platforms ||= JSON.parse(get "browsers/webdriver")
  else
    @platforms = JSON.parse(get "browsers/webdriver")
  end
end

.resourceObject



12
13
14
# File 'lib/sauce_whisk/info.rb', line 12

def self.resource
  "info"
end

.service_statusObject



16
17
18
19
20
# File 'lib/sauce_whisk/info.rb', line 16

def self.service_status
  JSON.parse((get "status"), :symbolize_names => true)
rescue

end

.total_job_countObject



30
31
32
# File 'lib/sauce_whisk/info.rb', line 30

def self.total_job_count
  Integer(get "counter")
end