Skip to content

Instantly share code, notes, and snippets.

@loe

loe/s3.rb Secret

Created June 23, 2010 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loe/7ef90619fbd331479c6a to your computer and use it in GitHub Desktop.
Save loe/7ef90619fbd331479c6a to your computer and use it in GitHub Desktop.
module Onehub
mattr_accessor :s3, :bucket
def self.s3
@@s3 ||= RightAws::S3.new(AMAZON_S3_INFO[:access_key_id], AMAZON_S3_INFO[:secret_access_key], {:port => 80, :protocol => 'http', :logger => ONEHUB_LOGGER})
end
def self.bucket
@@bucket ||= s3.bucket(AMAZON_S3_INFO[:bucket_name])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment