On Sun, Aug 10, 2008 at 3:36 PM, Alex Boisvert <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 24, 2008 at 5:02 PM, Assaf Arkin <[EMAIL PROTECTED]> wrote:
>
>> == Growl
>>
>> For those of you running on OS X and have Growl installed (which I'm
>> told is practically everyone running on OS X), I added Growl
>> notifications for completed and failed builds.  You can turn them
>> on/off from the Growl notification pane.  I heard that Growl is coming
>> to Windows and there's an alpha out.

Premature generalization is the root of all something something.

For Growl we register two notification types.  The way, from the Growl
preference panel you pick a notification type and turn it off, make it
sticky, add a sound, etc.  It works because type is not an open-ended
list, Growl knows all the notification types we'll ever send.

If there's a good reason for having a third notification type we can
register it; if there's a use case we'll know what the API should look
like to add it.  Otherwise we're prematurely abstracting the API and
in doing so actually making Growl less useful.  The original
implementation was not lack of foresight, but designed to only provide
what is necessary and use it to maximum effect.

Separately, Object is a really bad kitchen sink.  Methods that enter
Object need to justify their inclusion, not be there imagining someone
would one day maybe opt to use them.  If something gets used a lot,
you want to make it easily accessible: warn, trace, info are something
we want to encourage people to use.  I don't see a use case for pop up
notifications that would justify polluting Object.

Assaf

>
>
> As a general mechanism, I'd like to suggest that Buildr could use the
> BUILDR_NOTIFY environment variable to check if notifications should be sent
> and use its value as a system command, substituting the literals {type},
> {title} and {message} for their corresponding values.
>
> For example, on my system I would define:
>
> export BUILDR_NOTIFY="qube -i \"{title}\" \"{message}\""
>
> to use Qube <https://launchpad.net/qube>, a libnotify client on Ubuntu
> Linux.
>
> Similarly, in the spirit of error(), warn(), info() and trace(), it would be
> nice to make notify(type, title, message) available so that tasks dispatch
> notifications as well.
>
> I'm committing the code to support this as basis for discussion and/or
> improvement.
>
> alex
>

Reply via email to