# GrowlNotifier 1.0.1

**URL:** <https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370>\
**Category:** Ruby\
**Created:** [August 20, 2008, 12:00pm UTC](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370 "2008-08-20T12:00:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satoshi\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Satoshi\_N](https://www.ruby-forum.com/u/Satoshi_N)\
**Post date:** [August 20, 2008, 12:00pm UTC](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370/1 "2008-08-20T12:00:14Z")

</div>

Growl Notifier 1.0.1 has been released.

[http://rubyforge.org/projects/growlnotifier/](http://rubyforge.org/projects/growlnotifier/)  
[http://growlnotifier.rubyforge.org/](http://growlnotifier.rubyforge.org/)

Growl Notifier allows your application to post Growl notifications.  
It can then receive clicked and timed out notifications from Growl.  
Or you can give it a block, which will then be used as a clicked  
callback.

It is an extraction and clean up of the Growl code from LimeChat.  
The option to pass procs is extracted from WebApp.

LimeChat:  
[GitHub - psychs/limechat: IRC Client for Mac](http://github.com/psychs/limechat/tree/master)

WebApp:  
[GitHub - alloy/webapp-app: A SSB OSX application, which at some point will be able to create a new application which wraps a specific web application, (Think Campfire, Twitter etc) and allows the user to use Ruby to create event handlers to be able support things like Growl or whatever you would like.](http://github.com/alloy/webapp-app/tree/master)

== Installation

gem install growlnotifier

== Requirements

- Mac OS X 10.4 or 10.5
- Ruby 1.8
- RubyCocoa 0.13.1

== Example

require ‘rubygems’  
require ‘growl’

class GrowlController \< OSX::NSObject  
HELLO\_TYPE = ‘Hello message received’

def init  
if super\_init  
@g = Growl::Notifier.sharedInstance  
@g.delegate = self  
@g.register(‘GrowlSample’, [HELLO\_TYPE])  
@g.notify(HELLO\_TYPE, ‘Sticky’, ‘Hello world’,  
:sticky =\> true, :click\_context =\> Time.now.to\_s )  
@g.notify(HELLO\_TYPE, ‘Timed out’, ‘Hello world’,  
:click\_context =\> Time.now.to\_s )  
@count = 2  
self  
end  
end

def growlNotifierClicked\_context(sender, context)  
puts “Clicked: #{context}”  
checkCount  
end

def growlNotifierTimedOut\_context(sender, context)  
puts “Timed out: #{context}”  
checkCount  
end

def checkCount  
@count -= 1  
OSX::NSApp.terminate(nil) if @count == 0  
end  
end

g = GrowlController.alloc.init  
OSX::NSApp.run

---

<div class="post-metadata">

**Author:** ![Satoshi\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Satoshi\_N](https://www.ruby-forum.com/u/Satoshi_N)\
**Post date:** [August 20, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370/2 "2008-08-20T20:25:02Z")

</div>

On Aug 20, 2008, at 3:55 AM, Satoshi N. wrote:

> It is an extraction and clean up of the Growl code from LimeChat.  
> The option to pass procs is extracted from WebApp.

How does this compare to meow ?

[http://rubyforge.org/projects/meow](http://rubyforge.org/projects/meow)

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![Satoshi\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6de8d8/32.png) [@Satoshi\_N](https://www.ruby-forum.com/u/Satoshi_N)\
**Post date:** [August 21, 2008, 8:21am UTC](https://www.ruby-forum.com/t/growlnotifier-1-0-1/146370/3 "2008-08-21T08:21:41Z")

</div>

> How does this compare to meow ?
> 
> [http://rubyforge.org/projects/meow](http://rubyforge.org/projects/meow)

Hi Tim,

At some point we decided we wanted to extract this code as a separate  
lib and gem.  
During this process we discovered the Meow lib. But after studying the  
source, at that point in time, we decided to go ahead anyway. Because  
our code was more mature and with better test coverage etc.

We have however not compared them at this point in time, so if you do  
please let us know 🙂

Cheers,  
Eloy
