From 7d1bc86ae387fb53dbc81f98e996106e8bdb68e1 Mon Sep 17 00:00:00 2001 From: Takeshi Nakamura Date: Sun, 29 Dec 2024 21:29:03 +0900 Subject: [PATCH 1/3] Workaround for Redmine 6 (#190) --- init.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/init.rb b/init.rb index b62e5b6..2575f91 100644 --- a/init.rb +++ b/init.rb @@ -16,3 +16,25 @@ end require File.expand_path('lib/redmine_wysiwyg_editor', __dir__) + +def create_non_digested_tinymce_assets() + plugin_asset_path = 'public/assets/plugin_assets/redmine_wysiwyg_editor' + assets = Dir.glob(Rails.root.join(plugin_asset_path, 'tinymce', '**/*')) + + digest_pattern = /-([a-f0-9]{8})\./ + + assets.each do |file| + next unless file =~ digest_pattern + + source = file.split('/') + source.push(source.pop.gsub(digest_pattern, '.')) + + non_digested = File.join(source) + FileUtils.cp(file, non_digested) + end +end + +if Redmine::VERSION.to_s >= '6.0.0' + # Workaround for TinyMCE aseet file accesss issue + create_non_digested_tinymce_assets() +end From c71f5aa7d1d39b3d44ac178d049c8cef3d8612f2 Mon Sep 17 00:00:00 2001 From: Takeshi Nakamura Date: Sun, 29 Dec 2024 21:33:44 +0900 Subject: [PATCH 2/3] Rename Compose file --- docker-compose.yml => compose.yaml | 2 -- 1 file changed, 2 deletions(-) rename docker-compose.yml => compose.yaml (97%) diff --git a/docker-compose.yml b/compose.yaml similarity index 97% rename from docker-compose.yml rename to compose.yaml index 92474c3..a143e47 100644 --- a/docker-compose.yml +++ b/compose.yaml @@ -1,5 +1,3 @@ -version: '3.1' - services: app: image: redmine:alpine From 5682c28abec10d69c522e9dbc7d78865a01c9a59 Mon Sep 17 00:00:00 2001 From: Takeshi Nakamura Date: Sun, 29 Dec 2024 21:41:42 +0900 Subject: [PATCH 3/3] Bump version --- init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.rb b/init.rb index 2575f91..ac3e508 100644 --- a/init.rb +++ b/init.rb @@ -2,7 +2,7 @@ name 'Redmine WYSIWYG Editor plugin' author 'Takeshi Nakamura' description 'Redmine WYSIWYG text editor' - version '0.33.0' + version '0.34.0' url 'https://github.com/taqueci/redmine_wysiwyg_editor' author_url 'https://github.com/taqueci'