bantic-integrity 0.1.4 → 0.1.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/integrity.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{integrity}
3
- s.version = "0.1.4"
3
+ s.version = "0.1.4.1"
4
4
 
5
5
 
6
6
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
@@ -24,10 +24,14 @@ module Integrity
24
24
  def build(commit_identifier="HEAD")
25
25
  return if building?
26
26
  update_attributes(:started_build_at => Time.now)
27
- Builder.new(self).build(commit_identifier)
28
- ensure
29
- update_attributes(:started_build_at => nil)
30
- send_notifications
27
+ Thread.new(self) do |project|
28
+ begin
29
+ Builder.new(project).build(commit_identifier)
30
+ ensure
31
+ project.update_attributes(:started_build_at => nil)
32
+ project.send_notifications
33
+ end
34
+ end
31
35
  end
32
36
 
33
37
  def building?
data/views/home.haml CHANGED
@@ -12,7 +12,11 @@
12
12
  %a{ :href => project_url(project) }&= project.name
13
13
  .meta
14
14
  - if project.building?
15
- = "Building for #{pretty_time_since(project.started_build_at)}"
15
+ - last_build = project.last_build
16
+ - short_commit_identifier = last_build ? last_build.short_commit_identifier : "unknown commit"
17
+ - commit_message = last_build ? last_build.commit_message : "unknown commit message"
18
+ - shortened_commit_message = commit_message ? commit_message.slice(0,40) + "..." : "unknown commit message"
19
+ = "Building #{short_commit_identifier} (#{shortened_commit_message}) for #{pretty_time_since(project.started_build_at)}"
16
20
  - elsif project.last_build.nil?
17
21
  Never built yet
18
22
  - else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bantic-integrity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Nicol\xC3\xA1s Sanguinetti"