Sha256: 6dbc77e1426b5902f685720cb9dc4dd1405bc1e32f5c7193077ee1d3af3c60d2
Contents?: true
Size: 480 Bytes
Versions: 13
Compression:
Stored size: 480 Bytes
Contents
require 'sinatra' require 'yajl/json_gem' module Example class BaseApp < Sinatra::Base enable :sessions enable :raise_errors disable :show_exceptions get '/debug' do content_type :text env['rack.session'].to_yaml end end class BadAuthentication < Sinatra::Base get '/unauthenticated' do status 403 <<-EOS <h2>Unable to authenticate, sorry bud.</h2> <p>#{env['warden'].message}</p> EOS end end end
Version data entries
13 entries across 13 versions & 1 rubygems