austvik/wadlgen — pull request #1 by DanKnox (2011-12-04 00:59:14+00:00)
Title: Added support for namespaced routes

Hello austvik,

I have added support for nested routes to your application. I had attempted to use it to generate a WADL for an API that I wrote recently and found that none of my API routes appeared in the output. My API has several controllers and each of them are namespaced under the API module. My controller names are of the format:
```
API::AccountsController
```

I first commented out the regex that skipped any routes with a / in the controller name. When I attempted to generate the WADL I received a "Wrong Constant Name Api::AccountsController" error. I then found the code in your application that was instantiating the controller object based on the name listed in the defaults hash of the route object. I modified it to detect a module name by matching :: in the string. When a module is detected, it splits off the module name and grab's it's constant first, then instantiates the controller object through the module constant.

This change works well. I was able to use it to generate the needed WADL for my application.

I have not had time to write a test case for this, but please consider adding this change into your application. I believe it will be helpful for others attempting to use your app.