Sha256: 6d259c883f1c227cdec33617bd47bc59cfb06a6168c031d56de7ba7fb6ff0e2f
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
# encoding: UTF-8 module Spontaneous module Rack POWERED_BY = { "X-Powered-By" => "Spontaneous CMS v#{Spontaneous::VERSION}" } class AroundFront def initialize(app) @app = app @renderer = Spontaneous::Output.published_renderer end def call(env) status = headers = body = nil env[Rack::RENDERER] = @renderer Spontaneous::Content.with_published do status, headers, body = @app.call(env) end [status, headers.merge(POWERED_BY), body] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spontaneous-0.2.0.beta1 | lib/spontaneous/rack/around_front.rb |