Skip to content

Commit

Permalink
Fixes configuration on review apps again (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbothner authored Dec 12, 2017
2 parents 969a8c7 + 1115dc9 commit 9ab8eb1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,19 @@
# config.action_mailer.raise_delivery_errors = false

config.action_mailer.default_url_options = { host: 'www.learngala.com' }
config.action_mailer.smtp_settings = {
address: 'email-smtp.us-west-2.amazonaws.com',
port: 587,
user_name: ENV['SES_SMTP_USERNAME'],
password: ENV['SES_SMTP_PASSWORD'],
authentication: :login,
enable_starttls_auto: true
}

if ENV['SES_SMTP_USERNAME'] && ENV['SES_SMTP_PASSWORD']
config.action_mailer.smtp_settings = {
address: 'email-smtp.us-west-2.amazonaws.com',
port: 587,
user_name: ENV['SES_SMTP_USERNAME'],
password: ENV['SES_SMTP_PASSWORD'],
authentication: :login,
enable_starttls_auto: true
}
else
config.action_mailer.raise_delivery_errors = false
end

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/mock_omniauth.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

if Rails.env.development? || ENV['MOCK_OMNIAUTH']
if Rails.env.development? && !ENV['LOCALHOST_SSL'] || ENV['MOCK_OMNIAUTH']
OmniAuth.config.test_mode = true
auth_hash = { provider: 'google_oauth2', uid: '1234567890',
info: {
Expand Down

0 comments on commit 9ab8eb1

Please sign in to comment.