Sha256: 5f380f721b4a7a02036988c4eda25f4ac25f79fe78261ae74e22e2a13b5bda15

Contents?: true

Size: 530 Bytes

Versions: 3

Compression:

Stored size: 530 Bytes

Contents

module Heirloom

  class ArtifactUpdater

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

    def update(args)
      attribute = args[:attribute]
      id = args[:id]
      name = args[:name]
      update = args[:update]

      sdb.put_attributes name, id, { attribute => update }, { :replace => attribute }
      @logger.info "Updated #{name} (#{id}): #{attribute} = #{update}"
    end

    private

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

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
heirloom-0.1.3 lib/heirloom/artifact/artifact_updater.rb
heirloom-0.1.2 lib/heirloom/artifact/artifact_updater.rb
heirloom-0.1.1 lib/heirloom/artifact/artifact_updater.rb