Sha256: b348d6876918a4abb96c666a53f20106412dea6037d28f3b0aa12294fb959a47
Contents?: true
Size: 412 Bytes
Versions: 37
Compression:
Stored size: 412 Bytes
Contents
require 'pathname' module Opsicle class S3Bucket attr_reader :bucket def initialize(client, bucket_name) @bucket = Aws::S3::Bucket.new(name: bucket_name, client: client.s3) raise UnknownBucket unless @bucket.exists? end def update(object) obj = bucket.object(object) obj.upload_file(Pathname.new(object)) end end UnknownBucket = Class.new(StandardError) end
Version data entries
37 entries across 37 versions & 1 rubygems