Sha256: 48b1d364cee3a511c10e662ff3c000b486d8da578b9eaa0349d73121ea696869

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

require 'uptimerobot'

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

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

  described_class.new(api_key: 'ZAPZAPZAP') 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

1 entries across 1 versions & 1 rubygems

Version Path
uptimerobot-0.1.0 spec/spec_helper.rb