From 1f67cc2485bb19e024eba507847d0acff4dce969 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Fri, 24 Dec 2010 12:31:09 -0800 Subject: Replace APP_CONFIG with lib/app_config.rb so that it's testable. --- config/initializers/mailer_config.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'config/initializers/mailer_config.rb') diff --git a/config/initializers/mailer_config.rb b/config/initializers/mailer_config.rb index c91a99f3d..c24d21d95 100644 --- a/config/initializers/mailer_config.rb +++ b/config/initializers/mailer_config.rb @@ -3,23 +3,23 @@ # the COPYRIGHT file. Diaspora::Application.configure do - config.action_mailer.default_url_options = {:host => APP_CONFIG[:pod_uri].host} - unless Rails.env == 'test' || APP_CONFIG[:mailer_on] != true + config.action_mailer.default_url_options = {:host => AppConfig[:pod_uri].host} + unless Rails.env == 'test' || AppConfig[:mailer_on] != true config.action_mailer.delivery_method = :smtp - if APP_CONFIG[:smtp_authentication] == "none" + if AppConfig[:smtp_authentication] == "none" config.action_mailer.smtp_settings = { - :address => APP_CONFIG[:smtp_address], - :port => APP_CONFIG[:smtp_port], - :domain => APP_CONFIG[:smtp_domain] + :address => AppConfig[:smtp_address], + :port => AppConfig[:smtp_port], + :domain => AppConfig[:smtp_domain] } else config.action_mailer.smtp_settings = { - :address => APP_CONFIG[:smtp_address], - :port => APP_CONFIG[:smtp_port], - :domain => APP_CONFIG[:smtp_domain], - :authentication => APP_CONFIG[:smtp_authentication], - :user_name => APP_CONFIG[:smtp_username], - :password => APP_CONFIG[:smtp_password], + :address => AppConfig[:smtp_address], + :port => AppConfig[:smtp_port], + :domain => AppConfig[:smtp_domain], + :authentication => AppConfig[:smtp_authentication], + :user_name => AppConfig[:smtp_username], + :password => AppConfig[:smtp_password], :enable_starttls_auto => true } end -- cgit v1.2.3