From 843116f645f3f8e68b70a49d88ea7b1b7b6bcaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Zrim=C5=A1ek?= Date: Tue, 4 Jul 2017 14:42:53 +0200 Subject: [PATCH] Fixed some RoR 5.1 default settings. [SCI-1413] --- config/application.rb | 3 --- config/cable.yml | 8 +++----- config/environments/development.rb | 5 +++-- config/environments/production.rb | 4 ++-- config/initializers/new_framework_defaults_5_1.rb | 2 +- config/secrets.yml | 2 +- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/config/application.rb b/config/application.rb index 2d0ae28eb..d017511ba 100644 --- a/config/application.rb +++ b/config/application.rb @@ -19,9 +19,6 @@ module Scinote config.active_job.queue_adapter = :delayed_job - # Do not swallow errors in after_commit/after_rollback callbacks. - # config.active_record.raise_in_transactional_callbacks = true - # Logging config.log_formatter = proc do |severity, datetime, progname, msg| "[#{datetime}] #{severity}: #{msg}\n" diff --git a/config/cable.yml b/config/cable.yml index e93e8dfed..79259724b 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -1,10 +1,8 @@ development: - adapter: async + adapter: postgresql test: - adapter: async + adapter: postgresql production: - adapter: redis - url: redis://localhost:6379/1 - channel_prefix: scinote_production + adapter: postgresql diff --git a/config/environments/development.rb b/config/environments/development.rb index 414159fa1..9d40df8c9 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -93,8 +93,9 @@ Rails.application.configure do # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker - # Suppress logger output for asset requests. - config.assets.quiet = true + # Suppress logger output for asset requests. By default logger output is + # enabled. + # config.assets.quiet = true # Enable/disable caching. By default caching is disabled. if Rails.root.join('tmp/caching-dev.txt').exist? diff --git a/config/environments/production.rb b/config/environments/production.rb index 5ee6a1484..a14831ef4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -130,8 +130,8 @@ Rails.application.configure do # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment) - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "scinote_#{Rails.env}" + config.active_job.queue_adapter = :delayed_job + config.active_job.queue_name_prefix = "scinote_#{Rails.env}" config.action_mailer.perform_caching = false # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb index 9010abd5c..0a5ce9615 100644 --- a/config/initializers/new_framework_defaults_5_1.rb +++ b/config/initializers/new_framework_defaults_5_1.rb @@ -7,7 +7,7 @@ # Read the Guide for Upgrading Ruby on Rails for more info on each option. # Make `form_with` generate non-remote forms. -Rails.application.config.action_view.form_with_generates_remote_forms = false +# Rails.application.config.action_view.form_with_generates_remote_forms = false # Unknown asset fallback will return the path passed in when the given # asset is not present in the asset pipeline. diff --git a/config/secrets.yml b/config/secrets.yml index 9705af649..78ebbff25 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -50,7 +50,7 @@ common: &common # You can use `rake secret` to generate a secure secret key. # ====================================================================== - secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> +# secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> # ====================================================================== # Write any potential environment-specific secrets here.