I'm not sure if this is wanted, but it would sure be pretty easy to implement (as routes and filters already share a lot of code):
before '/:name', :agent => /Songbird/ do
before :host => /^mobile\./ do
What do you guys think about it? Would that be useful?
Definitely! I'd like to see :except and :only conditions
Patch: sinatra:filter-conditions (not yet merged into master).
Does not include :except and :only, yet. Those should be a separate ticket.
Is it implemented atm?
Here you can see some examples: http://www.sinatrarb.com/intro.html
before :agent => /Songbird/ do
after '/blog/*', :host_name => 'example.com' do
How about :except?