Perkins.Helpers.gravatar_url = (email, size) ->

gravatar_id = MD5(email)
"http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}"

Perkins.Helpers.commit_url = (sha) ->

"#{current_repo.get("http_url")}/commit/#{sha}"

Perkins.Helpers.status_label = (status)->

label = if status == true then "success" else "default"
msg = if status == true then "passed" else "error"
"<span class='label label-#{label}'>build | #{msg}</span>"

Perkins.Helpers.status_class = (status)->

if status == true then "glyphicon glyphicon-ok" else "glyphicon glyphicon-remove"

Perkins.Helpers.round = (int, decimals=2)->

#Math.round(int * 100) / 100
#+int.toFixed(2);
parseFloat(int).toFixed(decimals)