forked from mediatainment/redmine_codebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
18 lines (15 loc) · 720 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Redmine::Plugin.register :redmine_codebutton do
name 'Code Highlight plugin'
author 'Jan Jezek'
description 'This is a plugin for Redmine. It adds a CodeHighlight Button to the editor, which wraps a code around selected text'
version '0.0.1'
url 'https://github.com/mediatainment/redmine-codebutton'
author_url 'http://www.mediatainment-productions.com'
end
Rails.configuration.to_prepare do
# Guards against including the module multiple time (like in tests)
# and registering multiple callbacks
unless Redmine::WikiFormatting::Textile::Helper.included_modules.include? WikiCodehighlightHelperPatch
Redmine::WikiFormatting::Textile::Helper.send(:include, WikiCodehighlightHelperPatch)
end
end