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.3.2 lib/sauce_whisk/info.rb
sauce_whisk-0.2.2 lib/sauce_whisk/info.rb
sauce_whisk-0.2.1 lib/sauce_whisk/info.rb
sauce_whisk-0.2.0 lib/sauce_whisk/info.rb
sauce_whisk-0.1.0 lib/sauce_whisk/info.rb
sauce_whisk-0.0.22 lib/sauce_whisk/info.rb
sauce_whisk-0.0.21 lib/sauce_whisk/info.rb
sauce_whisk-0.0.20 lib/sauce_whisk/info.rb
sauce_whisk-0.0.19 lib/sauce_whisk/info.rb
sauce_whisk-0.0.18 lib/sauce_whisk/info.rb
sauce_whisk-0.0.17 lib/sauce_whisk/info.rb
sauce_whisk-0.0.16 lib/sauce_whisk/info.rb
sauce_whisk-0.0.15 lib/sauce_whisk/info.rb
sauce_whisk-0.0.14 lib/sauce_whisk/info.rb
sauce_whisk-0.0.13 lib/sauce_whisk/info.rb
sauce_whisk-0.0.12 lib/sauce_whisk/info.rb
sauce_whisk-0.0.11 lib/sauce_whisk/info.rb
sauce_whisk-0.0.10 lib/sauce_whisk/info.rb
sauce_whisk-0.0.9 lib/sauce_whisk/info.rb
sauce_whisk-0.0.8 lib/sauce_whisk/info.rb