Rack and roll
summary
Shows how to build small Ruby web apps by composing Rack middleware and mounting Sinatra controllers with Rack::Builder, including rewriting PATH_INFO for nested-resource routing. Covers middleware patterns: timing wrapper, file request logging, static file serving with Rack::Static plus gzip via deflate, conditional GETs using ETag and Cache-Control (max-age one year), rate limiting in a rack-attack style (one request per 5s, block 10s), and a simple auth middleware that injects current_user into the Rack env.
AI-written summary · about
