config/routes.rb in git-version-0.0.1 vs config/routes.rb in git-version-0.0.2
- old
+ new
@@ -1,8 +1,8 @@
require 'grit'
GitVersion::Engine.routes.draw do
- root :to => proc {|env| [200, {}, [Grit::Repo.new(Rails.root + '.git').commits.first.id[0...6]]]}
+ root :to => proc {|env| [200, {}, [ENV['COMMIT_HASH'] || Grit::Repo.new(Rails.root + '.git').commits.first.id[0...7]]]}
end
Rails.application.routes.draw do
mount GitVersion::Engine => "/version"
end