erniebrodeur/pushover — pull request #1 by benwoody (2012-09-08 17:24:40+00:00)
Title: added ability to use Pushover#configure to set params

Changes:

Pushover#notification uses hash params to set token/user instead of set params
Pushover#configure added to add ability to set token/user in one fail swoop so it doesn't have to be continually set in params. Example:

Pushover.configure do |c|
c.token='app token'
c.user='your token'
end

Pushover.notification('Hello', 'World')

You can still set tokens in #notification, only using a hash:

Pushover.notification('Hello', 'World', token:'app token', user:'your token')

Binary still works with this commit.

Also, this helps with setting non-ivar'd user tokens. Now, if this is used inside of any sort of DSL or web app, the application token can be set by an admin, and the user token can be set by the user, as used at http://lobste.rs

pushover.rb is getting a bit large, might be an idea to put it in it's own file in ./lib