From b6bd076324bb0d4fdb6e2beba38efbf809309c07 Mon Sep 17 00:00:00 2001 From: Mr Rogers Date: Wed, 4 Dec 2013 13:01:38 -0500 Subject: [PATCH] Refactor initialization of exclude options * update option parser * didn't add tests b/c i'm not using rvm and can't see an easy way to add commandline option parsing tests --- bin/annotate | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/annotate b/bin/annotate index c2b70a2b7..657a22a63 100755 --- a/bin/annotate +++ b/bin/annotate @@ -119,7 +119,8 @@ OptionParser.new do |opts| end end - opts.on('-e', '--exclude [tests,fixtures,factories]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions| + opts.on('-e', '--exclude [DIRS]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions| + exclusions ||= %w(tests fixtures factories) exclusions.each { |exclusion| ENV["exclude_#{exclusion}"] = "yes" } end