Sha256: a8ae21ced5cc5ab8683c06df928c9bb00dc94dad93677e2c876e67611d012e77

Contents?: true

Size: 438 Bytes

Versions: 8

Compression:

Stored size: 438 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

8 entries across 8 versions & 1 rubygems

Version Path
heirloom-0.6.1 lib/heirloom/archive/lister.rb
heirloom-0.6.0rc1 lib/heirloom/archive/lister.rb
heirloom-0.5.0rc4 lib/heirloom/archive/lister.rb
heirloom-0.5.0rc3 lib/heirloom/archive/lister.rb
heirloom-0.5.0rc2 lib/heirloom/archive/lister.rb
heirloom-0.5.0rc1 lib/heirloom/archive/lister.rb
heirloom-0.4.1rc1 lib/heirloom/archive/lister.rb
heirloom-0.4.0 lib/heirloom/archive/lister.rb