-
Notifications
You must be signed in to change notification settings - Fork 34
/
init.rb
40 lines (29 loc) · 1.45 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
require 'redmine'
require 'question_issue_hooks'
require 'question_kanban_hooks'
require 'question_layout_hooks'
require 'question_journal_hooks'
# Patches to the Redmine core.
require 'dispatcher'
Dispatcher.to_prepare :question_plugin do
require_dependency 'journal_observer'
JournalObserver.send(:include, QuestionPlugin::Patches::JournalObserverPatch)
require_dependency 'issue'
Issue.send(:include, QuestionIssuePatch) unless Issue.included_modules.include? QuestionIssuePatch
require_dependency 'journal'
Journal.send(:include, QuestionJournalPatch) unless Journal.included_modules.include? QuestionJournalPatch
require_dependency 'queries_helper'
QueriesHelper.send(:include, QuestionQueriesHelperPatch) unless QueriesHelper.included_modules.include? QuestionQueriesHelperPatch
require_dependency "query"
Query.send(:include, QuestionQueryPatch) unless Query.included_modules.include? QuestionQueryPatch
end
Redmine::Plugin.register :question_plugin do
name 'Redmine Question plugin'
author 'Eric Davis'
url "https://projects.littlestreamsoftware.com/projects/redmine-questions" if respond_to?(:url)
author_url 'http://www.littlestreamsoftware.com' if respond_to?(:author_url)
description 'This is a plugin for Redmine that will allow users to ask questions to each other in issue notes'
version '0.3.0'
requires_redmine :version_or_higher => '0.8.0'
end
require 'question_plugin/hooks/view_user_kanbans_show_contextual_top_hook'