Skip to content

Instantly share code, notes, and snippets.

@jumski
Created February 4, 2013 21:34
Show Gist options
  • Save jumski/4709909 to your computer and use it in GitHub Desktop.
Save jumski/4709909 to your computer and use it in GitHub Desktop.
module Antykwariusz
module_function
def fog
unless Thread.current[:fog]
opts = {
provider: 'AWS',
aws_access_key_id: S3_KEY,
aws_secret_access_key: S3_SECRET,
endpoint: "http://#{S3_ENDPOINT}/"
}
Thread.current[:fog] = Fog::Storage.new(opts)
end
Thread.current[:fog]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment