Sha256: c3f67a07a6fc19748e812855e6e145ed72345856c2ff4f0cf823eaec79918532

Contents?: true

Size: 927 Bytes

Versions: 4

Compression:

Stored size: 927 Bytes

Contents

require 'rubygems'
require 'base64'
require 'cgi'
require 'digest/md5'
require 'excon'
require 'hmac-sha1'
require 'hmac-sha2'
require 'json'
require 'mime/types'
require 'nokogiri'
require 'time'

__DIR__ = File.dirname(__FILE__)

$LOAD_PATH.unshift __DIR__ unless
  $LOAD_PATH.include?(__DIR__) ||
  $LOAD_PATH.include?(File.expand_path(__DIR__))

module Fog

  def self.mock!
    @mocking = true
    self.reload
  end

  def self.mocking?
    !!@mocking
  end

  def self.reload
    load "fog/collection.rb"
    load "fog/connection.rb"
    load "fog/model.rb"
    load "fog/parser.rb"

    load "fog/aws.rb"
    load "fog/rackspace.rb"
    load "fog/slicehost.rb"
  end

  def self.credentials(path = File.expand_path('~/.fog'))
    @credentials ||= begin
      credentials = {}
      File.open(path) do |file|
        credentials = YAML.load(file.read)[:default]
      end
      credentials
    end
  end

end

Fog.reload

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-0.0.35 lib/fog.rb
fog-0.0.34 lib/fog.rb
fog-0.0.33 lib/fog.rb
fog-0.0.32 lib/fog.rb