Permalink
Browse files

Strip all inputs

  • Loading branch information...
1 parent 7eeaa77 commit 02e706805c041f982b0f4c38b1381faa458e66b4 @nbibler committed Apr 1, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sha_header/middleware.rb
View
4 lib/sha_header/middleware.rb
@@ -29,9 +29,9 @@ def revision_present?
def current_git_sha
if revision_present?
- File.read(::Rails.root.join('REVISION'))
+ File.read(::Rails.root.join('REVISION')).strip
elsif on_heroku?
- ENV['COMMIT_HASH']
+ ENV['COMMIT_HASH'].strip
else
`cd "#{::Rails.root}" && git rev-parse HEAD 2>/dev/null`.strip
end

0 comments on commit 02e7068

Please sign in to comment.