Sha256: 549f89fe2f2926c41560533b1d185f30dbe22784c0be64636105896cf944006b

Contents?: true

Size: 754 Bytes

Versions: 2

Compression:

Stored size: 754 Bytes

Contents

require 'rails/railtie'
require 'action_view/log_subscriber'
require 'action_controller/log_subscriber'
require 'active_record/log_subscriber'
require 'action_mailer/log_subscriber'

module Kenny
  # Tie to Rails application to access Rails.application.config
  class Railtie < Rails::Railtie
    config.kenny = Kenny.configs

    config.after_initialize do |app|
      Kenny.application = app

      # Define anonymous classes that inherit from ActiveSupport::LogSubscriber.
      # Within that anonymous class, define methods that
      # perform the user-defined actions when that instrumentation occurs.
      # If desired, user can define a specific logger for the specified instrumentation.
      Kenny.attach_to_instrumentations
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kenny-0.1.4 lib/kenny/railtie.rb
kenny-0.1.3 lib/kenny/railtie.rb