Sha256: 4f8fb81e067afe9940d0038ca1f15cfac018ea18c364bbff4987b1b1ef39bd0d

Contents?: true

Size: 693 Bytes

Versions: 2

Compression:

Stored size: 693 Bytes

Contents

require 'aws-sdk'

require_relative 's3_outlet/s3_output'
require_relative 's3_outlet/version'
require_relative 's3_outlet/server'
require 'opener/kaf_to_json'

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.3 lib/opener/s3_outlet.rb
opener-s3-outlet-1.1.2 lib/opener/s3_outlet.rb