Sha256: be4b28418205ace3fa3dfc1f85fb39b50c9d369acebec16ead65784b252b08a5

Contents?: true

Size: 691 Bytes

Versions: 29

Compression:

Stored size: 691 Bytes

Contents

module Heirloom
  class Catalog
    class Delete

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

      def delete_from_catalog
        domain  = "heirloom_#{@name}"

        return false unless catalog_domain_exists?

        @logger.info "Deleting #{@name} from catalog."

        sdb.delete 'heirloom', domain
      end

      private

      def catalog_domain_exists?
        verify.catalog_domain_exists?
      end

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

      def verify
        @verify ||= Catalog::Verify.new :config => @config
      end

    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
heirloom-0.12.7 lib/heirloom/catalog/delete.rb
heirloom-0.12.5 lib/heirloom/catalog/delete.rb
heirloom-0.12.4 lib/heirloom/catalog/delete.rb
heirloom-0.12.3 lib/heirloom/catalog/delete.rb
heirloom-0.12.2 lib/heirloom/catalog/delete.rb
heirloom-0.12.1 lib/heirloom/catalog/delete.rb
heirloom-0.12.0 lib/heirloom/catalog/delete.rb
heirloom-0.11.2 lib/heirloom/catalog/delete.rb
heirloom-0.11.1 lib/heirloom/catalog/delete.rb
heirloom-0.11.0 lib/heirloom/catalog/delete.rb
heirloom-0.11.0.beta.2 lib/heirloom/catalog/delete.rb
heirloom-0.11.0.beta.1 lib/heirloom/catalog/delete.rb
heirloom-0.10.1 lib/heirloom/catalog/delete.rb
heirloom-0.10.0 lib/heirloom/catalog/delete.rb
heirloom-0.9.0 lib/heirloom/catalog/delete.rb
heirloom-0.8.3 lib/heirloom/catalog/delete.rb
heirloom-0.8.2 lib/heirloom/catalog/delete.rb
heirloom-0.8.1 lib/heirloom/catalog/delete.rb
heirloom-0.8.0 lib/heirloom/catalog/delete.rb
heirloom-0.7.4 lib/heirloom/catalog/delete.rb