aboutsummaryrefslogtreecommitdiffstats
path: root/config/environments
diff options
context:
space:
mode:
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/development.rb9
-rw-r--r--config/environments/production.rb16
-rw-r--r--config/environments/staging.rb1
-rw-r--r--config/environments/test.rb1
4 files changed, 26 insertions, 1 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index dbf8d7b2a..39bd98da1 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
@@ -46,4 +47,12 @@ Alaveteli::Application.configure do
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
+ if AlaveteliConfiguration.use_bullet_in_development
+ config.after_initialize do
+ Bullet.enable = true
+ Bullet.bullet_logger = true
+ Bullet.console = true
+ Bullet.add_footer = true
+ end
+ end
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index a3e3cebd2..bc5b724d0 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
@@ -17,7 +18,20 @@ Alaveteli::Application.configure do
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
- config.action_mailer.delivery_method = :sendmail # so is queued, rather than giving immediate errors
+
+ config.action_mailer.delivery_method = AlaveteliConfiguration::production_mailer_delivery_method.to_sym
+
+ if AlaveteliConfiguration::production_mailer_delivery_method.to_sym == :smtp
+ config.action_mailer.smtp_settings = {
+ :address => AlaveteliConfiguration::smtp_mailer_address,
+ :port => AlaveteliConfiguration.smtp_mailer_port,
+ :domain => AlaveteliConfiguration.smtp_mailer_domain,
+ :user_name => AlaveteliConfiguration.smtp_mailer_user_name,
+ :password => AlaveteliConfiguration.smtp_mailer_password,
+ :authentication => AlaveteliConfiguration.smtp_mailer_authentication,
+ :enable_starttls_auto => AlaveteliConfiguration.smtp_mailer_enable_starttls_auto
+ }
+ end
config.active_support.deprecation = :notify
diff --git a/config/environments/staging.rb b/config/environments/staging.rb
index 0bb0db71a..0d791e03e 100644
--- a/config/environments/staging.rb
+++ b/config/environments/staging.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 97c2d4f7c..483a4874f 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -1,3 +1,4 @@
+# -*- encoding : utf-8 -*-
Alaveteli::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb