Sha256: 4cf44da588cfd4d43d03bfdfc66cb0d33175b708f084428cc7f04061ff749481

Contents?: true

Size: 1.28 KB

Versions: 5

Compression:

Stored size: 1.28 KB

Contents

require 'skylight/core/railtie'

module Skylight
  class Railtie < Rails::Railtie
    include Skylight::Core::Railtie

    def self.config_class; Skylight::Config end
    def self.middleware_class; Skylight::Middleware end

    config.skylight = ActiveSupport::OrderedOptions.new

    # The environments in which skylight should be enabled
    config.skylight.environments = ['production']

    # The path to the configuration file
    config.skylight.config_path = "config/skylight.yml"

    # The probes to load
    #   net_http, action_controller, action_dispatch, action_view, and middleware are on by default
    #   See https://www.skylight.io/support/getting-more-from-skylight#available-instrumentation-options
    #   for a full list.
    config.skylight.probes = ['net_http', 'action_controller', 'action_dispatch', 'action_view', 'middleware']

    # The position in the middleware stack to place Skylight
    # Default is first, but can be `{ after: Middleware::Name }` or `{ before: Middleware::Name }`
    config.skylight.middleware_position = 0

    initializer 'skylight.configure' do |app|
      run_initializer(app)
    end

    private

      def development_warning
        super + "\n(To disable this message for all local apps, run `skylight disable_dev_warning`.)"
      end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
skylight-2.0.2 lib/skylight/railtie.rb
skylight-2.0.2.beta.1 lib/skylight/railtie.rb
skylight-2.0.2.beta lib/skylight/railtie.rb
skylight-2.0.1 lib/skylight/railtie.rb
skylight-2.0.0 lib/skylight/railtie.rb