Sha256: cd601527bed10f48ef2f3d0d00cc06873528d2dd658031d82d0cd0f2ad118a5c
Contents?: true
Size: 1.02 KB
Versions: 15
Compression:
Stored size: 1.02 KB
Contents
module Opener module Daemons ## # Class for uploading KAF documents to Amazon S3. # class Uploader ## # Uploads the given KAF document. # # @param [String] identifier # @param [String] document # @param [Hash] metadata description # # @return [AWS::S3::S3Object] # def upload(identifier, document, metadata = {}) object = create( "#{identifier}.xml", document, :metadata => metadata, :content_type => 'application/xml' ) return object end ## # @param [Array] args # @return [AWS::S3::S3Object] # def create(*args) return bucket.objects.create(*args) end ## # @return [AWS::S3.new] # def s3 return @s3 ||= AWS::S3.new end ## # @return [AWS::S3::Bucket] # def bucket return @bucket ||= s3.buckets[Daemons.output_bucket] end end # Uploader end # Daemons end # Opener
Version data entries
15 entries across 15 versions & 1 rubygems