railsbp/rails_best_practices — pull request #97 by martinsvalin (2012-01-23 14:31:59+00:00)
Title: Let rails_best_practices take multiple file args

Analyze all files passed in on ARGV. This let's us run the rails_best_practices command on a selection of files, e.g. against new or modified files since last commit.

Example:
~$ rails_best_practices app/models/posts.rb app/controllers/posts_controller.rb

or (which is what I was trying to do)

~$ git diff --cached --name-status | awk '$1 != "D" {print $2}' | xargs rails_best_practices

Analyze.new can still take a String, but I updated the documentation to reflect that it normally takes an Array. Also, I removed some misleading documentation for #analyze.