From 985c380516df843594172941c77938534b2ea7bc Mon Sep 17 00:00:00 2001 From: Jigarius Date: Tue, 21 May 2024 14:38:35 +0530 Subject: [PATCH 1/3] Remove deprecated key: version --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2464022..892b096 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.1' services: redmine: image: redmine:5.x-toggl2redmine From 7afda9b278886405a7208123ca34515b0db80ec1 Mon Sep 17 00:00:00 2001 From: Jigarius Date: Tue, 21 May 2024 14:41:43 +0530 Subject: [PATCH 2/3] Set mirror_plugins_assets_on_startup to false Without this, Redmine will seek plugin's JS and CSS in the /plugin_assets directory which doesn't exist by default. It only comes into existence after running rake redmine:plugins:assets. --- .docker/redmine/configuration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/redmine/configuration.yml b/.docker/redmine/configuration.yml index d97b2e2..0e9096a 100644 --- a/.docker/redmine/configuration.yml +++ b/.docker/redmine/configuration.yml @@ -78,7 +78,7 @@ default: # You can use `rake redmine:plugins:assets` to manually mirror assets # to public/plugin_assets when you install/upgrade a Redmine plugin. # - mirror_plugins_assets_on_startup: true + mirror_plugins_assets_on_startup: false # Your secret key for verifying cookie session data integrity. If you # change this key, all old sessions will become invalid! Make sure the From 16e40a8db46fc872d2159158bc7081d6829affcb Mon Sep 17 00:00:00 2001 From: Burak Ikiler Date: Tue, 21 May 2024 14:40:39 +0530 Subject: [PATCH 3/3] Add missing Rails.configuration.to_prepare Co-authored-by: Jigarius --- init.rb | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/init.rb b/init.rb index b272f59..80c3839 100644 --- a/init.rb +++ b/init.rb @@ -1,22 +1,26 @@ # frozen_string_literal: true -require_relative 'lib/toggl_2_redmine' +Rails.configuration.to_prepare do + require_relative 'lib/toggl_2_redmine' -Redmine::Plugin.register :toggl2redmine do - # Package info. - name 'Toggl 2 Redmine' - author 'Jigar Mehta' - description 'Imports time entries from Toggl into Redmine.' - version Toggl2Redmine::VERSION - url 'https://github.com/jigarius/toggl2redmine' - author_url 'https://jigarius.com/' + Redmine::Plugin.register :toggl2redmine do + # Package info. + name 'Toggl 2 Redmine' + author 'Jigarius' + description 'Imports time entries from Toggl into Redmine.' + version Toggl2Redmine::VERSION + url 'https://github.com/jigarius/toggl2redmine' + author_url 'https://jigarius.com/' - # Menu items. - menu :application_menu, - :toggl2redmine, - { controller: 't2r_import', action: 'index' }, - caption: 'Toggl' -end + # Menu items. + menu :application_menu, + :toggl2redmine, + { controller: 't2r_import', action: 'index' }, + caption: 'Toggl' + end -# Patches. -require 'patches/time_entry' + Rails.configuration.to_prepare do + # Patches. + require 'patches/time_entry_patch' + end +end