Sha256: b79d8d8da39935b8c02b8314728287b14275872997e3ce237d09dd96d83cb527

Contents?: true

Size: 886 Bytes

Versions: 23

Compression:

Stored size: 886 Bytes

Contents

module Heirloom
  class Catalog
    class Verify

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

      def catalog_domain_exists?
        if sdb.domain_exists? 'heirloom'
          @logger.debug "Catalog exists in #{@region}."
          true
        else
          @logger.debug "Catalog does not exist in #{@region}."
          false
        end
      end

      def entry_exists_in_catalog?(entry)
        if sdb.item_count('heirloom', "heirloom_#{entry}").zero?
          @logger.debug "#{entry} does not exist in catalog in #{@region}."
          false
        else
          @logger.debug "#{entry} exists in catalog in #{@region}."
          true
        end
      end

      private

      def sdb
        @sdb ||= AWS::SimpleDB.new :config => @config
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
heirloom-0.12.1 lib/heirloom/catalog/verify.rb
heirloom-0.12.0 lib/heirloom/catalog/verify.rb
heirloom-0.11.2 lib/heirloom/catalog/verify.rb
heirloom-0.11.1 lib/heirloom/catalog/verify.rb
heirloom-0.11.0 lib/heirloom/catalog/verify.rb
heirloom-0.11.0.beta.2 lib/heirloom/catalog/verify.rb
heirloom-0.11.0.beta.1 lib/heirloom/catalog/verify.rb
heirloom-0.10.1 lib/heirloom/catalog/verify.rb
heirloom-0.10.0 lib/heirloom/catalog/verify.rb
heirloom-0.9.0 lib/heirloom/catalog/verify.rb
heirloom-0.8.3 lib/heirloom/catalog/verify.rb
heirloom-0.8.2 lib/heirloom/catalog/verify.rb
heirloom-0.8.1 lib/heirloom/catalog/verify.rb
heirloom-0.8.0 lib/heirloom/catalog/verify.rb
heirloom-0.7.4 lib/heirloom/catalog/verify.rb
heirloom-0.7.3 lib/heirloom/catalog/verify.rb
heirloom-0.7.3rc2 lib/heirloom/catalog/verify.rb
heirloom-0.7.3rc1 lib/heirloom/catalog/verify.rb
heirloom-0.7.2 lib/heirloom/catalog/verify.rb
heirloom-0.7.2rc2 lib/heirloom/catalog/verify.rb