Sha256: bac0df5d6146039bb409ca76673bdd9aa43f7a3b5122ca76a979aa55ca17b68c

Contents?: true

Size: 763 Bytes

Versions: 2

Compression:

Stored size: 763 Bytes

Contents

require_relative './middleware.rb'
require_relative './models/collection.rb'
require_relative './metrics_collector.rb'

module RailsPerformance
  class Engine < ::Rails::Engine

    #config.app_middleware.use RailsPerformance::Middleware
    config.app_middleware.insert_after ActionDispatch::Executor, RailsPerformance::Middleware

    initializer :configure_metrics, after: :initialize_logger do
      ActiveSupport::Notifications.subscribe(
        "process_action.action_controller",
        RailsPerformance::MetricsCollector.new
      )
    end

    # initializer 'rails_performance.helpers' do
    #   ActiveSupport.on_load :action_view do
    #     ActionView::Base.send :include, RailsPerformance::RailsPerformanceHelper
    #   end
    # end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_performance-0.0.1.6 lib/rails_performance/engine.rb
rails_performance-0.0.1.5 lib/rails_performance/engine.rb