2016-02-12 23:52:43 +08:00
|
|
|
Rails.application.configure do
|
2019-08-22 19:38:02 +08:00
|
|
|
# Verifies that versions and hashed value of the package contents in the project's package.json
|
2017-08-30 22:18:21 +08:00
|
|
|
|
2016-02-12 23:52:43 +08:00
|
|
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
|
|
|
2017-06-23 21:19:08 +08:00
|
|
|
# Configure public file server for tests with Cache-Control for performance.
|
|
|
|
config.public_file_server.enabled = true
|
|
|
|
config.public_file_server.headers = {
|
|
|
|
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
|
|
|
|
}
|
|
|
|
|
2016-02-12 23:52:43 +08:00
|
|
|
# Enable this to be able to output stuff to STDOUT during tests
|
|
|
|
# via Rails::logger.info "..."
|
|
|
|
config.logger = Logger.new(STDOUT)
|
|
|
|
config.log_level = :info
|
|
|
|
|
|
|
|
# The test environment is used exclusively to run your application's
|
|
|
|
# test suite. You never need to work with it otherwise. Remember that
|
|
|
|
# your test database is "scratch space" for the test suite and is wiped
|
|
|
|
# and recreated between test runs. Don't rely on the data there!
|
|
|
|
config.cache_classes = true
|
2021-09-09 21:41:42 +08:00
|
|
|
config.cache_store = :null_store
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
# Do not eager load code on boot. This avoids loading your whole application
|
|
|
|
# just for the purpose of running a single test. If you are using a tool that
|
|
|
|
# preloads Rails for running tests, you may have to set it to true.
|
|
|
|
config.eager_load = false
|
|
|
|
|
|
|
|
# Configure static file server for tests with Cache-Control for performance.
|
|
|
|
config.serve_static_files = true
|
|
|
|
config.static_cache_control = 'public, max-age=3600'
|
|
|
|
|
|
|
|
# Show full error reports and disable caching.
|
|
|
|
config.consider_all_requests_local = true
|
|
|
|
config.action_controller.perform_caching = false
|
|
|
|
|
|
|
|
# Raise exceptions instead of rendering exception templates.
|
|
|
|
config.action_dispatch.show_exceptions = false
|
|
|
|
|
|
|
|
# Disable request forgery protection in test environment.
|
|
|
|
config.action_controller.allow_forgery_protection = false
|
|
|
|
|
2019-06-13 18:10:44 +08:00
|
|
|
# Store uploaded files on the local file system in a temporary directory
|
|
|
|
config.active_storage.service = :test
|
|
|
|
|
2021-04-06 19:56:24 +08:00
|
|
|
# Log disallowed deprecations.
|
|
|
|
config.active_support.disallowed_deprecation = :log
|
|
|
|
|
|
|
|
# Tell Active Support which deprecation messages to disallow.
|
|
|
|
config.active_support.disallowed_deprecation_warnings = []
|
|
|
|
|
2019-06-13 18:10:44 +08:00
|
|
|
config.action_mailer.perform_caching = false
|
|
|
|
|
2016-02-12 23:52:43 +08:00
|
|
|
# Tell Action Mailer not to deliver emails to the real world.
|
|
|
|
# The :test delivery method accumulates sent emails in the
|
|
|
|
# ActionMailer::Base.deliveries array.
|
|
|
|
config.action_mailer.delivery_method = :test
|
|
|
|
|
2019-08-26 21:05:24 +08:00
|
|
|
config.action_mailer.perform_deliveries = true
|
|
|
|
|
2017-05-11 00:15:08 +08:00
|
|
|
Rails.application.routes.default_url_options = {
|
|
|
|
host: Rails.application.secrets.mail_server_url
|
|
|
|
}
|
|
|
|
|
2016-02-12 23:52:43 +08:00
|
|
|
# Don't care if the mailer can't send.
|
2019-08-26 21:05:24 +08:00
|
|
|
config.action_mailer.raise_delivery_errors = true
|
2016-02-12 23:52:43 +08:00
|
|
|
|
|
|
|
# Randomize the order test cases are executed.
|
|
|
|
config.active_support.test_order = :random
|
|
|
|
|
|
|
|
# Print deprecation notices to the stderr.
|
|
|
|
config.active_support.deprecation = :stderr
|
|
|
|
|
|
|
|
config.logger = Logger.new(STDOUT)
|
|
|
|
config.log_level = :error
|
|
|
|
|
|
|
|
# Raises error for missing translations
|
|
|
|
# config.action_view.raise_on_missing_translations = true
|
|
|
|
|
2021-04-06 19:56:24 +08:00
|
|
|
# Annotate rendered view with file names.
|
|
|
|
# config.action_view.annotate_rendered_view_with_filenames = true
|
|
|
|
|
2017-02-27 16:40:01 +08:00
|
|
|
# Enable/disable Deface
|
2017-02-27 19:54:51 +08:00
|
|
|
config.deface.enabled = ENV['DEFACE_ENABLED'] != 'false'
|
2017-02-27 16:40:01 +08:00
|
|
|
|
2016-11-22 21:57:41 +08:00
|
|
|
# Enable reCAPTCHA
|
2016-11-23 16:36:49 +08:00
|
|
|
config.x.enable_recaptcha = false
|
2016-11-23 16:49:52 +08:00
|
|
|
|
|
|
|
# Enable email confirmations
|
|
|
|
config.x.enable_email_confirmations = false
|
2017-01-30 22:04:02 +08:00
|
|
|
|
|
|
|
# Enable user registrations
|
2017-01-31 18:10:46 +08:00
|
|
|
config.x.enable_user_registration = true
|
2017-07-06 15:07:05 +08:00
|
|
|
|
2018-04-04 21:29:20 +08:00
|
|
|
# disable sign in with LinkedIn account
|
|
|
|
config.x.linkedin_signin_enabled = false
|
|
|
|
|
2018-10-10 06:09:32 +08:00
|
|
|
# enable assets compiling
|
|
|
|
config.assets.compile = true
|
2016-02-12 23:52:43 +08:00
|
|
|
end
|