Glip Poster

Gem Version Build Status Coverage Status Dependency Status Code Climate Scrutinizer Code Quality Downloads Docs License

Installation

Via Bundler

Add 'glip-poster' to Gemfile and then run bundle:

$ echo "gem 'glip-poster'" >> Gemfile
$ bundle

Via RubyGems

$ gem install glip-poster

Usage

First you have to initialize your poster and then you can use send_message to send your message.

poster = Glip::Poster.new(YOUR_WEBHOOK_URL)
poster.send_message('Hello World!') # Faraday::Response

You can send text in Markdown:

poster = Glip::Poster.new(YOUR_WEBHOOK_URL)
poster.send_message('* Location: [The Funky Buddha Lounge](http://www.thefunkybuddha.com)\n*Beer Advocate Rating: [99](http://tinyurl.com/psf4uzq)')

You can use an options array if you don't want to use the default settings.

options => {
  :icon": "http://example.com/icon.png",
  :activity": "Activity Alert",
  :title": "A New Incoming Message Has Been Received",
}
poster = Glip::Poster.new(YOUR_WEBHOOK_URL)
poster.send_message('Hello Beer!', options)

You can preset your options:

poster = Glip::Poster.new(YOUR_WEBHOOK_URL)
poster.options[:icon] = 'http://example.com/icon.png'
poster.options = {:icon => 'http://example.com/icon.png'}
poster.send_message('Hello World!')

Supported Ruby Versions

This library supports and is tested against the following Ruby implementations:

  1. Ruby 2.3.0
  2. Ruby 2.2.0
  3. Ruby 2.1.0
  4. Ruby 2.0.0
  5. Ruby 1.9.3
  6. JRuby
  7. Rubinius

Releases

Releases with release notes are availabe on GitHub releases. Release notes include a high level description of the release as well as lists of non-breaking and breaking changes.

Change Log

See CHANGELOG.md

Project Repo

Glip

Contributing

  1. Fork it ( http://github.com/grokify/glip-poster-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request