-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
41 lines (33 loc) · 1.54 KB
/
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
32
33
34
35
36
37
38
39
40
41
Redmine::Plugin.register :redmine_commet do
name 'Redmine Commet plugin'
author 'Commet development team'
description 'This is a plugin for Redmine'
version '0.0.1'
url 'http://github.com/issf/redmine_commet'
author_url 'http://github.com/issf'
project_module :commet do
permission :manage_commet_webhooks,
:webhook_settings => [:index, :new, :create,
:show, :edit, :update, :destroy],
:require => :member
end
settings :default=>{
:redmine_domain=>''
}, :partial => 'settings/redmine_commet/setting'
menu :project_menu, :redmine_commet,
{ :controller => 'webhook_settings', :action => 'index' },
:caption => 'Commet webhooks', :after => :activity, :param => :project_id
end
Rails.application.config.to_prepare do
# controller
# ApplicationController.send(:include, RedmineCommet::Patches::Controllers::ApplicationControllerPatch)
IssuesController.send(:include, RedmineCommet::Patches::Controllers::IssuesControllerPatch)
WikiController.send(:include, RedmineCommet::Patches::Controllers::WikiControllerPatch)
DocumentsController.send(:include, RedmineCommet::Patches::Controllers::DocumentsControllerPatch)
#models
Attachment.send(:include, RedmineCommet::Patches::AttachmentPatch)
Issue.send(:include, RedmineCommet::Patches::IssuePatch)
Project.send(:include, RedmineCommet::Patches::ProjectPatch)
WikiContent.send(:include, RedmineCommet::Patches::WikiPatch)
Document.send(:include, RedmineCommet::Patches::DocumentPatch)
end