-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
34 lines (26 loc) · 1.16 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
require 'redmine'
# Dir[File.join(Redmine::Plugin.directory,'redmine_exception_handler','vendor','plugins','*')].each do |dir|
# path = File.join(dir, 'lib')
# $LOAD_PATH << path
# ActiveSupport::Dependencies.autoload_paths << path
# end
Redmine::Plugin.register :redmine_exception_handler do
name 'Redmine Exception Handler plugin'
author 'Eric Davis'
description 'Send emails when exceptions occur in Redmine.'
version ExceptionHandler::VERSION.to_s
requires_redmine :version_or_higher => '3.0.0'
settings :default => {
'exception_handler_recipients' => '[email protected], [email protected]',
'exception_handler_sender_address' => 'RDQ3 Exception <[email protected]>',
'exception_handler_prefix' => "[RDQ3 #{Rails.env}] ",
'exception_handler_email_format' => 'text'
}, :partial => 'settings/exception_handler_settings'
end
require_dependency 'exception_notification'
require_dependency 'exception_notifier'
ExceptionNotifier.send(:include, ExceptionHandler::RedmineNotifierPatch)
RedmineApp::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
:sections => %w(request session environment backtrace)
}