alloy/terminal-notifier — pull request #39 by ipwnstuff (2013-01-13 07:41:44+00:00)
Title: [Ruby] Add an unsupported platform error to replace stderr

I didn't like seeing https://github.com/alloy/terminal-notifier/pull/23 getting merged. I agree with @alloy that the `available?` method is the proper way to go about incompatibility. Raising an exception makes more sense. I've added an exception class as well so it looks more graceful.

It may be a pain (@mgrosso) but replacing the line `TerminalNotifier.notify('foo', title: 'bar')` with `TerminalNotifier.notify('foo', title: 'bar') if TerminalNotifier.available?` is relatively no trouble.

`%s/TerminalNotifier\.notify('foo', title: 'bar')/TerminalNotifier\.notify('foo', title: 'bar') if TerminalNotifier\.available?/`