From 8ea7166feba4e8a32ba1b9b7e4ee4970aaf42c66 Mon Sep 17 00:00:00 2001 From: Seth Thomas Rasmussen Date: Thu, 4 Feb 2010 22:21:58 -0500 Subject: [PATCH] ignore comments --- lib/application_checker.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/application_checker.rb b/lib/application_checker.rb index 140be5b..a768756 100644 --- a/lib/application_checker.rb +++ b/lib/application_checker.rb @@ -185,11 +185,16 @@ module Rails # If they're on Windows, they probably don't have grep. @probably_has_grep ||= (Config::CONFIG['host_os'].downcase =~ /mswin|windows|mingw/).nil? - if @probably_has_grep + lines = if @probably_has_grep find_with_grep(text, base_path + where) else find_with_rak(text, base_path + where) end + + # ignore comments + lines.gsub! /^\s*#.+$/m, "" + + lines end # Sets a base path for finding files; mostly for testing