class Ant::Configuration::Autoconfigs::Aws::S3

Public Class Methods

from_config(config) click to toggle source
# File lib/ant/configs/autoconfigs/aws/s3.rb, line 9
def self.from_config(config)
  require 'aws-sdk-s3'
  new(config)
end
new(config) click to toggle source
# File lib/ant/configs/autoconfigs/aws/s3.rb, line 14
def initialize(config)
  @config = config
  @client = ::Aws::S3::Client.new(
    symbolize(config).reject { |k, _| %i[bucket test_connection].include? k }
  )
  @connection = ::Aws::S3::Bucket.new(
    name: config['bucket'],
    client: @client
  )
end

Public Instance Methods

raw() click to toggle source
# File lib/ant/configs/autoconfigs/aws/s3.rb, line 29
def raw
  @connection
end
sanity_check() click to toggle source
# File lib/ant/configs/autoconfigs/aws/s3.rb, line 25
def sanity_check
  false
end