I'm not using Rack::Builder directly ... unless it's being used behind
the scenes.
I've got a config..ru as follows ...
#\ --warn --port 8008 --pid ./rack.pid
require 'rubygems'
require 'bundler/setup'
require 'rack'
require 'ruby_app/rack/application'
require 'ruby_app/rack/route'
require 'ruby_app/version'
use Rack::ShowExceptions
use Rack::Session::Pool
use Rack::Reloader
use Rack::ContentLength
map '/favicon.ico' do
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources
favicon.ico]))
end
map '/ruby_app/resources' do
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources]))
end
map '/' do
use RubyApp::Rack::Application
run RubyApp::Rack::Route.new
end
... where RubyApp is my middleware/application.
During development the server is started via ...
Rack::Server.start(:config => '(path to
config.ru)')
It's the RubyApp::Rack::Application class that I've observed being
initialized on every request. I haven't checked but I suspect the
RubyApp::Rack::Route class is as well.
Thanks for your help.
Frank