Guard::Pushover
Send Pushover notifications with Guard!
Installation
$ gem install guard-pushover
or
# Add to Gemfile
gem 'guard/pushover
or install it yourself
$ git clone git@github.com:joenas/guard-pushover.git
$ cd guard-pushover
$ rake install
Usage
To generate template:
$ guard init pushover
Examples
# Give the filename as it is
guard :pushover, :api_key => '', :user_key => '' do
watch(/lib\/(.*).rb/)
end
#=> "file.rb was changed"
# Custom message
guard :pushover, :message => "Yo! I just changed %s!", :api_key => '', :user_key => '' do
watch(/lib\/(.*).rb/)
end
#=> "Yo! I just changed file.rb!"
# Do something with the filename before giving it to Pushover
guard :pushover, :api_key => '', :user_key => '' do
watch(/lib\/(.*).rb/) { |match| match[0].uppercase }
end
#=> "FILE.RB was changed"
Available options
:title => 'Title' # Custom title, default is 'Guard'
:priority => 1 # Priority, default is 0
:message => "Filename: %s" # Custom message, using sprintf.
:ignore_additions => true # Ignores added files
:ignore_changes => true # Ignores changed files
:ignore_removals => true # Ignores removed files
Read more on Pushover API.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request