Sha256: 240d5b8edb8dc7148b3a2d9619962b1af6cf6e2a2abad17df7f6f09deab56e43

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

require 'aws-sdk'

require_relative 's3_outlet/s3_output'
require_relative 's3_outlet/version'
require_relative 's3_outlet/server'

module Opener
  class S3Outlet
    attr_reader :options

    def initialize(options={})
      @options = options
    end

    def run(input)
      options[:text] = input
      S3Output.create(options)

      return input #Return original input so that we can keep on chaining.
    end

    def self.s3
      @s3 ||= AWS::S3.new
    end

    def self.bucket
      @bucket ||= s3.buckets[bucket_name]
    end

    def self.bucket_name
      return "opener-outlet"
    end

    def self.dir
      return "webservice"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opener-s3-outlet-1.1.1 lib/opener/s3_outlet.rb
opener-s3-outlet-1.1.0 lib/opener/s3_outlet.rb