Woohoo! I wrote some code which will be part of the next release of Ruby's Sinatra github.com/…/480b1e8ebe579acf…