Rails 5.0

This commit is contained in:
Patrick Gansterer 2020-09-04 12:57:19 +02:00
parent 2892d5272d
commit 2557645f4f
25 changed files with 367 additions and 186 deletions

View file

@ -2,7 +2,7 @@
#
# This file is in the public domain.
Foodsoft::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
@ -11,20 +11,16 @@ Foodsoft::Application.configure do
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# We clear the cache for each test, let's do that in memory.
config.cache_store = :memory_store
# 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
# Required for i18n-js
config.assets.initialize_on_precompile = true
# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = "public, max-age=3600"
# 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=3600'
}
# Show full error reports and disable caching.
config.consider_all_requests_local = true
@ -35,9 +31,7 @@ Foodsoft::Application.configure do
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
# Configure hostname for action mailer (can be overridden in foodcoop config)
config.action_mailer.default_url_options = { host: 'localhost', port: 3000, protocol: 'http' }
config.action_mailer.perform_caching = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
@ -47,6 +41,6 @@ Foodsoft::Application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Run resque tasks as part of the main app
Resque.inline = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end