-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlita_config.rb
More file actions
18 lines (18 loc) · 840 Bytes
/
lita_config.rb
File metadata and controls
18 lines (18 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
APP_ROOT_PATH = File.expand_path(File.dirname(__FILE__))
IGOR_VERSION = "1.0.3"
require 'fileutils'
require 'json'
Dir['lita/lib/*.rb'].each { |file| require_relative file }
Dir['lita/models/*.rb'].each { |file| require_relative file }
Dir['lita/handlers/abstract_*.rb'].each { |file| require_relative file }
Dir['lita/handlers/*.rb'].each { |file| require_relative file }
Lita.configure do |config|
config.robot.log_level = (ENV.fetch('LITA_INFO_LEVEL') { :warn }).to_sym
config.redis[:host] = ENV['REDIS_HOST'] || ENV['REDIS_ADDRESS'] || 'localhost'
config.redis[:port] = ENV['REDIS_PORT'] || 6379
config.robot.adapter = :slack
if(config.adapters.respond_to?(:slack))
slack_token_json = JSON.parse((File.read("/opt/chat-ops-common/slack-token.json")))
config.adapters.slack.token = slack_token_json["slack_token"]
end
end