Permalink
Browse files

refactor color_status no state

  • Loading branch information...
1 parent 80297d4 commit 9ed1fcaddd8797b92749d30c834006fb7915871b @sarcilav sarcilav committed Mar 15, 2011
Showing with 14 additions and 14 deletions.
  1. +14 −14 lib/heroku/bartender/server.rb
@@ -42,25 +42,25 @@ def current_class(current_version_sha, sha)
sha == current_version_sha ? 'current' : ''
end
- def color_status(status)
- if status == true
- return 'green'
- elsif status == false
- return 'red'
- end
- 'yellow'
- end
-
- def state(status, current_version, version_sha)
+ def color_status(status, current_version, version_sha)
if current_version == version_sha
if status == true
- return 'OK'
+ return 'green'
elsif status == false
- return 'FAIL'
+ return 'red'
end
- return 'UNKNOWN'
+ return 'yellow'
+ end
+ return ""
+ end
+
+ def state(status)
+ if status == true
+ return 'OK'
+ elsif status == false
+ return 'FAIL'
end
- ''
+ 'UNKNOWN'
end
end
end

0 comments on commit 9ed1fca

Please sign in to comment.