lib/guignol/connection.rb in guignol-0.3.6 vs lib/guignol/connection.rb in guignol-0.3.6.1
- old
+ new
@@ -7,18 +7,18 @@
module Guignol
# Pool Fog connections to minimize latency
module Connection
def self.get(options)
@connections ||= {}
- @connections[options] ||= Fog::Compute.new(options)
+ @connections[options] ||= Fog::Compute.new(credentials.merge options)
end
private
# Find and return credentials
- def credentials
+ def self.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']
}
\ No newline at end of file