If you are creating Rack middleware that changes the HTML response, use Rack::Mason to get a head start. Rack::Mason takes care of the boilerplate Rack glue so that you can focus on simply changing the HTML. Notethis is a fork from https://github.com/techiferous/rack-mason (c) email@example.com
Gemfile gem 'rack-mason', '~> 0.1.2'
install gem install rack-mason