From 70ddd9bcf1c92a06a1d13c7d0e19debb1b561fcf Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 15 Jan 2020 21:58:18 +0100 Subject: [PATCH 1/2] Add support for Rails 5 / Redmine 4 --- lib/wiki_codehighlight_helper_patch.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/wiki_codehighlight_helper_patch.rb b/lib/wiki_codehighlight_helper_patch.rb index 41f8e68..e19f48c 100644 --- a/lib/wiki_codehighlight_helper_patch.rb +++ b/lib/wiki_codehighlight_helper_patch.rb @@ -23,7 +23,12 @@ def self.included(base) # :nodoc: base.class_eval do unloadable # Send unloadable so it will not be unloaded in development - alias_method_chain :heads_for_wiki_formatter, :redmine_codebutton + if Rails.version < '5.0.0' + alias_method_chain :heads_for_wiki_formatter, :redmine_codebutton + else + alias_method :heads_for_wiki_formatter_without_redmine_codebutton, :heads_for_wiki_formatter + alias_method :heads_for_wiki_formatter, :heads_for_wiki_formatter_with_redmine_codebutton + end end end From 59bcffe22a6bf9e83ae4571c60bb7f4c2722235a Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 15 Jan 2020 21:58:34 +0100 Subject: [PATCH 2/2] bump version to 0.4.0 --- init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.rb b/init.rb index ea48ae2..ea2c4c7 100644 --- a/init.rb +++ b/init.rb @@ -2,7 +2,7 @@ name 'Code Highlight plugin' author 'Jan Jezek' description 'This is a plugin for Redmine. It adds a CodeHighlight Button to the editor, which wraps a code around selected text' - version '0.3.0' + version '0.4.0' url 'https://github.com/mediatainment/redmine-codebutton' author_url 'http://www.mediatainment-productions.com'