diff --git a/.docker/redmine/configuration.yml b/.docker/redmine/configuration.yml index d97b2e26..0e9096ab 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 diff --git a/docker-compose.yml b/docker-compose.yml index 2464022c..892b096c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.1' services: redmine: image: redmine:5.x-toggl2redmine diff --git a/init.rb b/init.rb index b272f592..80c38396 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