Sha256: 8800d5f5bac1ac544f7776e0220637ea9613c5a161727133d405ee7d990d1906
Contents?: true
Size: 1 KB
Versions: 9
Compression:
Stored size: 1 KB
Contents
require 'fog' module RightPublish module S3Storage STORAGE_KEY = :s3_storage STORAGE_OPTIONS = { :access_id => :attr_optional, :access_key => :attr_optional, :region => :attr_optional, :remote_path => :attr_needed, } def compute_md5(file) file.etag end 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 end RightPublish::StorageManager.register_storage(S3Storage) end
Version data entries
9 entries across 9 versions & 1 rubygems