diff --git a/CHANGELOG.md b/CHANGELOG.md index bd40b67f2..8ec701a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +04.06.2020 +* Moved dev config to sample file [#1599](https://github.com/internetee/registry/pull/1599) + +03.06.2020 +* Upgraded Rails to 6.0.3 [#1593](https://github.com/internetee/registry/pull/1593) + 02.06.2020 * Fixed registration deadline format for whois/restwhois [#1595](https://github.com/internetee/registry/pull/1595) diff --git a/config/environments/development.rb.sample b/config/environments/development.rb.sample index d052f69c0..377f2cbbd 100644 --- a/config/environments/development.rb.sample +++ b/config/environments/development.rb.sample @@ -9,32 +9,59 @@ Rails.application.configure do # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. + # Show full error reports. config.consider_all_requests_local = true - config.action_controller.perform_caching = false + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Store uploaded files on the local file system (see config/storage.yml for options). + config.active_storage.service = :local + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log - config.logger = ActiveSupport::Logger.new(nil) - # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load + # Highlight code that triggered database queries in logs. + config.active_record.verbose_query_logs = true + # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. - config.assets.debug = false + config.assets.debug = true - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - config.assets.raise_runtime_errors = true - - config.action_view.raise_on_missing_translations = true + # Suppress logger output for asset requests. + config.assets.quiet = true # Allow any host to access development config.hosts.clear + + # Raises error for missing translations. + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker end # In this mode, any jobs you queue will be run in the same thread, synchronously diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 0794e55a4..d5a05217a 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -6,4 +6,7 @@ Rails.application.configure do # Add additional assets to the asset load path config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts', 'node_modules') + + # Precompile additional assets. + # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. end