Sha256: 6573a5648454d643b01d557fc5a580fcfad2db3e2330e4ebec49298c55bd50ee
Contents?: true
Size: 760 Bytes
Versions: 9
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true require 'rails' module Mnemosyne class Railtie < ::Rails::Railtie initializer 'mnemosyne.initialize' do |app| config = app.config_for('mnemosyne') ::Mnemosyne::Logging.logger = Rails.logger config['application'] ||= app.class.name.underscore.titleize # If server is configured mnemosyne should be enabled by default config['enabled'] = config.key?('server') unless config.key?('enabled') config = ::Mnemosyne::Configuration.new(config) if config.enabled? ::Mnemosyne::Instrumenter.start!(config) app.middleware.insert 0, ::Mnemosyne::Middleware::Rack else Rails.logger.warn(Mnemosyne) { 'Instrumentation disabled' } end end end end
Version data entries
9 entries across 9 versions & 1 rubygems