Sha256: bec37538880770ef09e074fb08f18cfd5c7fa76e785d79cf64cd3e440ac4ff34

Contents?: true

Size: 441 Bytes

Versions: 3

Compression:

Stored size: 441 Bytes

Contents

module HoptoadNotifier
  # used to initialize Rails-specific code
  class RailsInitializer
    def self.initialize
      rails_logger = if defined?(Rails.logger)
                       Rails.logger
                     elsif defined?(RAILS_DEFAULT_LOGGER)
                       RAILS_DEFAULT_LOGGER
                     end

      HoptoadNotifier.configure(true) do |config|
        config.logger = rails_logger
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hoptoad_notifier-2.1.2 lib/hoptoad_notifier/rails_initializer.rb
hoptoad_notifier-2.1.1 lib/hoptoad_notifier/rails_initializer.rb
hoptoad_notifier-2.1.0 lib/hoptoad_notifier/rails_initializer.rb