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

Version Path
warden-github-1.3.2 example/setup.rb
warden-github-1.3.1 example/setup.rb
warden-github-1.3.0 example/setup.rb
warden-github-1.2.0 example/setup.rb
warden-github-1.1.1 example/setup.rb
warden-github-1.1.0 example/setup.rb
warden-github-1.0.3 example/setup.rb
warden-github-1.0.2 example/setup.rb
warden-github-1.0.1 example/setup.rb
warden-github-1.0.0 example/setup.rb
warden-github-0.14.0 example/setup.rb
warden-github-0.13.2 example/setup.rb
warden-github-0.13.1 example/setup.rb