Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josacar/lita-campfire
Campfire adapter for lita
https://github.com/josacar/lita-campfire
Last synced: 15 days ago
JSON representation
Campfire adapter for lita
- Host: GitHub
- URL: https://github.com/josacar/lita-campfire
- Owner: josacar
- Created: 2013-07-18T15:28:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-06-25T06:16:46.000Z (over 3 years ago)
- Last Synced: 2024-04-24T23:21:18.618Z (7 months ago)
- Language: Ruby
- Size: 71.3 KB
- Stars: 7
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Campfire adapter for Lita
[![Gem Version](https://badge.fury.io/rb/lita-campfire.png)](http://badge.fury.io/rb/lita-campfire)
[![Build Status](https://secure.travis-ci.org/josacar/lita-campfire.png)](http://travis-ci.org/josacar/lita-campfire)
[![Coverage Status](https://coveralls.io/repos/josacar/lita-campfire/badge.png)](https://coveralls.io/r/josacar/lita-campfire)
[![Code Climate](https://codeclimate.com/github/josacar/lita-campfire.png)](https://codeclimate.com/github/josacar/lita-campfire)
[![Dependency Status](https://gemnasium.com/josacar/lita-campfire.png)](https://gemnasium.com/josacar/lita-campfire)**lita-campfire** is an adapter for [Lita](https://github.com/jimmycuadra/lita) that allows you to use the robot with [Campfire](https://campfirenow.com).
## Installation
Add lita-campfire to your Lita instance's Gemfile:
```ruby
gem "lita-campfire"
```or if you want to use the bleeding edge version:
```ruby
gem "lita-campfire", :git => 'https://github.com/josacar/lita-campfire.git'
```## Configuration
Values needed to work like apikey can be found on 'My info' link when logged, subdomain and rooms, extract it from the URL to join (https://org_name_example.campfirenow.com/rooms/78744).
### Required attributes
* `apikey` (String) - The APIKEY of your robot's Campfire account. Default: `nil`.
* `rooms` (Array) - The room ids to join by your robot. Default: `nil`.
* `subdomain` (String) - The organization name to join by your robot. Default: `nil`.### Optional attributes
* `debug` (Boolean) - If `true`, turns on the underlying Campfire library's (tinder) logger, which is fairly verbose. Default: `false`.
* `tinder_options` (Hash) - If set passes the options to tinder listen method when called**Note** You must set also `config.robot.name` and `config.robot.mention_name` to work.
### Example
This is the `lita_config.rb` file to work with campfire and be deployed on Heroku.
```ruby
Lita.configure do |config|
# The name your robot will use.
config.robot.name = "Campfire bot"
config.robot.mention_name = "robot"# The severity of messages to log.
config.robot.log_level = :info# The adapter you want to connect with.
config.robot.adapter = :campfireconfig.adapter.subdomain = ENV["CAMPFIRE_SUBDOMAIN"]
config.adapter.apikey = ENV["CAMPFIRE_APIKEY"]
config.adapter.rooms = ENV["CAMPFIRE_ROOMS"].split(',')
config.adapter.debug = false
config.adapter.tinder_options = { timeout: 30, user_agent: 'lita-campfire' }config.redis.url = ENV["REDISTOGO_URL"]
config.http.port = ENV["PORT"]config.handlers.google_images.safe_search = :off
end
```Then, set the variables like:
```bash
heroku config:set CAMPFIRE_APIKEY=43242c42270856780656360bfbee863892
heroku config:set CAMPFIRE_SUBDOMAIN=orgname
heroku config:set CAMPFIRE_ROOMS=5674537,324424
```## License
[MIT](http://opensource.org/licenses/MIT)