Module: HydraulicBrake::TestNotification

Defined in:
lib/hydraulic_brake/test_notification.rb

Class Method Summary collapse

Class Method Details

.sendObject



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/hydraulic_brake/test_notification.rb', line 4

def self.send
  begin
    raise "Testing hydraulic brake notifier. If you can see this, it works."
  rescue Exception => e
    puts "Configuration:"
    HydraulicBrake.configuration.to_hash.each do |key, value|
      puts sprintf("%25s: %s", key.to_s, value.inspect.slice(0, 55))
    end
    print "Sending notification... "
    HydraulicBrake.notify(e)
    print "done\n"
  end
end