class Bubbles::Uploaders::S3
Public Instance Methods
call()
click to toggle source
# File lib/bubbles/uploaders/s3.rb, line 7 def call File.open(uid_file, 'rb') do |file| s3.put_object(bucket: s3_bucket, key: s3_full_path, body: file, acl: config.s3_acl, metadata: metadata) end rescue => e config.logger.error("#{e.message}") command_queue.reschedule(self) end
inspect()
click to toggle source
# File lib/bubbles/uploaders/s3.rb, line 16 def inspect "<##{self.class.name} uid_file: #{uid_file} to: s3://#{s3_bucket}#{s3_full_path}>" end
Private Instance Methods
s3()
click to toggle source
# File lib/bubbles/uploaders/s3.rb, line 24 def s3 @s3 ||= Aws::S3::Client.new({ region: s3_region, credentials: s3_credentials }) end
s3_full_path()
click to toggle source
# File lib/bubbles/uploaders/s3.rb, line 31 def s3_full_path Pathname.new(s3_path).join(uid_file_name).to_s end