Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Granular before filters for sinatra
branch: master

This branch is 1 commit ahead of bmizerany:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/sinatra
.gitignore
README.md
sinatra-any.gemspec

README.md

Synopsis

Granular before filters for Sinatra

Install

gem install sinatra-any

Use

require 'sinatra'
require 'sinatra/any'

any "/api/v2/*" do
  halt 403 if unauthorized?
end

get "/api/v2/widgets" do
  do_somthing_for_authorized_users
end

Thanks

@jbarnette (John Barnette) for convicing me this is a real problem
to solve because Rails can't follow specs.
Something went wrong with that request. Please try again.