Sha256: 206d4aef27a57fd8f6897078bb5bd688f4b5fb8b68e003f2d7dc2cd6800a9d38

Contents?: true

Size: 455 Bytes

Versions: 5

Compression:

Stored size: 455 Bytes

Contents

require 'uptimerobot'

DEFAULT_PARAMS = {
  'apiKey' => 'ZAPZAPZAP',
  'format' => 'json',
  'noJsonCallback' => '1'
}

def uptime_robot(options = {})
  options = {apiKey: 'ZAPZAPZAP'}.merge(options)

  stubs = Faraday::Adapter::Test::Stubs.new

  described_class.new(options) do |faraday|
    faraday.adapter :test, stubs do |stub|
      yield(stub)
    end
  end
end

def stringify_hash(hash)
  Hash[*hash.map {|k, v| [k.to_s, v.to_s] }.flatten(1)]
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
uptimerobot-0.1.6 spec/spec_helper.rb
uptimerobot-0.1.5 spec/spec_helper.rb
uptimerobot-0.1.4 spec/spec_helper.rb
uptimerobot-0.1.3 spec/spec_helper.rb
uptimerobot-0.1.2 spec/spec_helper.rb