# frozen_string_literal: true

loader = RedminePluginKit::Loader.new plugin_id: 'redmine_mentions'

Redmine::Plugin.register :redmine_mentions do
  name 'Redmine Mentions'
  author 'AlphaNodes GmbH'
  author_url 'https://alphanodes.com/'
  url 'https://github.com/AlphaNodes/redmine_mentions'
  description 'This is a plugin for Redmine which gives suggestions on using username in comments'
  version RedmineMentions::VERSION

  requires_redmine version_or_higher: '4.1'
end

RedminePluginKit::Loader.persisting { loader.load_model_hooks! }
RedminePluginKit::Loader.to_prepare { RedmineMentions.setup! } if Rails.version < '6.0'
