forked from sciyoshi/redmine-slack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
31 lines (26 loc) · 881 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'redmine'
require_dependency 'redmine_slack/listener'
Redmine::Plugin.register :redmine_slack do
name 'Redmine Slack'
author 'Samuel Cormier-Iijima'
url 'https://github.com/sciyoshi/redmine-slack'
author_url 'http://www.sciyoshi.com'
description 'Slack chat integration'
version '0.2'
requires_redmine :version_or_higher => '0.8.0'
settings \
:default => {
'callback_url' => 'http://slack.com/callback/',
'channel' => nil,
'icon' => 'https://raw.github.com/sciyoshi/redmine-slack/gh-pages/icon.png',
'username' => 'redmine',
'display_watchers' => 'no'
},
:partial => 'settings/slack_settings'
end
((Rails.version > "5")? ActiveSupport::Reloader : ActionDispatch::Callbacks).to_prepare do
require_dependency 'issue'
unless Issue.included_modules.include? RedmineSlack::IssuePatch
Issue.send(:include, RedmineSlack::IssuePatch)
end
end