Sha256: c4a1a552e2a414accb438136d139f64a0c3996e7f74088ca266234b57ccaf4e3

Contents?: true

Size: 662 Bytes

Versions: 14

Compression:

Stored size: 662 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)
          # Whether to catch and display exceptions
          # @return [Boolean]
          app.config.define_setting :show_exceptions, true, 'Whether to catch and display exceptions'

          # When in dev
          app.configure :development do
            # Include middlemare
            use ::Rack::ShowExceptions if config[:show_exceptions]
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
middleman-core-3.4.0 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.12 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.11 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.10 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.9 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.8 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.7 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.6 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.5 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-cj-3.3.6 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-cj-3.3.5 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-cj-3.3.4 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.4 lib/middleman-core/core_extensions/show_exceptions.rb
middleman-core-3.3.3 lib/middleman-core/core_extensions/show_exceptions.rb