mattetti/Weasel-Diesel — pull request #31 by kamui (2013-08-29 00:37:44+00:00)
Title: Only extend top level main object with the DSL

Currently, the `describe_service` method extends Kernel, but as we probably will need to expand the DSL for default errors and meta API information, we probably shouldn't pollute every object with our DSL, so instead this PR extends the the top level `main` object only. I borrowed this from `rake`, which extends it's DSL in the same way.

It's not immediately obvious to me when any user would need to define an API within another class or namespace. If so, they could always include or extend `WeaselDiesel::DSL` like I do in the `spec_helper` so you can define services specs.

To take it one step further, maybe we shouldn't extend `main` either. Maybe you should be forced to `WeasalDiesel.describe_service` or `WeasalDiesel::DSL.describe_service`. I know rspec 3 is taking this route instead of monkey patching.