-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinit.rb
More file actions
25 lines (21 loc) · 864 Bytes
/
init.rb
File metadata and controls
25 lines (21 loc) · 864 Bytes
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
require 'rmplus_devtools/rmplus_devtools'
Redmine::Plugin.register :rmplus_devtools do
name 'RMPlus Devtools plugin'
author 'Alexey Glukhov'
description 'Collection of tools useful for Redmine developers'
version '0.1.0'
url 'https://github.com/pineapple-thief/rmplus_devtools.git'
author_url 'https://github.com/pineapple-thief'
settings :partial => 'settings/rmplus_devtools',
:default => { 'enable_profiling' => false, 'user_to_profile_ids' => [1] }
end
Rails.application.config.after_initialize do
RmplusDevtools::AssetsListener.check_listeners
enable_oink = (Setting.plugin_rmplus_devtools || {})[:enable_oink] || false
if enable_oink
Rails.application.middleware.use Oink::Middleware
end
end
Rails.application.config.to_prepare do
ApplicationController.send(:include, RmplusDevtools::ApplicationControllerPatch)
end