module BulletBoard

Constants

VERSION

Public Class Methods

enable(&block) click to toggle source

def self.enable_with_dependencies; end

# File lib/bullet-board.rb, line 9
def self.enable &block
  configure_with_defaults
  block.call if block_given?
rescue ConfigurationError => e
  Rails.logger.error "Error: #{e.message}"
  # change to false because we just want the customized logger
  # currently looping twice through UniformNotifier.active_notifiers in
  # Bullet#for_each_active_notifier_with_notification
ensure
  Bullet.bullet_logger = false
  print_success_notification_to_stderr if Bullet.web_logger_enabled?
end

Private Class Methods

configure_with_defaults() click to toggle source
# File lib/bullet-board.rb, line 30
def self.configure_with_defaults
  Bullet.enable = true
  Bullet.web_logger = true
end
print_success_notification_to_stderr() click to toggle source