Sha256: b6eebca16bc93a452f2f946af9ff98f7d09a12a08c7e56e2fd532fd62a8cd90d
Contents?: true
Size: 655 Bytes
Versions: 15
Compression:
Stored size: 655 Bytes
Contents
require 'xmlsimple' module Heirloom class Downloader class S3 def initialize(args) @config = args[:config] @region = args[:region] @logger = @config.logger end def download_file(args) s3.get_object args[:bucket], args[:key] rescue Excon::Errors::Forbidden, Excon::Errors::NotFound => e error = XmlSimple.xml_in e.response.body error['Message'].each do |msg| @logger.error msg end false end private def s3 @s3 ||= AWS::S3.new :config => @config, :region => @region end end end end
Version data entries
15 entries across 15 versions & 1 rubygems