mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-25 13:37:12 +08:00
Fix Travis email config [SCI-3786]
This commit is contained in:
parent
e077266151
commit
940ef5b92f
3 changed files with 10 additions and 23 deletions
2
Makefile
2
Makefile
|
|
@ -85,7 +85,7 @@ tests-ci:
|
|||
@docker-compose run --rm web bash -c "bundle install && yarn install"
|
||||
@docker-compose up -d webpack
|
||||
@docker-compose ps
|
||||
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "RAILS_ENV=test; rake db:create db:migrate && rake db:migrate && yarn install && bundle exec rspec && bundle exec cucumber"
|
||||
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e MAIL_FROM=MAIL_FROM -e MAIL_REPLYTO=MAIL_REPLYTO -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "rake db:create db:migrate && rake db:migrate && yarn install && bundle exec rspec && bundle exec cucumber"
|
||||
|
||||
console:
|
||||
@$(MAKE) rails cmd="rails console"
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@ Rails.application.configure do
|
|||
# In the development environment your application's code is reloaded on
|
||||
# every request. This slows down response time but is perfect for development
|
||||
# since you don't have to restart the web server when you make code changes.
|
||||
if ENV['CUCUMBER'] == 'cucumber'
|
||||
config.cache_classes = true
|
||||
else
|
||||
config.cache_classes = ENV['WORKER'] ? true : false
|
||||
end
|
||||
config.cache_classes = ENV['WORKER'] ? true : false
|
||||
# Do not eager load code on boot.
|
||||
config.eager_load = ENV['WORKER'] ? true : false
|
||||
|
||||
|
|
@ -28,22 +24,11 @@ Rails.application.configure do
|
|||
reply_to: Rails.application.secrets.mailer_reply_to
|
||||
}
|
||||
|
||||
if ENV['CUCUMBER'] == 'cucumber'
|
||||
config.action_mailer.delivery_method = :test
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url,
|
||||
port: 3001
|
||||
}
|
||||
config.action_mailer.perform_deliveries = true
|
||||
else
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
config.action_mailer.perform_deliveries = false
|
||||
end
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
config.action_mailer.perform_deliveries = false
|
||||
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: Rails.application.secrets.mailer_address,
|
||||
|
|
|
|||
|
|
@ -55,12 +55,14 @@ Rails.application.configure do
|
|||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
config.action_mailer.perform_deliveries = true
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
|
||||
# Randomize the order test cases are executed.
|
||||
config.active_support.test_order = :random
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue