-
Notifications
You must be signed in to change notification settings - Fork 7
/
init.rb
31 lines (26 loc) · 1.18 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
# Plugin should support Redmine 1.x and 2.x becuse guidelines were followed from: http://www.redmine.org/boards/3/topics/31445
# Support for 1.x has not yet been confirmed. Any takers?
# Patches to the Redmine core.
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require_dependency 'redmine_incoming_emails/patches/mail_handler_patch'
end
else
Dispatcher.to_prepare :redmine_incoming_emails do
require_dependency 'redmine_incoming_emails/patches/mail_handler_patch'
end
end
# Plugin Definition
Redmine::Plugin.register :redmine_incoming_emails do
name 'Incoming Emails plugin'
author 'Mark Whitfeld'
description 'This is a plugin for Redmine that allows for the configuration of the default project used when a user logs a new issue using email.'
version '0.0.1'
url 'https://github.com/markwhitfeld/redmine_incoming_emails'
author_url 'https://github.com/markwhitfeld/redmine_incoming_emails'
# See note at top of file regarding support for 1.x
requires_redmine :version_or_higher => '2.0.0'
settings(:partial => 'settings/incoming_emails_settings',
:default => {} )
end