Sha256: 81d036b6284c7e228e998389358fa60570eded2c0ee257528731bf3d39f83e79

Contents?: true

Size: 659 Bytes

Versions: 35

Compression:

Stored size: 659 Bytes

Contents

# Require lib
require 'rack/showexceptions'

# Support rack/showexceptions during development
module Middleman
  module CoreExtensions
    module ShowExceptions

      # Setup extension
      class << self

        # Once registered
        def registered(app)
          # When in dev
          app.configure :development do
            # Include middlemare
            if show_exceptions
              use ::Middleman::CoreExtensions::ShowExceptions::Middleware
            end
          end
        end
      end

      # Custom exception class
      # TODO: Style this ourselves
      class Middleware < ::Rack::ShowExceptions
      end

    end
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
middleman-core-x86-mingw32-3.0.14 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.14 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.13 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.13 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.12 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.12 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.12.pre.1 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.12.pre.1 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.11 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.11 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.10 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.10.pre.1 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.10.pre.1 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.9 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.9 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.8 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.8 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.8.pre.2 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.0.8.pre.2 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-x86-mingw32-3.0.8.pre.1 lib/middleman-core/core_extensions/show_exceptions.rb