From 821108328147a8e5a17b1670a56a4cd6909ec718 Mon Sep 17 00:00:00 2001 From: John Date: Sat, 1 Feb 2020 00:12:33 -0700 Subject: [PATCH] Add compatibility for Redmine v4.1 Fixes #22 --- init.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.rb b/init.rb index 9138dff..fb48626 100644 --- a/init.rb +++ b/init.rb @@ -3,6 +3,13 @@ require 'emojibutton_formatter_markdown_patch' require 'emojibutton_helper_patch' +# The following two lines are required for Redmine 4.1 +require 'sprockets/railtie' unless defined?(Sprockets) + +unless File.exist?(Rails.root.join('app', 'assets', 'config', 'manifest.js')) + `mkdir -p app/assets/config && echo '{}' > app/assets/config/manifest.js` +end + Redmine::Plugin.register :redmine_emojibutton do name 'Redmine Emoji Button' author 'Tobias Fischer'