/usr/lib/ruby/1.8/ramaze/log/growl.rb is in libramaze-ruby1.8 2010.06.18-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.
require 'ruby-growl'
module Ramaze
module Logger
# Informer for the growl notification system on OSX.
class Growl < ::Growl
trait :defaults => {
:name => 'walrus',
:host => 'localhost',
:password => 'walrus',
:all_notifies => %w[error warn debug info dev],
:default_notifies => %w[error warn info]
}
# Takes the options from the default trait for merging.
def initialize(options = {})
options = class_trait[:defaults].merge(options).values_at(:host, :name, :all_notifies, :default_notifies, :password)
super(*options)
end
# integration to Logging
def log(tag, *args)
notify(tag.to_s, Time.now.strftime("%X"), args.join("\n")[0..100])
rescue Errno::EMSGSIZE
# Send size was to big (not really), ignore
end
end
end
end
|