aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environment.rb2
-rw-r--r--config/environments/development.rb7
-rw-r--r--config/environments/test.rb5
-rw-r--r--config/test.yml2
4 files changed, 15 insertions, 1 deletions
diff --git a/config/environment.rb b/config/environment.rb
index 196680b23..05f25a29e 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,5 +1,7 @@
+
# Load the rails application
require File.expand_path('../application', __FILE__)
+ActiveSupport::Deprecation.silenced = true
# Initialize the rails application
Alaveteli::Application.initialize!
diff --git a/config/environments/development.rb b/config/environments/development.rb
index ecfad3af7..dbf8d7b2a 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -39,4 +39,11 @@ Alaveteli::Application.configure do
# Expands the lines which load the assets
config.assets.debug = true
+ # Raise exception on mass assignment protection for Active Record models
+ config.active_record.mass_assignment_sanitizer = :strict
+
+ # Log the query plan for queries taking more than this (works
+ # with SQLite, MySQL, and PostgreSQL)
+ config.active_record.auto_explain_threshold_in_seconds = 0.5
+
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index df39e8873..97c2d4f7c 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -24,4 +24,9 @@ Alaveteli::Application.configure do
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+ if !AlaveteliConfiguration.exception_notifications_from.blank? && !AlaveteliConfiguration.exception_notifications_to.blank?
+ middleware.use ExceptionNotifier,
+ :sender_address => AlaveteliConfiguration::exception_notifications_from,
+ :exception_recipients => AlaveteliConfiguration::exception_notifications_to
+ end
end
diff --git a/config/test.yml b/config/test.yml
index b26ca99d4..599e1e81a 100644
--- a/config/test.yml
+++ b/config/test.yml
@@ -116,7 +116,7 @@ HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64
# Exception notifications
EXCEPTION_NOTIFICATIONS_FROM: do-not-reply-to-this-address@example.com
-EXCEPTION_NOTIFICATIONS_TO:
+EXCEPTION_NOTIFICATIONS_TO: exception-recipient@example.com
MAX_REQUESTS_PER_USER_PER_DAY: 2