From 9f46524bdeddcd2912d5be574bffb691d73cee16 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 8 Jun 2009 09:15:54 -0700 Subject: [PATCH] Fixed a bug that caused the current revision to not be set from the REVISION file. --- lib/compass/version.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/compass/version.rb b/lib/compass/version.rb index 368028cf..f8e79bb2 100644 --- a/lib/compass/version.rb +++ b/lib/compass/version.rb @@ -3,8 +3,7 @@ module Compass # Returns a hash representing the version. # The :major, :minor, and :teeny keys have their respective numbers. # The :string key contains a human-readable string representation of the version. - # If checked out from Git, - # the :rev key will have the revision hash. + # The :rev key will have the current revision hash. # # This method swiped from Haml and then modified, some credit goes to Nathan Weizenbaum attr_writer :version @@ -41,7 +40,7 @@ module Compass def revision_from_file if File.exists?(scope('REVISION')) rev = File.read(scope('REVISION')).strip - rev = nil if rev !~ /[a-f0-9]+/ + rev if rev =~ /[a-f0-9]+/ end end