Sha256: 7fc66bafa65266f4c2d93e8fa0c7ae9d8a73e14c65b995e95cca273c200e5d76

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

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

module Brochure
  VERSION = "0.3.0"

  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.0 lib/brochure.rb