Commit b6bd0763 by Mr Rogers

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
parent 1cbf0441
...@@ -119,7 +119,8 @@ OptionParser.new do |opts| ...@@ -119,7 +119,8 @@ OptionParser.new do |opts|
end end
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" } exclusions.each { |exclusion| ENV["exclude_#{exclusion}"] = "yes" }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment