lib/heirloom/archive/builder.rb in heirloom-0.2.0 vs lib/heirloom/archive/builder.rb in heirloom-0.3.0.rc1

- old
+ new

@@ -45,18 +45,10 @@ def add_git_commit git_commit = GitDirectory.new(:path => source).commit add_git_commit_to_artifact_record git_commit end - def create_artifact_record - attributes = { 'built_by' => "#{user}@#{hostname}", - 'built_at' => Time.now.utc.iso8601, - 'id' => id } - logger.info "Create artifact record #{id}." - sdb.put_attributes name, id, attributes - end - def add_git_commit_to_artifact_record(commit) attributes = { 'sha' => id, 'abbreviated_sha' => commit.id_abbrev, 'message' => commit.message, 'author' => commit.author.name } @@ -64,9 +56,17 @@ logger.info "Git sha: #{id}" logger.info "Git abbreviated_sha: #{commit.id_abbrev}" logger.info "Git message: #{commit.message}" logger.info "Git author: #{commit.author.name}" + sdb.put_attributes name, id, attributes + end + + def create_artifact_record + attributes = { 'built_by' => "#{user}@#{hostname}", + 'built_at' => Time.now.utc.iso8601, + 'id' => id } + logger.info "Create artifact record #{id}." sdb.put_attributes name, id, attributes end def sdb @sdb ||= AWS::SimpleDB.new :config => config