Project

notifies

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby notifications with Growl and OS X Notification Center.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

Runtime

 Project Readme

notifies

Simple notifications with Growl and OS X Notification Center.

Gem Version Dependency Status Build Status Coverage Status

Installation

In your Gemfile:

gem 'notifies', '~> 0.1.0'

Manually:

gem install notifies

Usage

It's as simple as:

Notifies.notify 'Hello World!'

This will automatically select and use the first available notifier.

The method returns:

  • true if everything worked;
  • nil if no notifier is available on your system;
  • false if the notifier failed.

Notification Options

The following options are available:

  • :type - The type of notification. With some notifiers this changes the icon. This must be either :ok, :info, :warning or :error. By default, :info is selected.
  • :title - The title of the notification. This is set by the notifier by default (e.g. "growlnotify" for the Growl notifier).
  • :subtitle - An optional subtitle.
  • :icon - Custom icon. Only supported with Growl, see the documentation.
Notifies.notify 'Hello World!', type: :ok, title: 'My App', subtitle: 'Notifications'

Aliases

You can uses these aliases instead of passing the :type option:

Notifies.notify_ok 'It works!'
Notifies.notify_info 'Useful information'
Notifies.notify_warning 'Beware'
Notifies.notify_error 'Broken'

Contributing

  • Fork
  • Create a topic branch - git checkout -b my_branch
  • Push to your branch - git push origin my_branch
  • Create a pull request from your branch

Please add a changelog entry for new features and bug fixes. Writing specs will get your code pulled faster.

Meta

  • Author: Simon Oulevay (Alpha Hydrae)
  • License: MIT (see LICENSE.txt)