0.01
No commit activity in last 3 years
No release in over 3 years
granular before filters for sinatra
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.9.4
 Project Readme

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.