Skip to content

Commit

Permalink
Fix spaces and indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
smartinez87 committed Jul 30, 2011
1 parent 47e4c2b commit 54f0eca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/exception_notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def self.default_ignore_exceptions

def initialize(app, options = {})
@app, @options = app, options

Notifier.default_sender_address = @options[:sender_address]
Notifier.default_exception_recipients = @options[:exception_recipients]
Notifier.default_email_prefix = @options[:email_prefix]
Notifier.default_sections = @options[:sections]

@options[:ignore_exceptions] ||= self.class.default_ignore_exceptions
end

Expand Down
39 changes: 19 additions & 20 deletions lib/exception_notifier/notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class << self
attr_writer :default_exception_recipients
attr_writer :default_email_prefix
attr_writer :default_sections

def default_sender_address
@default_sender_address || %("Exception Notifier" <[email protected]>)
end
Expand Down Expand Up @@ -65,25 +65,24 @@ def exception_notification(env, exception)
end

private

def clean_backtrace(exception)
Rails.respond_to?(:backtrace_cleaner) ?
Rails.backtrace_cleaner.send(:filter, exception.backtrace) :
exception.backtrace
end

helper_method :inspect_object

def inspect_object(object)
case object
when Hash, Array
object.inspect
when ActionController::Base
"#{object.controller_name}##{object.action_name}"
else
object.to_s
end

def clean_backtrace(exception)
Rails.respond_to?(:backtrace_cleaner) ?
Rails.backtrace_cleaner.send(:filter, exception.backtrace) :
exception.backtrace
end

helper_method :inspect_object

def inspect_object(object)
case object
when Hash, Array
object.inspect
when ActionController::Base
"#{object.controller_name}##{object.action_name}"
else
object.to_s
end
end
end
end

0 comments on commit 54f0eca

Please sign in to comment.