rhomobile-cijoe 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/cijoe/server.rb CHANGED
@@ -28,7 +28,7 @@ class CIJoe
28
28
 
29
29
  get '/status' do
30
30
 
31
- erb(:statusTemplate, {}, :joe => @joe, :build => @joe.old_builds[0])
31
+ erb(:statusTemplate, {}, :joe => @joe, :build => (@joe.building? ? @joe.current_build : @joe.old_builds[0]) )
32
32
 
33
33
  end
34
34
 
data/lib/cijoe/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class CIJoe
2
- Version = "0.2.6"
2
+ Version = "0.2.7"
3
3
  end
@@ -1,12 +1,30 @@
1
- <% if build.failed? %>
2
- <img src="/red_bl.gif" style="height:16px">
3
- <% else %>
4
- <img src="/green.gif" style="height:16px">
5
- <% end %>
6
- <span class="date"><%= pretty_time(build.finished_at) %></span> &raquo; Build <a href="<%= joe.url %>/commit/<%= build.sha %>"><%= build.short_sha %></a>
7
- <span class="<%= build.status %>">(<%= build.status %>)</span><span>&nbsp;in <%= "%.2f" % (build.finished_at.to_f - build.started_at.to_f) %> Seconds</span>
8
- <span>(</span>
9
- <span class="total"> <%= "#{build.total}" %> : </span>
10
- <span class="pass"> <%= "#{build.passes}" %> : </span>
11
- <span class="fail"> <%= "#{build.fails}" %> </span>
12
- <span>)</span>
1
+ <%
2
+ if build.failed?
3
+ @image = "/red_bl.gif"
4
+ @time = pretty_time(build.finished_at)
5
+ @duration = "in %.2f" % (build.finished_at.to_f - build.started_at.to_f)
6
+
7
+ elsif build.worked?
8
+ @image = "/green.gif"
9
+ @time = pretty_time(build.finished_at)
10
+ @duration = "in %.2f" % (build.finished_at.to_f - build.started_at.to_f)
11
+
12
+ else
13
+ @image = "/green_off.gif"
14
+ @time = pretty_time(build.started_at)
15
+ @duration = "for %.2f" % (Time.now - build.started_at.to_f)
16
+
17
+ end
18
+ %>
19
+
20
+ <img src="<%= @image %>" style="height:16px; position:relative; top:3px">
21
+ <span class="date"><%= @time %></span> &raquo; Build <a href="<%= joe.url %>/commit/<%= build.sha %>"><%= build.short_sha %></a>
22
+ <span class="<%= build.status %>">(<%= build.status %>)</span><span>&nbsp;<%= @duration %> seconds</span>
23
+
24
+ <% if build.failed? or build.worked? %>
25
+ <span>(</span>
26
+ <span class="total"> <%= "#{build.total}" %> : </span>
27
+ <span class="pass"> <%= "#{build.passes}" %> : </span>
28
+ <span class="fail"> <%= "#{build.fails}" %> </span>
29
+ <span>)</span>
30
+ <% end %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhomobile-cijoe
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Wanstrath
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-07-10 00:00:00 -07:00
20
+ date: 2010-07-13 00:00:00 -07:00
21
21
  default_executable: cijoe
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency