lib/sys_watchdog/main.rb in sys_watchdog-0.1.6 vs lib/sys_watchdog/main.rb in sys_watchdog-0.1.7

- old
+ new

@@ -27,12 +27,13 @@ Slack.configure do |config| config.token = @conf.slack_token end end if @conf.smtp_server + _conf = @conf Mail.defaults do - delivery_method :smtp, address: @conf.smtp_server, port: 587, :domain => @conf.smtp_domain, + delivery_method :smtp, address: _conf.smtp_server, port: 587, :domain => _conf.smtp_domain, :enable_starttls_auto => true, :openssl_verify_mode => 'none' end end end @@ -78,11 +79,11 @@ else if test.restore_cmd and not after_restore test.restore run_test test, after_restore: true else - fail test, exitstatus, output + fail test, output end end rescue => e @logger.error e.desc end @@ -92,11 +93,11 @@ notify "#{test.name} changed", "old: #{test.previous_output}\nnew: #{output}" test.previous_output = output end end - def fail test, exitstatus, output - body = "exitstatus: #{exitstatus}" - body += "\noutput: #{output}" if output and not output.empty? + def fail test, output + body = "" + body += "output: #{output}" if output and not output.empty? notify "#{test.name} fail", body end end