-
Notifications
You must be signed in to change notification settings - Fork 8
/
init.rb
45 lines (35 loc) · 1.17 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
41
#!/bin/env ruby
# encoding: utf-8
require 'redmine'
require 'dispatcher' unless Rails::VERSION::MAJOR >= 3
require 'wiki_controller_patch'
require 'wiki_page_patch'
require_dependency 'redmine_wikicipher/hooks'
require_dependency 'redmine_wikicipher/macros'
require_dependency 'redmine/wiki_formatting/textile/wikicipher_helper'
Redmine::Plugin.register :redmine_wikicipher do
name 'Redmine Wikicipher plugin'
author 'Sébastien Leroux'
author_url 'mailto:[email protected]'
description 'This plugin adds the ability to encrypt section of text'
version '0.0.10'
url 'https://github.com/keeps/redmine_wikicipher'
end
if Rails::VERSION::MAJOR >= 3
ActionDispatch::Callbacks.to_prepare do
require_dependency 'wiki_controller'
require_dependency 'wiki_page'
WikiController.send(:include, WikiControllerPatch)
WikiPage.send(:include, WikiPagePatch)
end
else
ApplicationController.class_eval do
filter_parameter_logging :password, :text
end
Dispatcher.to_prepare do
require_dependency 'wiki_controller'
require_dependency 'wiki_page'
WikiController.send(:include, WikiControllerPatch)
WikiPage.send(:include, WikiPagePatch)
end
end