Redmine 3.4.x support and version bump to 1.0.0
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
## 0.9.9
|
||||
## 1.0.0
|
||||
|
||||
* Redmine 3.4.x compatibility
|
||||
* Commit message issue bug fix
|
||||
* Some code cleanups
|
||||
|
||||
## 0.9.9
|
||||
|
||||
* All global messenger settings can be overwritten project based
|
||||
* Locale support added
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<% @settings = ActionController::Parameters.new(@settings) %>
|
||||
|
||||
<div class="info"><%= t(:messenger_settings_intro) %></div><br />
|
||||
|
||||
<p>
|
||||
@@ -24,7 +26,7 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_messenger_verify_ssl)) %>
|
||||
<%= check_box_tag 'settings[messenger_verify_ssl]', 1, @settings[:messenger_verify_ssl] %>
|
||||
<%= check_box_tag 'settings[messenger_verify_ssl]', 1, @settings[:messenger_verify_ssl].to_i == 1 %>
|
||||
<em class="info"><%= t(:messenger_verify_ssl_info_html) %></em>
|
||||
</p>
|
||||
|
||||
@@ -35,32 +37,32 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_auto_mentions)) %>
|
||||
<%= check_box_tag 'settings[auto_mentions]', 1, @settings[:auto_mentions] %>
|
||||
<%= check_box_tag 'settings[auto_mentions]', 1, @settings[:auto_mentions].to_i == 1 %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_display_watchers)) %>
|
||||
<%= check_box_tag 'settings[display_watchers]', 1, @settings[:display_watchers] %>
|
||||
<%= check_box_tag 'settings[display_watchers]', 1, @settings[:display_watchers].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_updates)) %>
|
||||
<%= check_box_tag 'settings[post_updates]', 1, @settings[:post_updates] %>
|
||||
<%= check_box_tag 'settings[post_updates]', 1, @settings[:post_updates].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_new_include_description)) %>
|
||||
<%= check_box_tag 'settings[new_include_description]', 1, @settings[:new_include_description] %>
|
||||
<%= check_box_tag 'settings[new_include_description]', 1, @settings[:new_include_description].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_updated_include_description)) %>
|
||||
<%= check_box_tag 'settings[updated_include_description]', 1, @settings[:updated_include_description] %>
|
||||
<%= check_box_tag 'settings[updated_include_description]', 1, @settings[:updated_include_description].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_private_issues)) %>
|
||||
<%= check_box_tag 'settings[post_private_issues]', 1, @settings[:post_private_issues] %>
|
||||
<%= check_box_tag 'settings[post_private_issues]', 1, @settings[:post_private_issues].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_private_notes)) %>
|
||||
<%= check_box_tag 'settings[post_private_notes]', 1, @settings[:post_private_notes] %>
|
||||
<%= check_box_tag 'settings[post_private_notes]', 1, @settings[:post_private_notes].to_i == 1 %>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
@@ -70,11 +72,11 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_wiki)) %>
|
||||
<%= check_box_tag 'settings[post_wiki]', 1, @settings[:post_wiki] %>
|
||||
<%= check_box_tag 'settings[post_wiki]', 1, @settings[:post_wiki].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_wiki_updates)) %>
|
||||
<%= check_box_tag 'settings[post_wiki_updates]', 1, @settings[:post_wiki_updates] %>
|
||||
<%= check_box_tag 'settings[post_wiki_updates]', 1, @settings[:post_wiki_updates].to_i == 1 %>
|
||||
</p>
|
||||
|
||||
<% if RedmineMessenger::REDMINE_DB_SUPPORT %>
|
||||
@@ -85,11 +87,11 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_db)) %>
|
||||
<%= check_box_tag 'settings[post_db]', 1, @settings[:post_db] %>
|
||||
<%= check_box_tag 'settings[post_db]', 1, @settings[:post_db].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_db_updates)) %>
|
||||
<%= check_box_tag 'settings[post_db_updates]', 1, @settings[:post_db_updates] %>
|
||||
<%= check_box_tag 'settings[post_db_updates]', 1, @settings[:post_db_updates].to_i == 1 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@@ -101,11 +103,11 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_contact)) %>
|
||||
<%= check_box_tag 'settings[post_contact]', 1, @settings[:post_contact] %>
|
||||
<%= check_box_tag 'settings[post_contact]', 1, @settings[:post_contact].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_contact_updates)) %>
|
||||
<%= check_box_tag 'settings[post_contact_updates]', 1, @settings[:post_contact_updates] %>
|
||||
<%= check_box_tag 'settings[post_contact_updates]', 1, @settings[:post_contact_updates].to_i == 1 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@@ -117,10 +119,10 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_password)) %>
|
||||
<%= check_box_tag 'settings[post_password]', 1, @settings[:post_password] %>
|
||||
<%= check_box_tag 'settings[post_password]', 1, @settings[:post_password].to_i == 1 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_settings_post_password_updates)) %>
|
||||
<%= check_box_tag 'settings[post_password_updates]', 1, @settings[:post_password_updates] %>
|
||||
<%= check_box_tag 'settings[post_password_updates]', 1, @settings[:post_password_updates].to_i == 1 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
4
init.rb
4
init.rb
@@ -9,7 +9,7 @@ Redmine::Plugin.register :redmine_messenger do
|
||||
url 'https://github.com/alphanodes/redmine_messenger'
|
||||
author_url 'https://alphanodes.com/'
|
||||
description 'Messenger integration for Slack, Rocketchat and Mattermost support'
|
||||
version '0.9.9'
|
||||
version '1.0.0'
|
||||
|
||||
requires_redmine version_or_higher: '3.0.0'
|
||||
|
||||
@@ -21,7 +21,7 @@ Redmine::Plugin.register :redmine_messenger do
|
||||
messenger_channel: 'redmine',
|
||||
messenger_username: 'robot',
|
||||
messenger_verify_ssl: '1',
|
||||
auto_mentions: '1',
|
||||
auto_mentions: '0',
|
||||
display_watchers: '0',
|
||||
post_updates: '1',
|
||||
new_include_description: '1',
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
# Redmine Messenger plugin for Redmine
|
||||
|
||||
Rails.configuration.to_prepare do
|
||||
module RedmineMessenger
|
||||
REDMINE_CONTACTS_SUPPORT = Redmine::Plugin.installed?('redmine_contacts') ? true : false
|
||||
REDMINE_DB_SUPPORT = Redmine::Plugin.installed?('redmine_db') ? true : false
|
||||
# this does not work at the moment, because redmine loads passwords after messener plugin
|
||||
REDMINE_PASSWORDS_SUPPORT = Redmine::Plugin.installed?('redmine_passwords') ? true : false
|
||||
|
||||
def self.settings
|
||||
ActionController::Parameters.new(Setting[:plugin_redmine_messenger])
|
||||
end
|
||||
end
|
||||
|
||||
# Patches
|
||||
require_dependency 'redmine_messenger/patches/issue_patch'
|
||||
require_dependency 'redmine_messenger/patches/wiki_page_patch'
|
||||
@@ -16,14 +27,3 @@ Rails.configuration.to_prepare do
|
||||
# Hooks
|
||||
require_dependency 'redmine_messenger/hooks'
|
||||
end
|
||||
|
||||
module RedmineMessenger
|
||||
REDMINE_CONTACTS_SUPPORT = Redmine::Plugin.installed?('redmine_contacts') ? true : false
|
||||
REDMINE_DB_SUPPORT = Redmine::Plugin.installed?('redmine_db') ? true : false
|
||||
# this does not work at the moment, because redmine loads passwords after messener plugin
|
||||
REDMINE_PASSWORDS_SUPPORT = Redmine::Plugin.installed?('redmine_passwords') ? true : false
|
||||
|
||||
def self.settings
|
||||
Setting[:plugin_redmine_messenger].blank? ? {} : Setting[:plugin_redmine_messenger]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user