Class ErrorNotifier
In: lib/task_helper.rb
Parent: Object

For checking commits

class ErrorNotifier < ActionMailer::Base

Methods

Public Class methods

Functions

[Source]

    # File lib/task_helper.rb, line 19
19:   def self.run_and_report_if_erred(shell_line, task = 'Script')
20:     puts shell_line
21:     output = `#{shell_line}`
22:     process = $?
23:     if process.exitstatus != 0
24:       puts 'Error at: ' + shell_line
25:     # To prevent messages to the list
26:     #  ErrorNotifier.deliver_failure(output, task)
27:     #  break
28:     end
29:   end

Public Instance methods

Methods

[Source]

    # File lib/task_helper.rb, line 32
32:   def failure(error, task)
33:     puts 'error: ' + error.inspect + ' ' + task
34:     @subject = "#{task} broken"
35:     @body = error
36:     @recipients = 'logilogi-list@lists.sourceforge.net'
37:     @from = 'admin@logilogi.org'
38:     @sent_on = Time.now
39:   end

[Validate]