Page MenuHomeDevCentral

D479.diff
No OneTemporary

D479.diff

diff --git a/tommy.rb b/tommy.rb
--- a/tommy.rb
+++ b/tommy.rb
@@ -58,20 +58,23 @@
end
helpers do
+ def css_for_score(score)
+ if score == 100
+ 'best'
+ elsif score >= 80
+ 'better'
+ elsif score >= 60
+ 'good'
+ elsif score >= 40
+ 'bad'
+ else
+ 'worse'
+ end
+ end
+
def css_for_project(project)
- score = project.build_score
if project.green?
- if score == 100
- 'best'
- elsif score >= 80
- 'better'
- elsif score >= 60
- 'good'
- elsif score >= 40
- 'bad'
- else
- 'worse'
- end
+ css_for_score(project.build_score)
elsif project.building?
'building'
else

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 25, 00:22 (7 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2435293
Default Alt Text
D479.diff (711 B)

Event Timeline