Sha256: 60ca7943c02e759b9569e0d738165fc55f2f7638ce2be870e70b2fdaf61f0e8b

Contents?: true

Size: 740 Bytes

Versions: 2

Compression:

Stored size: 740 Bytes

Contents

require 'appengine-rack'

AppEngine::Rack.configure_app(
  :application => 'tools-test', :version => 'foo', :ssl_enabled => true)

ruby_app = lambda {|env| [200, {}, "Hello Rack!"]}

map '/admin' do
  use JavaServletFilter, 'com.example.AdminFilter', :wildcard => true
  run JavaServlet.new('com.example.AdminServlet', :wildcard => true)
end

map '/store' do
  use JavaServletFilter, 'com.example.StoreFilter', :name => 'StoreFilter'
  run JavaServlet.new('com.example.StoreServlet', :name => 'store')
end

map '/admin2' do
  use AppEngine::Rack::AdminRequired
  run ruby_app
end

map '/private' do
  use AppEngine::Rack::LoginRequired
  run ruby_app
end

map '/secure' do
  use AppEngine::Rack::SSLRequired
  run ruby_app
end

run ruby_app

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appengine-tools-0.0.2 spec/config.ru
appengine-tools-0.0.1 spec/config.ru