README.md
# GrowlCar
[![Build Status](https://travis-ci.org/matthewshafer/growl_car.png?branch=master)](https://travis-ci.org/matthewshafer/growl_car)
[![Dependency Status](https://gemnasium.com/matthewshafer/growl_car.png)](https://gemnasium.com/matthewshafer/growl_car)
[![Code Climate](https://codeclimate.com/github/matthewshafer/growl_car.png)](https://codeclimate.com/github/matthewshafer/growl_car)
[![Coverage Status](https://coveralls.io/repos/matthewshafer/growl_car/badge.png?branch=master)](https://coveralls.io/r/matthewshafer/growl_car)
Sending notifications to the growl provider on boxcar.io
## Installation
Add this line to your application's Gemfile:
gem 'growl_car'
And then execute:
$ bundle
Or install it yourself as:
$ gem install growl_car
## Usage
You will need to enable the Growl provider on your boxcar account.
### Sample Usage
```ruby
require 'growl_car'
GrowlCar.configure do |config|
config.username = "YOUR_BOXCAR_USERNAME"
config.password = "YOUR_BOXCAR_PASSWORD"
end
GrowlCar.send_growl_notification("GrowlCar-test", "This message is from GrowlCar")
```
It is also possible to instantiate a ``` GrowlCar::Client ``` to handle multiple users:
```ruby
matt = GrowlCar::Client.new(username: MATT_BOXCAR_USERNAME, password: MATT_BOXCAR_PASSWORD)
alex = GrowlCar::Client.new(username: ALEX_BOXCAR_USERNAME, password: ALEX_BOXCAR_PASSWORD)
matt.send_growl_notification("GrowlCar-matt", "Hey how's it going?")
alex.send_growl_notification("GrowlCar-alex", "The Food is ready")
```
### Errors
the ``` send_growl_notification ``` method can raise errors if it encounters any issues with boxcar.
If is unable to log in (unauthorized response) it will raise a ``` GrowlCar::Error::UnauthorizedError ```
For any response that is not a 200 or 401 (unauthorized) it will raise a ``` GrowlCar::Error::HttpError ```
## Documentation
You can find the latest documentation of the master branch here: http://rubydoc.info/github/matthewshafer/growl_car/
## Contributing
### Issues
Issues can be reported right here on the github repo.
Everyone is encouraged to write an issue if they find a bug or have a request.
### Pull Requests
Everyone can also submit pull requests. Here are some guidelines:
1. Fork the repo
2. Create a branch (make the name descriptive)
3. Write tests and work on your changes
4. Make sure all tests pass and your code is covered
5. Open a pull request and write a description of what you did