summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb3
-rw-r--r--config/environments/test.rb6
2 files changed, 9 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 48e855c9b..f3b6e82fd 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -85,6 +85,9 @@ module RedmineApp
# for more options (same options as config.cache_store).
config.redmine_search_cache_store = :memory_store
+ # Sets default plugin directory
+ config.redmine_plugins_directory = 'plugins'
+
# Configure log level here so that additional environment file
# can change it (environments/ENV.rb would take precedence over it)
config.log_level = Rails.env.production? ? :info : :debug
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 2e7b23813..ea6080ac7 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -18,6 +18,12 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
+ # Change default plugins dir if env variable is present
+ # This is used by redmine plugins autoload test.
+ if ENV["REDMINE_PLUGINS_DIRECTORY"].present?
+ config.redmine_plugins_directory = ENV["REDMINE_PLUGINS_DIRECTORY"]
+ end
+
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {