Sha256: 164c4d8b30758f932b3a5b954b95312b8ac7fc466731c487232d10df8ab249a8
Contents?: true
Size: 747 Bytes
Versions: 8
Compression:
Stored size: 747 Bytes
Contents
require 'fog' require 'active_support/core_ext/hash/slice' require 'active_support/core_ext/hash/reverse_merge' require 'guignol/configuration' module Guignol # Pool Fog connections to minimize latency module Connection def self.get(options) @connections ||= {} @connections[options] ||= Fog::Compute.new(options) end private # Find and return credentials def credentials if ENV['AWS_SECRET_KEY_ID'] && ENV['AWS_SECRET_ACCESS_KEY'] { :aws_access_key_id => ENV['AWS_SECRET_KEY_ID'], :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'] } else Guignol.configuration.slice(:aws_access_key_id, :aws_secret_access_key) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems