bf4/code_metrics — pull request #5 by bf4 (2013-08-14 14:45:41+00:00)
Title: Easily add more directories

Add easy helper methods for adding more app or test directories

```ruby
c = CodeMetrics::StatsDirectories.new
c.add_test_directories('spec/**/*_spec.rb', 'spec') # where the 2nd argument is a required string in the filename
c.add_directories('engines/**/*.rb') # no restrictions on the file name, 2nd argument omitted
c.directories # outputs an array of [description, folder_path] to run statistics against
```

Logic inspired by https://github.com/rspec/rspec-rails/blob/d546278af1/lib/rspec/rails/tasks/rspec.rake#L43