metricfu/metric_fu — pull request #51 by sathish316 (2013-03-05 20:13:33+00:00)
Title: Cane error if there is no README

I just ran metric_fu v4.0.0 on a sinatra project which does not have README.

It resulted in the following error:

```
/Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:49:in `category_from': undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:38:in `block in violations_by_category'
from /Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:37:in `each'
from /Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:37:in `each_with_object'
from /Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:37:in `violations_by_category'
from /Users/foo/.rvm/gems/ruby-1.9.3-p194/gems/metric_fu-4.0.0/lib/metric_fu/metrics/cane/cane.rb:14:in `analyze'
```

because of Cane missing README violation which is not handled in code.

```
Missing documentation (1):

No README found
```

Please merge this pull request to fix this issue.