Sha256: 65acb4b63f5759394af25ba363f467c168daf31357d9db456e68cfeb494a1443

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

module Heirloom

  class Verifier

    def initialize(args)
      @config = args[:config]
      @name = args[:name]
      @logger = @config.logger
    end

    def buckets_exist?(args)
      bucket_prefix = args[:bucket_prefix]
      result = true

      @config.regions.each do |region|
        bucket = "#{bucket_prefix}-#{region}"
        
        s3 ||= AWS::S3.new :config => @config,
                           :region => region

        if s3.get_bucket bucket
          @logger.debug "#{bucket} exists in #{region}"
        else
          @logger.debug "#{bucket} in #{region} does not exist"
          result = false
        end

      end

      result
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.2.0 lib/heirloom/archive/verifier.rb