lib/isolator/configuration.rb in isolator-0.6.2 vs lib/isolator/configuration.rb in isolator-0.7.0

- old
+ new

@@ -3,24 +3,30 @@ module Isolator # Isolator configuration: # # - `raise_exceptions` - whether to raise an exception in case of offense; # defaults to true in test env and false otherwise. - # NOTE: env is infered from RACK_ENV and RAILS_ENV. + # NOTE: env is inferred from RACK_ENV and RAILS_ENV. # # - `logger` - logger instance (nil by default) # # - `send_notifications` - whether to send notifications (through uniform_notifier); - # defauls to false + # defaults to false + # + # - `backtrace_filter` - define a custom backtrace filtering (provide a callable) + # + # - `ignorer` - define a custom ignorer (must implement .prepare) + # class Configuration attr_accessor :raise_exceptions, :logger, :send_notifications, - :backtrace_filter + :backtrace_filter, :ignorer def initialize @logger = nil @raise_exceptions = test_env? @send_notifications = false @backtrace_filter = ->(backtrace) { backtrace.take(5) } + @ignorer = Isolator::Ignorer end alias raise_exceptions? raise_exceptions alias send_notifications? send_notifications