From 7a69f41cb5789bfff75c643a3b8fcd3c543e146e Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Mon, 20 Sep 2010 21:59:16 -0400 Subject: [PATCH] grep with --exclude was resulting in hits on files with names like 'app/models/.svn/text-base/reading_list.rb.svn-base'. Piping through an additional grep process seems a little wasteful, but it does the job for folks who have an app on Subversion. --- lib/application_checker.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/application_checker.rb b/lib/application_checker.rb index 8f3334a..4b87c18 100644 --- a/lib/application_checker.rb +++ b/lib/application_checker.rb @@ -378,9 +378,9 @@ module Rails value = "" # Specifically double quote for finding 'test_help' command = if double_quote - "grep -r #{"-P" if perl_regex} --exclude=\*.svn\* \"#{text}\" #{where}" + "grep -r #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn" else - "grep -r #{"-P" if perl_regex} --exclude=\*.svn\* '#{text}' #{where}" + "grep -r #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn" end Open3.popen3(command) do |stdin, stdout, stderr|