Module: Trusty::Rake

Includes:
Errors::ExceptionHandlers
Defined in:
lib/trusty/rake.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Errors::ExceptionHandlers

#notify_exception, #try_with_data

Class Method Details

.handle_exceptions!Object



18
19
20
21
22
23
24
25
# File 'lib/trusty/rake.rb', line 18

def self.handle_exceptions!
  ::Rake.application.instance_eval do
    class << self
      # include this module
      include Rake
    end
  end
end

.included(base) ⇒ Object



11
12
13
14
15
16
# File 'lib/trusty/rake.rb', line 11

def self.included(base)
  base.class_eval do
    alias_method :display_error_message_without_email, :display_error_message
    alias_method :display_error_message, :display_error_message_with_email
  end
end

Instance Method Details

#display_error_message_with_email(exception) ⇒ Object



27
28
29
30
# File 'lib/trusty/rake.rb', line 27

def display_error_message_with_email(exception)
  notify_exception(exception)
  display_error_message_without_email(exception)
end