Skip to content

Commit

Permalink
Refactor initialization of exclude options
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bunnymatic committed Dec 4, 2013
1 parent 1cbf044 commit b6bd076
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/annotate
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b6bd076

Please sign in to comment.