class RedmineMattermost::RedminePlugin

Registers this gem a Redmine plugin and applies the needed patches

Constants

DEFAULT_SETTINGS
SETTING_PARTIAL

Public Class Methods

new() click to toggle source
# File lib/redmine_mattermost/redmine_plugin.rb, line 16
def initialize
  register!
  boot!
end

Private Instance Methods

boot!() click to toggle source
# File lib/redmine_mattermost/redmine_plugin.rb, line 39
def boot!
  require "redmine_mattermost/listener"
  require "redmine_mattermost/issue_patch"

  unless Issue.included_modules.include? RedmineMattermost::IssuePatch
    Issue.send(:include, RedmineMattermost::IssuePatch)
  end
end
register!() click to toggle source
# File lib/redmine_mattermost/redmine_plugin.rb, line 23
def register!
  Redmine::Plugin.register :redmine_mattermost do
    name NAME
    author AUTHORS.join(", ")
    description DESCRIPTION
    version VERSION
    url URL
    author_url AUTHOR_URL
    directory Engine.root

    requires_redmine version_or_higher: "2.0.0"

    settings default: DEFAULT_SETTINGS, partial: SETTING_PARTIAL
  end
end