Sha256: 39ce89d53e12b5d0f611ac0fddb598c0dca336569c6fe18677f5906df4aa72c3

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 Bytes

Contents

require 'rails'

module Rack
  module DevMark
    class Railtie < Rails::Railtie
      config.rack_dev_mark = ActiveSupport::OrderedOptions.new

      initializer "rack-dev-mark.configure_rails_initialization" do |app|
        if app.config.rack_dev_mark.enable || Rack::DevMark.rack_dev_mark_env
          racks = [ActionDispatch::ShowExceptions, Rack::DevMark::Middleware]
          if theme = app.config.rack_dev_mark.theme || app.config.rack_dev_mark.custom_theme
            racks << theme
          end
          app.config.app_middleware.insert_before *racks
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-dev-mark-0.6.3 lib/rack/dev-mark/railtie.rb
rack-dev-mark-0.6.2 lib/rack/dev-mark/railtie.rb