Sha256: c937d3d800a90a8385746a891ec5df49e43d1f95e8d5997a3acb5b3808a4f856

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

require "hike"
require "rack"
require "tilt"

module Brochure
  VERSION = "0.3.1"

  autoload :Application,      "brochure/application"
  autoload :Context,          "brochure/context"
  autoload :Failsafe,         "brochure/failsafe"
  autoload :TemplateNotFound, "brochure/errors"

  def self.app(root, options = {})
    app = Application.new(root, options)
    if development?
      app = Rack::ShowExceptions.new(app)
    else
      app = Failsafe.new(app)
    end
    app
  end

  def self.development?
    ENV["RACK_ENV"] == "development"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brochure-0.3.1 lib/brochure.rb