lib/integrity/project.rb in bantic-integrity-0.1.4.2 vs lib/integrity/project.rb in bantic-integrity-0.1.4.3
- old
+ new
@@ -8,10 +8,12 @@
property :uri, URI, :nullable => false, :length => 255
property :branch, String, :nullable => false, :default => "master"
property :command, String, :nullable => false, :length => 255, :default => "rake"
property :public, Boolean, :default => true
property :started_build_at, DateTime
+ property :shortened_current_commit_msg, String
+ property :current_commit_identifier, String
property :created_at, DateTime
property :updated_at, DateTime
has n, :builds, :class_name => "Integrity::Build"
has n, :notifiers, :class_name => "Integrity::Notifier"
@@ -22,9 +24,11 @@
validates_is_unique :name
def build(commit_identifier="HEAD")
return if building?
update_attributes(:started_build_at => Time.now)
+ update_attributes(:current_commit_identifier => "unknown commit id")
+ update_attributes(:shortened_current_commit_msg => "unknown msg")
Thread.new(self) do |project|
begin
Builder.new(project).build(commit_identifier)
ensure
project.update_attributes(:started_build_at => nil)