forked from phlegx/redmine_rocketchat
-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathinit.rb
21 lines (15 loc) · 790 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true
loader = RedminePluginKit::Loader.new plugin_id: 'redmine_messenger'
Redmine::Plugin.register :redmine_messenger do
name 'Messenger'
author 'AlphaNodes GmbH'
url 'https://github.com/alphanodes/redmine_messenger'
author_url 'https://alphanodes.com/'
description 'Messenger integration for Slack, Discord, Rocketchat and Mattermost support'
version RedmineMessenger::VERSION
requires_redmine version_or_higher: '4.2.0'
permission :manage_messenger, projects: :settings, messenger_settings: :update
settings default: loader.default_settings, partial: 'settings/messenger_settings'
end
RedminePluginKit::Loader.persisting { loader.load_model_hooks! }
RedminePluginKit::Loader.to_prepare { RedmineMessenger.setup! } if Rails.version < '6.0'