18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/right_publish/stores/s3.rb', line 18
def self.get_directories()
Profile.log("Connecting to S3.", :debug)
conn = Fog::Storage.new(
:provider => "AWS",
:aws_access_key_id => Profile.config[:remote_storage][:access_id],
:aws_secret_access_key => Profile.config[:remote_storage][:access_key],
:region => Profile.config[:remote_storage][:region]
)
Profile.log("Attaching to bucket: [#{Profile.config[:remote_storage][:remote_path]}].", :debug)
aws_bucket = conn.directories.get(Profile.config[:remote_storage][:remote_path])
aws_bucket.extend(S3Storage)
aws_bucket
end
|