aboutsummaryrefslogtreecommitdiffstats
path: root/config/environments
diff options
context:
space:
mode:
authorMarc Florisson2014-02-17 09:53:18 +0100
committerMarc Florisson2014-02-17 09:53:18 +0100
commit0547437de59b2d5626f1c2c28a5a14baf4835f24 (patch)
tree6f52ef6b748dd9799aacb2ccaa4e7b5b7159468f /config/environments
parent41055285867dacdcedbf49e4a8da16063ae39e0f (diff)
downloadchouette-core-0547437de59b2d5626f1c2c28a5a14baf4835f24.tar.bz2
move mailer_sender parameter to environments file
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/development.rb7
-rw-r--r--config/environments/production.rb72
-rw-r--r--config/environments/test.rb3
3 files changed, 44 insertions, 38 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 6b2f29f66..62c8a6f0d 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -41,9 +41,12 @@ ChouetteIhm::Application.configure do
# file to data for demo
config.demo_data = "tmp/demo.zip"
+ # Configure the e-mail address which will be shown in Devise::Maile
+ config.mailer_sender = "appli@chouette.mobi"
+
ActionMailer::Base.smtp_settings = {
- :address => "mail.dryade.priv",
- :domain => "dryade.priv"
+ :address => "smtp.samle.com",
+ :domain => "sample.com"
}
# api key to geoportail IGN (development key 3 month validity)
diff --git a/config/environments/production.rb b/config/environments/production.rb
index c472bde03..37273282a 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -10,7 +10,7 @@ ChouetteIhm::Application.configure do
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
- # Uncomment to add suburi for your application
+ # Uncomment to add suburi for your application
#config.action_controller.relative_url_root = "/chouette2"
# Disable Rails's static asset server (Apache or nginx will already do this)
@@ -39,15 +39,15 @@ ChouetteIhm::Application.configure do
#config.log_level = :info
# Use a different logger for distributed setups
- if ENV['OS'] == 'Windows_NT'
- # args = log_path,number of files,file sizes
- config.logger = Logger.new("C:/chouette/logs/chouette2.log", 5, 10.megabytes)
- else
+ #if ENV['OS'] == 'Windows_NT'
+ # # args = log_path,number of files,file sizes
+ # config.logger = Logger.new("C:/chouette/logs/chouette2.log", 5, 10.megabytes)
+ #else
require 'syslog_logger'
config.logger = SyslogLogger.new("rails/chouette2").tap do |logger|
# logger.level = Logger::INFO
end
- end
+ #end
# Use a different cache store in production
@@ -63,7 +63,7 @@ ChouetteIhm::Application.configure do
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
#
- # api key to geoportail IGN (production key link to "chouette.dryade.net" referer)
+ # api key to geoportail IGN (production key link to public site url referer)
#config.geoportail_api_key = "bt4z711qv8uw4zmk2bxl4d5l"
# Enable threaded mode
@@ -77,55 +77,55 @@ ChouetteIhm::Application.configure do
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
- config.action_mailer.default_url_options = { :host => 'chouette.dryade.net/chouette2' }
+ config.action_mailer.default_url_options = { :host => 'hostname.com' }
# mailer configuration :
# by default : set to smtp on windows platforms and sendmail on unix one
# may be changed as convenience
- if ENV['OS'] == 'Windows_NT'
- ## using SMTP (maybe useful for Windows or VM platforms):
- ActionMailer::Base.delivery_method = :smtp
- ActionMailer::Base.smtp_settings = {
- :address => "smtp.sample.com",
- #:port => 25,
- :domain => "sample.com",
- #:authentication => :login,
- :user_name => "username",
- #:password => "password",
- #:enable_starttls_auto => true,
- #openssl_verify_mode => # set one in 'none' 'peer' 'client_once' 'fail_if_no_peer_cert'
- }
- else
+ #if ENV['OS'] == 'Windows_NT'
+ # ## using SMTP (maybe useful for Windows or VM platforms):
+ # ActionMailer::Base.delivery_method = :smtp
+ # ActionMailer::Base.smtp_settings = {
+ # :address => "smtp.sample.com",
+ # #:port => 25,
+ # :domain => "sample.com",
+ # #:authentication => :login,
+ # :user_name => "username",
+ # #:password => "password",
+ # #:enable_starttls_auto => true,
+ # #openssl_verify_mode => # set one in 'none' 'peer' 'client_once' 'fail_if_no_peer_cert'
+ # }
+ #else
ActionMailer::Base.smtp_settings = {
- :address => "smtp.sendgrid.net",
+ :address => "smtp.sample.com",
:port => 25,
- :domain => "cityway.fr",
- :user_name => "jdleca@cityway.fr",
- :password => "waycity",
+ :domain => "sample.com",
+ :user_name => "username",
+ :password => "password",
:authentication => "plain"
}
- end
+ #end
# file to data for demo
config.demo_data = "/var/lib/chouette/demo.zip"
# paths for external resources
- if ENV['OS'] == 'Windows_NT'
- config.to_prepare do
- Devise::Mailer.layout "mailer"
- Chouette::Command.command = "C:/chouette/chouette-cmd_2.2.0/chouette.bat"
- ImportTask.root = "C:/chouette/chouette/imports"
- Export.root = "C:/chouette/chouette/exports"
- end
- else
+ #if ENV['OS'] == 'Windows_NT'
+ # config.to_prepare do
+ # Devise::Mailer.layout "mailer"
+ # Chouette::Command.command = "C:/chouette/chouette-cmd_2.2.0/chouette.bat"
+ # ImportTask.root = "C:/chouette/chouette/imports"
+ # Export.root = "C:/chouette/chouette/exports"
+ # end
+ #else
config.to_prepare do
Devise::Mailer.layout "mailer"
Chouette::Command.command = "/usr/local/opt/chouette-command/chouette-cmd_2.2.0/chouette"
ImportTask.root = "/var/lib/chouette/imports"
Export.root = "/var/lib/chouette/exports"
end
- end
+ #end
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index cefbcd8af..ee03afbea 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -27,6 +27,9 @@ ChouetteIhm::Application.configure do
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
+ # Configure the e-mail address which will be shown in Devise::Maile
+ config.mailer_sender = "appli@chouette.mobi"
+
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.