Module: Err::Configuration

Defined in:
lib/err/configuration.rb

Constant Summary collapse

DEFAULT_DEVELOPMENT_ENVIRONMENTS =
%w{ development test cucumber }
DEFAULT_IGNORE =
%w{
  ActiveRecord::RecordNotFound
  ActionController::RoutingError
  ActionController::InvalidAuthenticityToken
  CGI::Session::CookieStore::TamperedWithCookie
  ActionController::UnknownHttpMethod
  ActionController::UnknownAction
  AbstractController::ActionNotFound
  Mongoid::Errors::DocumentNotFound
  ActionController::UnknownFormat
}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.development_environmentsObject



17
18
19
# File 'lib/err/configuration.rb', line 17

def development_environments
  @development_environments ||= DEFAULT_DEVELOPMENT_ENVIRONMENTS.dup
end

.ignoreObject



23
24
25
# File 'lib/err/configuration.rb', line 23

def ignore
  @ignore ||= DEFAULT_IGNORE.dup
end

Class Method Details

.method_missing(method, *args, &block) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/err/configuration.rb', line 29

def method_missing(method, *args, &block)
  if service = Err.find_service_by_key(method)
    service.configure(&block) if service.enabled?
  else
    super
  end
end