0.01
No commit activity in last 3 years
No release in over 3 years
A Campfire adapter for Lita.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
~> 3.0

Runtime

>= 4.0.0
~> 1.10.0
 Project Readme

Campfire adapter for Lita

Gem Version Build Status Coverage Status Code Climate Dependency Status

lita-campfire is an adapter for Lita that allows you to use the robot with Campfire.

Installation

Add lita-campfire to your Lita instance's Gemfile:

gem "lita-campfire"

or if you want to use the bleeding edge version:

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.

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 = :campfire

  config.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:

heroku config:set CAMPFIRE_APIKEY=43242c42270856780656360bfbee863892
heroku config:set CAMPFIRE_SUBDOMAIN=orgname
heroku config:set CAMPFIRE_ROOMS=5674537,324424

License

MIT