Skip to content

Commit

Permalink
Do not count build/test failures as matches in the count.
Browse files Browse the repository at this point in the history
  • Loading branch information
Flameeyes committed Jul 16, 2012
1 parent 8767bc7 commit c2af00a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion display.rb
Expand Up @@ -40,7 +40,9 @@
:public_url => (data.attributes["public_url"][0] rescue ""),
:date => (data.attributes["date"][0] rescue ""),
:pkg => (data.attributes["pkg"][0] rescue ""),
:matches => (data.attributes["matches"][0] rescue ""),
:matches => (data.attributes["matches"][0].to_i rescue 0) -
((data.attributes["pkg_failed"][0] == "true" rescue false) ? 1 : 0) -
((data.attributes["test_failed"][0] == "true" rescue false) ? 1 : 0),
:pkg_failed => (data.attributes["pkg_failed"][0] == "true" rescue false),
:test_failed => (data.attributes["test_failed"][0] == "true" rescue false),
:bug_template => {
Expand Down
2 changes: 1 addition & 1 deletion views/index.erb
Expand Up @@ -24,7 +24,7 @@
</td>
<td><%= item[:date] %></td>
<td>
<%= item[:matches] %>
<%= item[:matches] unless item[:matches] == 0 %>
<% if item[:test_failed] %>
<img src="magnifier.png" width="16px" height="16px" alt="[TF]" />
<% end %>
Expand Down

0 comments on commit c2af00a

Please sign in to comment.