Sha256: acebd3cb0937e326dc37852e7101d71c60cd8182dcfda1c6d7a0a3cc15b2996b

Contents?: true

Size: 677 Bytes

Versions: 21

Compression:

Stored size: 677 Bytes

Contents

require "json"
require 'sauce_whisk/rest_request_builder'

module SauceWhisk
  class Sauce
    extend RestRequestBuilder

    def self.auth_details
      {}
    end

    def self.resource
      "info"
    end

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

    end

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

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

    def self.operational?
      service_status[:service_operational]
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
sauce_whisk-0.0.7 lib/sauce_whisk/info.rb