rom-rb/devtools — pull request #29 by plexus (2013-08-31 14:59:10+00:00)
Title: Pass on all valid options keys from yardstick.yml to Yardstick

I'll be happy to rewrite this based on feedback.

I tried a couple different things, first one is sticking with the block approach that was being used before

```ruby
# Devtools::Config::Yardstick
attribute :rules
```

```ruby
Yardstick::Rake::Verify.new(:verify) do |verify|
config = Devtools.project.yardstick
verify.threshold = config.threshold
verify.rules = config.rules
end
```

This however requires a change to `Yardstick::Config` to be able to set the rules like this. Additionally if you pass in the options as an argument (as in this patch), then `Yardstick::Config` normalizes the hash, which doesn't happen if you do it as above.

`Yardstick::Config.normalize_hash` is private, so you can't call it from `yardstick.rake`, or even from `Yardstick::Config#rules=`, so I didn't want to go as far as to change its visibility or pull it out into a util/support namespace.

So I settled on this, which also has the benefit that if any key is omitted from the YAML file, then Yardstick will use its own default. So that's why I took out the `DEFAULT_THRESHOLD`. Yardstick already has 100% as its default.