Skip to content

gaelian/self-notifo

Repository files navigation

self-notifo

The self-notifo gem allows you to send Notifo (notifo.com) notifications to your own Notifo account from your Rails app.

Installation

$ gem install self-notifo

Usage

Sign up for a Notifo account (it’s free). Take note of your API Username and API Secret (find on your account settings page on the Notifo site). Download and install one of Notifo’s mobile, desktop or other apps from their site.

Now cd into your Rails root and run:

rails generate self_notifo NOTIFO_USERNAME NOTIFO_API_SECRET "Label Describing Your Application"

This will generate a file called self-notifo.yml in your config directory (you may wish to add this file to .gitignore or equivalent).

When you want to send a notification from your Rails app:

SelfNotifo.new(:msg => "My message.")

Optional parameters can be added:

SelfNotifo.new(:msg => "My message.", :title => "My Notification Title", :uri => "http://some.com")

You can also override the settings in self-notifo.yml:

SelfNotifo.new(:msg => "My message.", :title => "My Notification Title", :uri => "http://some.com", :label => 'My Label' :username => 'USERNAME', :api_secret => 'API_SECRET')

See api.notifo.com/docs/notifications for more info on the Notifo API.

Note on Tests

If you don’t want to have notifications sent from your test environment while you run your tests, change send_in_test to false in self-notifo.yml.

Dependencies

  • Ruby on Rails, version 3.0.0 or newer.

  • self-notifo likes to party with John Nunemaker’s fun loving httparty version 0.6.1 or newer.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Gaelian Ditchburn. See LICENSE for details.

About

The self-notifo gem sends notifications to your own Notifo account from your Rails application.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages