Module: AppMonitor::RakePatch

Defined in:
lib/appmonitor/rake_patch.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



6
7
8
9
10
11
# File 'lib/appmonitor/rake_patch.rb', line 6

def self.included(klass)
  klass.class_eval do
    alias_method :display_error_message_without_notifications, :display_error_message
    alias_method :display_error_message, :display_error_message_with_notifications
  end
end

Instance Method Details

#display_error_message_with_notifications(ex) ⇒ Object



13
14
15
16
17
# File 'lib/appmonitor/rake_patch.rb', line 13

def display_error_message_with_notifications(ex)
  display_error_message_without_notifications(ex)
  en = AppMonitor::EventNotifier.new(nil)
  en.send_rake_event(ex,:rake_command_line => reconstruct_command_line)
end

#reconstruct_command_lineObject



19
20
21
# File 'lib/appmonitor/rake_patch.rb', line 19

def reconstruct_command_line
  "rake #{ARGV.join(' ')}"
end