We'd like to introduce Relevance's latest open source project, Vasco. Vasco is a route explorer for Rails projects. As we develop applications with explicit requirements for RESTful APIs for integration purposes, our clients need some way to visually accept that the stories are complete. It is also helpful for the developers to have a way to manually interact with the APIs as a second avenue for testing, verifying whether our routes end in gold and silk, or pain and death. So, we wrote Vasco.
Vasco is a simple plugin, with a single rake task. Once installed and initialized, it creates a web interface that knows about all your RESTful routes and the models at the far end of them. It lets you play with the GETs, POSTs, PUTs and DELETEs and see the responses. If your APIs are protected by BASIC auth, no worries, since the plugin runs from inside your app. And if you are lucky, it will expand your colonial footprint and lead to Empire.
To install, just run:
> script/plugin install git://github.com/relevance/vasco.git
> rake vasco:explore
After that, launch your app and point your browser to http://localhost:3000/vasco (or wherever you home your dev apps). You'll be treated to a simple interface. On the left is a list of all the controllers in the app with RESTful routes associated with them. On the right are two boxes, one for viewing the request, one for the response. Click any controller to expand its list of available routes. If you click on something like, in this example, GET /ports, Vasco will send the request to your app and display the results immediately.
If you click on a route that requires user input, like PUT /ships/:id, a dialog will appear with a form you can fill in. The :id field will be prepopulated with a known ID from the database, assuming your database had fixture or other data loaded when you ran the vasco:explore task. You can fill in the rest of the form and either commit the request, or cancel.
After PUTting the request, the results will again be displayed. When a call only returns a status code, the results will be displayed as a simple success or failure message.
We've got docs on the GitHub wiki, as well as a list of upcoming features. We hope you enjoy Señor de Gama.