Sha256: 2bedb27f1558530e02ac707cacc8a2aaf78a5a39d4dae8ae499aaa9da16c10b6
Contents?: true
Size: 497 Bytes
Versions: 96
Compression:
Stored size: 497 Bytes
Contents
module Rack module Jasmine class Runner def initialize(page) @page = page end def call(env) @path = env["PATH_INFO"] return not_found if @path != "/" [ 200, { 'Content-Type' => 'text/html'}, [@page.render] ] end def not_found [404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["File not found: #{@path}\n"]] end end end end
Version data entries
96 entries across 81 versions & 4 rubygems