Created
February 14, 2015 03:59
-
-
Save awaxa/67b859b08941ac5ee1d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lita.configure do |config| | |
options = { | |
:name => "diabot", | |
:channels => [ "##diabot" ], | |
} | |
case ENV['ENV'] | |
when /production/i | |
options[:channels] << [ "##reddit-diabetes", "##reddit-diabetes-ops" ] | |
else | |
options[:name] = "liabot" | |
end | |
# The name your robot will use. | |
config.robot.name = options[:name] | |
# The locale code for the language to use. | |
config.robot.locale = :en | |
# The severity of messages to log. Options are: | |
# :debug, :info, :warn, :error, :fatal | |
# Messages at the selected level and above will be logged. | |
config.robot.log_level = :debug | |
# An array of user IDs that are considered administrators. These users | |
# the ability to add and remove other users from authorization groups. | |
# What is considered a user ID will change depending on which adapter you use. | |
# config.robot.admins = ["1", "2"] | |
# The adapter you want to connect with. Make sure you've added the | |
# appropriate gem to the Gemfile. | |
# config.robot.adapter = :shell | |
config.robot.adapter = :irc | |
config.adapters.irc.server = "irc.freenode.net" | |
config.adapters.irc.channels = options[:channels] | |
config.adapters.irc.log_level = :debug | |
config.adapters.irc.cinch = lambda do |cinch_config| | |
cinch_config.max_reconnect_delay = 123 | |
cinch_config.port = "6697" | |
cinch_config.ssl.use = true | |
end | |
## Example: Set options for the chosen adapter. | |
# config.adapter.username = "myname" | |
# config.adapter.password = "secret" | |
## Example: Set options for the Redis connection. | |
# config.redis.host = "127.0.0.1" | |
# config.redis.port = 1234 | |
platform = :heroku if ENV["DYNO"] | |
platform = :boxen if ENV["BOXEN_SETUP_VERSION"] | |
case platform | |
when :heroku | |
config.redis[:url] = ENV["REDISTOGO_URL"] | |
config.http.port = ENV["PORT"] | |
when :boxen | |
config.redis[:url] = ENV["BOXEN_REDIS_URL"] | |
end | |
## Example: Set configuration for any loaded handlers. See the handler's | |
## documentation for options. | |
# config.handlers.some_handler.some_config_key = "value" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment