Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes configuration on review apps again #182

Merged
merged 2 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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