lib/heirloom/archive/builder.rb in heirloom-0.7.4 vs lib/heirloom/archive/builder.rb in heirloom-0.8.0

- old
+ new

@@ -7,24 +7,24 @@ attr_writer :local_build def initialize(args) @config = args[:config] - @name = args[:name] + @name = args[:name] @domain = "heirloom_#{@name}" - @id = args[:id] + @id = args[:id] @logger = @config.logger end def build(args) - @source = args[:directory] ||= '.' - @secret = args[:secret] - @base = args[:base] + @source = args[:directory] ||= '.' + @secret = args[:secret] + @bucket_prefix = args[:bucket_prefix] - directory = Directory.new :path => @source, - :exclude => args[:exclude], - :config => @config + directory = Directory.new :path => @source, + :exclude => args[:exclude], + :config => @config unless directory.build_artifact_from_directory :secret => @secret return false end @@ -61,14 +61,14 @@ sdb.put_attributes @domain, @id, attributes end def create_artifact_record - attributes = { 'built_by' => "#{user}@#{hostname}", - 'built_at' => Time.now.utc.iso8601, - 'encrypted' => encrypted?, - 'base' => @base, - 'id' => @id } + attributes = { 'built_by' => "#{user}@#{hostname}", + 'built_at' => Time.now.utc.iso8601, + 'encrypted' => encrypted?, + 'bucket_prefix' => @bucket_prefix, + 'id' => @id } @logger.info "Adding entry #{@id}." sdb.put_attributes @domain, @id, attributes end def encrypted?