forked from jkraemer/redmine_hoptoad_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
21 lines (18 loc) · 852 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'redmine'
require 'dispatcher'
begin
gem 'nokogiri'
require 'nokogiri'
rescue LoadError
Rails.logger.error "Nokogiri gem not found, parsing hoptoad API v2 requests will be sub-optimal"
end
Dispatcher.to_prepare do
Issue.send(:include, RedmineHoptoadServer::Patches::IssuePatch) unless Issue.include?(RedmineHoptoadServer::Patches::IssuePatch)
IssueObserver.send(:include, RedmineHoptoadServer::Patches::IssueObserverPatch) unless IssueObserver.include?(RedmineHoptoadServer::Patches::IssueObserverPatch)
end
Redmine::Plugin.register :redmine_hoptoad_server do
name 'Redmine Hoptoad Server plugin'
author 'Jan Schulz-Hofen, Planio GmbH'
description 'Turns Redmine into a Hoptoad server, i.e. an API provider which can be used with the hoptoad_notifier. See http://github.com/yeah/redmine_hoptoad_server'
version '0.0.1'
end