Skip to content

Commit

Permalink
Strip all inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
nbibler committed Apr 1, 2011
1 parent 7eeaa77 commit 02e7068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sha_header/middleware.rb
Expand Up @@ -29,9 +29,9 @@ def revision_present?


def current_git_sha def current_git_sha
if revision_present? if revision_present?
File.read(::Rails.root.join('REVISION')) File.read(::Rails.root.join('REVISION')).strip
elsif on_heroku? elsif on_heroku?
ENV['COMMIT_HASH'] ENV['COMMIT_HASH'].strip
else else
`cd "#{::Rails.root}" && git rev-parse HEAD 2>/dev/null`.strip `cd "#{::Rails.root}" && git rev-parse HEAD 2>/dev/null`.strip
end end
Expand Down

0 comments on commit 02e7068

Please sign in to comment.