https://github.com/aapis/notifaction
Include terminal and OS notifications in your ruby projects
https://github.com/aapis/notifaction
Last synced: 3 months ago
JSON representation
Include terminal and OS notifications in your ruby projects
- Host: GitHub
- URL: https://github.com/aapis/notifaction
- Owner: aapis
- License: mit
- Created: 2015-06-10T17:48:27.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-09T18:58:56.000Z (over 8 years ago)
- Last Synced: 2025-02-12T05:44:23.908Z (5 months ago)
- Language: Ruby
- Size: 90.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Notifaction
Include terminal and OS notifications in your project.
## Usage
```ruby
gem install notifaction# ...
require 'notifaction'# Print an angry red terminal message
# Other methods:
# - success (green)
# - info (blue)
# - note (light blue)
# - warning (yellow)
# - spit (no colour/white)
begin
call_method
rescue => e
Notify.error(e.message)
end# display a bubble notification in OSX and Linux
if install_successful
Notify.bubble("You can now proceed to use our software...", "Install Successful")
end
```Plugins extend the base notification functionality, sending messages to online services. This example will show you how to send log information to a 3rd party service.
```ruby
# ~/.notifaction.ymlhooks:
- "https://api.yourwebsite.com/messages/receive?token=1am4t0k3n"
```That's it. You will start receiving POST requests at the URL(s) listed in the `hooks` section of the configuration file.