diff --git a/app/views/apps/index.html.haml b/app/views/apps/index.html.haml
index debdb19..56fc27f 100644
--- a/app/views/apps/index.html.haml
+++ b/app/views/apps/index.html.haml
@@ -12,7 +12,7 @@
- @apps.each do |app|
%tr
%td.name= link_to app.name, app_path(app)
- %td.deploy= app.last_deploy_at ? link_to( app.last_deploy_at.to_s(:micro), app_deploys_path(app)) : 'n/a'
+ %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'
%td.count
- if app.errs.count > 0
= link_to app.errs.unresolved.count, app_path(app)
@@ -24,3 +24,4 @@
%em
No apps here.
= link_to 'Click here to create your first one', new_app_path
+
diff --git a/spec/views/apps/index.html.haml_spec.rb b/spec/views/apps/index.html.haml_spec.rb
new file mode 100644
index 0000000..fbd8f52
--- /dev/null
+++ b/spec/views/apps/index.html.haml_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe "apps/index.html.haml" do
+ before do
+ app = Factory(:app, :deploys => [Factory(:deploy, :revision => "123456789abcdef")])
+ assign :apps, [app]
+ controller.stub(:current_user) { Factory(:user) }
+ end
+
+ describe "deploy column" do
+ it "should show the first 7 characters of the revision in parentheses" do
+ render
+ rendered.should match(/\(1234567\)/)
+ end
+ end
+end
+
--
libgit2 0.21.2