* make the nobody@jamkazam.com configurable so that we can override it in chef to provide context clues

This commit is contained in:
Seth Call 2015-04-22 15:43:36 -05:00
parent 39f45f20ba
commit 091f2be556
5 changed files with 17 additions and 1 deletions

View File

@ -43,4 +43,6 @@ JamAdmin::Application.configure do
# Show the logging configuration on STDOUT # Show the logging configuration on STDOUT
config.show_log_configuration = true config.show_log_configuration = true
config.email_generic_from = 'nobody-dev@jamkazam.com'
end end

View File

@ -13,7 +13,8 @@ module JamRuby
sendgrid_unique_args :env => Environment.mode sendgrid_unique_args :env => Environment.mode
def alerts(options) def alerts(options)
mail(to: APP_CONFIG.email_alerts_alias, mail(to: APP_CONFIG.email_recurly_notice,
from: APP_CONFIG.email_generic_from,
body: options[:body], body: options[:body],
content_type: "text/plain", content_type: "text/plain",
subject: options[:subject]) subject: options[:subject])

View File

@ -7,6 +7,10 @@ def app_config
'alerts@jamkazam.com' 'alerts@jamkazam.com'
end end
def email_recurly_notice
'recurly-alerts@jamkazam.com'
end
def email_generic_from def email_generic_from
'nobody@jamkazam.com' 'nobody@jamkazam.com'
end end

View File

@ -222,6 +222,7 @@ if defined?(Bundler)
config.email_alerts_alias = 'alerts@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails config.email_alerts_alias = 'alerts@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails
config.email_generic_from = 'nobody@jamkazam.com' config.email_generic_from = 'nobody@jamkazam.com'
config.email_recurly_notice = 'recurly-alerts@jamkazam.com'
config.email_smtp_address = 'smtp.sendgrid.net' config.email_smtp_address = 'smtp.sendgrid.net'
config.email_smtp_port = 587 config.email_smtp_port = 587
config.email_smtp_domain = 'www.jamkazam.com' config.email_smtp_domain = 'www.jamkazam.com'

View File

@ -2,6 +2,14 @@
def web_config def web_config
klass = Class.new do klass = Class.new do
def email_recurly_notice
'recurly-alerts@jamkazam.com'
end
def email_generic_from
'nobody@jamkazam.com'
end
def external_hostname def external_hostname
Capybara.current_session.server.host Capybara.current_session.server.host
end end