Commit 6cb521191ddb6b6e8e521e5be0dd8ce1a86c8a9c
1 parent
8cedcdc3
Exists in
master
and in
1 other branch
Added small revision next to 'Last Deploy' column on apps/index
Showing
2 changed files
with
19 additions
and
1 deletions
Show diff stats
app/views/apps/index.html.haml
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | - @apps.each do |app| |
13 | 13 | %tr |
14 | 14 | %td.name= link_to app.name, app_path(app) |
15 | - %td.deploy= app.last_deploy_at ? link_to( app.last_deploy_at.to_s(:micro), app_deploys_path(app)) : 'n/a' | |
15 | + %td.deploy= app.last_deploy_at ? link_to( app.last_deploy_at.to_s(:micro) << " (#{app.deploys.last.revision.to_s[0,7]})", app_deploys_path(app)) : 'n/a' | |
16 | 16 | %td.count |
17 | 17 | - if app.errs.count > 0 |
18 | 18 | = link_to app.errs.unresolved.count, app_path(app) |
... | ... | @@ -24,3 +24,4 @@ |
24 | 24 | %em |
25 | 25 | No apps here. |
26 | 26 | = link_to 'Click here to create your first one', new_app_path |
27 | + | ... | ... |
... | ... | @@ -0,0 +1,17 @@ |
1 | +require 'spec_helper' | |
2 | + | |
3 | +describe "apps/index.html.haml" do | |
4 | + before do | |
5 | + app = Factory(:app, :deploys => [Factory(:deploy, :revision => "123456789abcdef")]) | |
6 | + assign :apps, [app] | |
7 | + controller.stub(:current_user) { Factory(:user) } | |
8 | + end | |
9 | + | |
10 | + describe "deploy column" do | |
11 | + it "should show the first 7 characters of the revision in parentheses" do | |
12 | + render | |
13 | + rendered.should match(/\(1234567\)/) | |
14 | + end | |
15 | + end | |
16 | +end | |
17 | + | ... | ... |