# \[ANN\]GrowlNotifier 1.0.1

**URL:** <https://rubytalk.org/t/ann-growlnotifier-1-0-1/48470>\
**Category:** ruby-talk\
**Created:** [20 August 2008 09:55 UTC](https://rubytalk.org/t/ann-growlnotifier-1-0-1/48470 "2008-08-20T09:55:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satoshi\_Nakagawa](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@Satoshi\_Nakagawa](https://rubytalk.org/u/Satoshi_Nakagawa)\
**Post date:** [20 August 2008 09:55 UTC](https://rubytalk.org/t/ann-growlnotifier-1-0-1/48470/1 "2008-08-20T09:55:57Z")

</div>

Growl Notifier 1.0.1 has been released.

&nbsp;&nbsp;[http://rubyforge.org/projects/growlnotifier/](http://rubyforge.org/projects/growlnotifier/)  
&nbsp;&nbsp;[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:  
&nbsp;&nbsp;[http://github.com/psychs/limechat/tree/master](http://github.com/psychs/limechat/tree/master)

WebApp:  
&nbsp;&nbsp;[http://github.com/alloy/webapp-app/tree/master](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  
&nbsp;&nbsp;HELLO\_TYPE = 'Hello message received'

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

&nbsp;&nbsp;def growlNotifierClicked\_context(sender, context)  
&nbsp;&nbsp;&nbsp;&nbsp;puts "Clicked: #{context}"  
&nbsp;&nbsp;&nbsp;&nbsp;checkCount  
&nbsp;&nbsp;end

&nbsp;&nbsp;def growlNotifierTimedOut\_context(sender, context)  
&nbsp;&nbsp;&nbsp;&nbsp;puts "Timed out: #{context}"  
&nbsp;&nbsp;&nbsp;&nbsp;checkCount  
&nbsp;&nbsp;end

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

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

> **···**
>
> --  
> Satoshi Nakagawa

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [20 August 2008 18:21 UTC](https://rubytalk.org/t/ann-growlnotifier-1-0-1/48470/2 "2008-08-20T18:21:02Z")

</div>

How does this compare to meow ?

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

Blessings,  
TwP

> **···**
>
> On Aug 20, 2008, at 3:55 AM, Satoshi Nakagawa wrote:
> 
> > 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.

---

<div class="post-metadata">

**Author:** ![Eloy\_Duran](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@Eloy\_Duran](https://rubytalk.org/u/Eloy_Duran)\
**Post date:** [21 August 2008 06:17 UTC](https://rubytalk.org/t/ann-growlnotifier-1-0-1/48470/3 "2008-08-21T06:17:59Z")

</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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
