Sha256: 454f8fe989482fc3b727022f1255dedd0f57afe9ac67c8d574d199b9c9b6b38c

Contents?: true

Size: 442 Bytes

Versions: 3

Compression:

Stored size: 442 Bytes

Contents

module Heirloom

  class Lister

    def initialize(args)
      @config = args[:config]
      @name   = args[:name]
      @domain = "heirloom_#{@name}"
    end

    def list(limit=10)
      sdb.select("select * from `#{@domain}` where built_at > '2000-01-01T00:00:00.000Z'\
                  order by built_at desc limit #{limit}").keys
    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.12.7 lib/heirloom/archive/lister.rb
heirloom-0.12.5 lib/heirloom/archive/lister.rb
heirloom-0.12.4 lib/heirloom/archive/lister.rb