2019-03-17 02:04:38 +00:00
|
|
|
# frozen_string_literal: true
|
2019-03-15 01:32:57 +00:00
|
|
|
|
2021-11-17 20:45:39 +00:00
|
|
|
require 'redmine/configuration'
|
|
|
|
|
require 'redmine/plugin_loader'
|
|
|
|
|
|
|
|
|
|
Rails.application.config.to_prepare do
|
2021-11-17 20:47:53 +00:00
|
|
|
I18n.backend = Redmine::I18n::Backend.new
|
|
|
|
|
# Forces I18n to load available locales from the backend
|
|
|
|
|
I18n.config.available_locales = nil
|
|
|
|
|
|
2021-11-17 20:45:39 +00:00
|
|
|
Redmine::Preparation.prepare
|
|
|
|
|
end
|
2012-04-25 17:17:49 +00:00
|
|
|
|
2012-04-28 12:00:45 +00:00
|
|
|
# Load the secret token from the Redmine configuration file
|
|
|
|
|
secret = Redmine::Configuration['secret_token']
|
|
|
|
|
if secret.present?
|
|
|
|
|
RedmineApp::Application.config.secret_token = secret
|
|
|
|
|
end
|
|
|
|
|
|
2021-11-17 20:36:53 +00:00
|
|
|
Redmine::PluginLoader.load
|
|
|
|
|
plugin_assets_reloader = Redmine::PluginLoader.create_assets_reloader
|
2019-05-27 08:53:49 +00:00
|
|
|
|
|
|
|
|
Rails.application.reloaders << plugin_assets_reloader
|
|
|
|
|
unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
|
|
|
|
|
plugin_assets_reloader.execute
|
|
|
|
|
end
|
2014-10-24 18:41:35 +00:00
|
|
|
|
|
|
|
|
Rails.application.config.to_prepare do
|
|
|
|
|
Redmine::FieldFormat::RecordList.subclasses.each do |klass|
|
|
|
|
|
klass.instance.reset_target_class
|
|
|
|
|
end
|
2019-05-27 08:53:49 +00:00
|
|
|
|
|
|
|
|
plugin_assets_reloader.execute_if_updated
|
2015-08-05 08:27:10 +00:00
|
|
|
end
|