mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 08:46:41 +01:00
Update to Rails 6.0.0
This commit is contained in:
parent
f3a6b1cbc5
commit
cc85ff0ae5
8
Gemfile
8
Gemfile
@ -2,9 +2,9 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||||
gem 'rails', '5.2.2.1'
|
gem 'rails', '6.0.0'
|
||||||
# Use sqlite3 as the database for Active Record
|
# Use sqlite3 as the database for Active Record
|
||||||
gem 'sqlite3', '~> 1.3.13'
|
gem 'sqlite3', '~> 1.4.1'
|
||||||
|
|
||||||
gem 'mysql2', '~> 0.5.2', group: :production
|
gem 'mysql2', '~> 0.5.2', group: :production
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ gem 'coffee-rails', '~> 5.0.0'
|
|||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
# gem 'therubyracer', platforms: :ruby
|
# gem 'therubyracer', platforms: :ruby
|
||||||
|
|
||||||
gem 'rails-i18n', '~> 5.1.3'
|
gem 'rails-i18n', '~> 6.0.0'
|
||||||
|
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ gem 'jbuilder', '~> 2.9.1'
|
|||||||
# bundle exec rake doc:rails generates the API under doc/api.
|
# bundle exec rake doc:rails generates the API under doc/api.
|
||||||
gem 'sdoc', '~> 1.0.0', group: :doc
|
gem 'sdoc', '~> 1.0.0', group: :doc
|
||||||
|
|
||||||
gem 'web-console', '~> 3.7.0', group: :development
|
gem 'web-console', '~> 4.0.1', group: :development
|
||||||
|
|
||||||
# Use Codacy for coverage
|
# Use Codacy for coverage
|
||||||
gem 'codacy-coverage', :require => false
|
gem 'codacy-coverage', :require => false
|
||||||
|
|||||||
121
Gemfile.lock
121
Gemfile.lock
@ -1,48 +1,61 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (5.2.2.1)
|
actioncable (6.0.0)
|
||||||
actionpack (= 5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailer (5.2.2.1)
|
actionmailbox (6.0.0)
|
||||||
actionpack (= 5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
actionview (= 5.2.2.1)
|
activejob (= 6.0.0)
|
||||||
activejob (= 5.2.2.1)
|
activerecord (= 6.0.0)
|
||||||
|
activestorage (= 6.0.0)
|
||||||
|
activesupport (= 6.0.0)
|
||||||
|
mail (>= 2.7.1)
|
||||||
|
actionmailer (6.0.0)
|
||||||
|
actionpack (= 6.0.0)
|
||||||
|
actionview (= 6.0.0)
|
||||||
|
activejob (= 6.0.0)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (5.2.2.1)
|
actionpack (6.0.0)
|
||||||
actionview (= 5.2.2.1)
|
actionview (= 6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activesupport (= 6.0.0)
|
||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actionview (5.2.2.1)
|
actiontext (6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
|
activerecord (= 6.0.0)
|
||||||
|
activestorage (= 6.0.0)
|
||||||
|
activesupport (= 6.0.0)
|
||||||
|
nokogiri (>= 1.8.5)
|
||||||
|
actionview (6.0.0)
|
||||||
|
activesupport (= 6.0.0)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (5.2.2.1)
|
activejob (6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activesupport (= 6.0.0)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (5.2.2.1)
|
activemodel (6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activesupport (= 6.0.0)
|
||||||
activerecord (5.2.2.1)
|
activerecord (6.0.0)
|
||||||
activemodel (= 5.2.2.1)
|
activemodel (= 6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activesupport (= 6.0.0)
|
||||||
arel (>= 9.0)
|
activestorage (6.0.0)
|
||||||
activestorage (5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
actionpack (= 5.2.2.1)
|
activejob (= 6.0.0)
|
||||||
activerecord (= 5.2.2.1)
|
activerecord (= 6.0.0)
|
||||||
marcel (~> 0.3.1)
|
marcel (~> 0.3.1)
|
||||||
activesupport (5.2.2.1)
|
activesupport (6.0.0)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (9.0.0)
|
zeitwerk (~> 2.1, >= 2.1.8)
|
||||||
autoprefixer-rails (9.6.1.1)
|
autoprefixer-rails (9.6.1.1)
|
||||||
execjs
|
execjs
|
||||||
bcrypt (3.1.13)
|
bcrypt (3.1.13)
|
||||||
@ -136,18 +149,20 @@ GEM
|
|||||||
rack (2.0.7)
|
rack (2.0.7)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (5.2.2.1)
|
rails (6.0.0)
|
||||||
actioncable (= 5.2.2.1)
|
actioncable (= 6.0.0)
|
||||||
actionmailer (= 5.2.2.1)
|
actionmailbox (= 6.0.0)
|
||||||
actionpack (= 5.2.2.1)
|
actionmailer (= 6.0.0)
|
||||||
actionview (= 5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
activejob (= 5.2.2.1)
|
actiontext (= 6.0.0)
|
||||||
activemodel (= 5.2.2.1)
|
actionview (= 6.0.0)
|
||||||
activerecord (= 5.2.2.1)
|
activejob (= 6.0.0)
|
||||||
activestorage (= 5.2.2.1)
|
activemodel (= 6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activerecord (= 6.0.0)
|
||||||
|
activestorage (= 6.0.0)
|
||||||
|
activesupport (= 6.0.0)
|
||||||
bundler (>= 1.3.0)
|
bundler (>= 1.3.0)
|
||||||
railties (= 5.2.2.1)
|
railties (= 6.0.0)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.4)
|
rails-controller-testing (1.0.4)
|
||||||
actionpack (>= 5.0.1.x)
|
actionpack (>= 5.0.1.x)
|
||||||
@ -158,15 +173,15 @@ GEM
|
|||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.2.0)
|
rails-html-sanitizer (1.2.0)
|
||||||
loofah (~> 2.2, >= 2.2.2)
|
loofah (~> 2.2, >= 2.2.2)
|
||||||
rails-i18n (5.1.3)
|
rails-i18n (6.0.0)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 0.7, < 2)
|
||||||
railties (>= 5.0, < 6)
|
railties (>= 6.0.0, < 7)
|
||||||
railties (5.2.2.1)
|
railties (6.0.0)
|
||||||
actionpack (= 5.2.2.1)
|
actionpack (= 6.0.0)
|
||||||
activesupport (= 5.2.2.1)
|
activesupport (= 6.0.0)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.19.0, < 2.0)
|
thor (>= 0.20.3, < 2.0)
|
||||||
rake (12.3.3)
|
rake (12.3.3)
|
||||||
rdoc (6.2.0)
|
rdoc (6.2.0)
|
||||||
responders (3.0.0)
|
responders (3.0.0)
|
||||||
@ -196,8 +211,7 @@ GEM
|
|||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.3.13)
|
sqlite3 (1.4.1)
|
||||||
sqlite3 (1.3.13-x64-mingw32)
|
|
||||||
thor (0.20.3)
|
thor (0.20.3)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.9)
|
tilt (2.0.9)
|
||||||
@ -212,11 +226,11 @@ GEM
|
|||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
warden (1.2.8)
|
warden (1.2.8)
|
||||||
rack (>= 2.0.6)
|
rack (>= 2.0.6)
|
||||||
web-console (3.7.0)
|
web-console (4.0.1)
|
||||||
actionview (>= 5.0)
|
actionview (>= 6.0.0)
|
||||||
activemodel (>= 5.0)
|
activemodel (>= 6.0.0)
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
railties (>= 5.0)
|
railties (>= 6.0.0)
|
||||||
websocket-driver (0.7.1)
|
websocket-driver (0.7.1)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.4)
|
websocket-extensions (0.1.4)
|
||||||
@ -224,6 +238,7 @@ GEM
|
|||||||
will_paginate (3.1.8)
|
will_paginate (3.1.8)
|
||||||
will_paginate-bootstrap (1.0.2)
|
will_paginate-bootstrap (1.0.2)
|
||||||
will_paginate (>= 3.0.3)
|
will_paginate (>= 3.0.3)
|
||||||
|
zeitwerk (2.1.10)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@ -242,16 +257,16 @@ DEPENDENCIES
|
|||||||
mysql2 (~> 0.5.2)
|
mysql2 (~> 0.5.2)
|
||||||
omniauth
|
omniauth
|
||||||
omniauth-github
|
omniauth-github
|
||||||
rails (= 5.2.2.1)
|
rails (= 6.0.0)
|
||||||
rails-controller-testing
|
rails-controller-testing
|
||||||
rails-i18n (~> 5.1.3)
|
rails-i18n (~> 6.0.0)
|
||||||
sassc-rails (~> 2.1.2)
|
sassc-rails (~> 2.1.2)
|
||||||
sdoc (~> 1.0.0)
|
sdoc (~> 1.0.0)
|
||||||
sqlite3 (~> 1.3.13)
|
sqlite3 (~> 1.4.1)
|
||||||
turbolinks (~> 5.2.1)
|
turbolinks (~> 5.2.1)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (~> 4.1.20)
|
uglifier (~> 4.1.20)
|
||||||
web-console (~> 3.7.0)
|
web-console (~> 4.0.1)
|
||||||
will-paginate-i18n (~> 0.1.15)
|
will-paginate-i18n (~> 0.1.15)
|
||||||
will_paginate (~> 3.1.8)
|
will_paginate (~> 3.1.8)
|
||||||
will_paginate-bootstrap (~> 1.0.2)
|
will_paginate-bootstrap (~> 1.0.2)
|
||||||
|
|||||||
12
bin/setup
12
bin/setup
@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
include FileUtils
|
|
||||||
|
|
||||||
# path to your application root.
|
# path to your application root.
|
||||||
APP_ROOT = File.expand_path('..', __dir__)
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
@ -9,24 +8,25 @@ def system!(*args)
|
|||||||
system(*args) || abort("\n== Command #{args} failed ==")
|
system(*args) || abort("\n== Command #{args} failed ==")
|
||||||
end
|
end
|
||||||
|
|
||||||
chdir APP_ROOT do
|
FileUtils.chdir APP_ROOT do
|
||||||
# This script is a starting point to setup your application.
|
# This script is a way to setup or update your development environment automatically.
|
||||||
|
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
||||||
# Add necessary setup steps to this file.
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
puts '== Installing dependencies =='
|
puts '== Installing dependencies =='
|
||||||
system! 'gem install bundler --conservative'
|
system! 'gem install bundler --conservative'
|
||||||
system('bundle check') || system!('bundle install')
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
# Install JavaScript dependencies if using Yarn
|
# Install JavaScript dependencies
|
||||||
# system('bin/yarn')
|
# system('bin/yarn')
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
# unless File.exist?('config/database.yml')
|
# unless File.exist?('config/database.yml')
|
||||||
# cp 'config/database.yml.sample', 'config/database.yml'
|
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
||||||
# end
|
# end
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
system! 'bin/rails db:setup'
|
system! 'bin/rails db:prepare'
|
||||||
|
|
||||||
puts "\n== Removing old logs and tempfiles =="
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
system! 'bin/rails log:clear tmp:clear'
|
system! 'bin/rails log:clear tmp:clear'
|
||||||
|
|||||||
@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
|
|||||||
module Projekteuler
|
module Projekteuler
|
||||||
class Application < Rails::Application
|
class Application < Rails::Application
|
||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 5.2
|
config.load_defaults 6.0
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Settings in config/environments/* take precedence over those specified here.
|
||||||
# Application configuration can go into files in config/initializers
|
# Application configuration can go into files in config/initializers
|
||||||
|
|||||||
@ -2,7 +2,7 @@ development:
|
|||||||
adapter: async
|
adapter: async
|
||||||
|
|
||||||
test:
|
test:
|
||||||
adapter: async
|
adapter: test
|
||||||
|
|
||||||
production:
|
production:
|
||||||
adapter: redis
|
adapter: redis
|
||||||
|
|||||||
@ -16,6 +16,7 @@ Rails.application.configure do
|
|||||||
# Run rails dev:cache to toggle caching.
|
# Run rails dev:cache to toggle caching.
|
||||||
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
config.action_controller.enable_fragment_cache_logging = true
|
||||||
|
|
||||||
config.cache_store = :memory_store
|
config.cache_store = :memory_store
|
||||||
config.public_file_server.headers = {
|
config.public_file_server.headers = {
|
||||||
@ -27,7 +28,7 @@ Rails.application.configure do
|
|||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
end
|
end
|
||||||
|
|
||||||
# Store uploaded files on the local file system (see config/storage.yml for options)
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
||||||
config.active_storage.service = :local
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Don't care if the mailer can't send.
|
# Don't care if the mailer can't send.
|
||||||
@ -52,7 +53,7 @@ Rails.application.configure do
|
|||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
config.assets.quiet = true
|
config.assets.quiet = true
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations.
|
||||||
config.action_view.raise_on_missing_translations = true
|
config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
# Use an evented file watcher to asynchronously detect changes in source code,
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||||
|
|||||||
@ -22,15 +22,15 @@ Rails.application.configure do
|
|||||||
# Apache or NGINX already handles this.
|
# Apache or NGINX already handles this.
|
||||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress JS using a preprocessor.
|
||||||
config.assets.js_compressor = :uglifier
|
config.assets.js_compressor = :uglifier
|
||||||
|
|
||||||
|
# Compress CSS using a preprocessor.
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ Rails.application.configure do
|
|||||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
||||||
|
|
||||||
# Store uploaded files on the local file system (see config/storage.yml for options)
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
||||||
config.active_storage.service = :local
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Mount Action Cable outside main process or domain
|
# Mount Action Cable outside main process or domain.
|
||||||
# config.action_cable.mount_path = nil
|
# config.action_cable.mount_path = nil
|
||||||
# config.action_cable.url = 'wss://example.com/cable'
|
# config.action_cable.url = 'wss://example.com/cable'
|
||||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||||
@ -59,9 +59,9 @@ Rails.application.configure do
|
|||||||
# Use a different cache store in production.
|
# Use a different cache store in production.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
||||||
# config.active_job.queue_adapter = :resque
|
# config.active_job.queue_adapter = :resque
|
||||||
# config.active_job.queue_name_prefix = "projekteuler_#{Rails.env}"
|
# config.active_job.queue_name_prefix = "projekteuler_production"
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
@ -91,4 +91,25 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Do not dump schema after migrations.
|
# Do not dump schema after migrations.
|
||||||
config.active_record.dump_schema_after_migration = false
|
config.active_record.dump_schema_after_migration = false
|
||||||
|
|
||||||
|
# Inserts middleware to perform automatic connection switching.
|
||||||
|
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
||||||
|
# middleware. The `delay` is used to determine how long to wait after a write
|
||||||
|
# to send a subsequent read to the primary.
|
||||||
|
#
|
||||||
|
# The `database_resolver` class is used by the middleware to determine which
|
||||||
|
# database is appropriate to use based on the time delay.
|
||||||
|
#
|
||||||
|
# The `database_resolver_context` class is used by the middleware to set
|
||||||
|
# timestamps for the last write to the primary. The resolver uses the context
|
||||||
|
# class timestamps to determine how long to wait before reading from the
|
||||||
|
# replica.
|
||||||
|
#
|
||||||
|
# By default Rails will store a last write timestamp in the session. The
|
||||||
|
# DatabaseSelector middleware is designed as such you can define your own
|
||||||
|
# strategy for connection switching and pass that into the middleware through
|
||||||
|
# these configuration options.
|
||||||
|
# config.active_record.database_selector = { delay: 2.seconds }
|
||||||
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||||
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
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
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# 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
|
# 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!
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
|
|
||||||
|
Rails.application.configure do
|
||||||
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Do not eager load code on boot. This avoids loading your whole application
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
@ -21,6 +22,7 @@ Rails.application.configure do
|
|||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
config.cache_store = :null_store
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates.
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_dispatch.show_exceptions = false
|
config.action_dispatch.show_exceptions = false
|
||||||
@ -28,7 +30,7 @@ Rails.application.configure do
|
|||||||
# Disable request forgery protection in test environment.
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
# Store uploaded files on the local file system in a temporary directory
|
# Store uploaded files on the local file system in a temporary directory.
|
||||||
config.active_storage.service = :test
|
config.active_storage.service = :test
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
@ -41,6 +43,6 @@ Rails.application.configure do
|
|||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations.
|
||||||
config.action_view.raise_on_missing_translations = true
|
config.action_view.raise_on_missing_translations = true
|
||||||
end
|
end
|
||||||
|
|||||||
@ -21,6 +21,9 @@ end
|
|||||||
# If you are using UJS then enable automatic nonce generation
|
# If you are using UJS then enable automatic nonce generation
|
||||||
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
||||||
|
|
||||||
|
# Set the nonce only to specific directives
|
||||||
|
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
||||||
|
|
||||||
# Report CSP violations to a specified URI
|
# Report CSP violations to a specified URI
|
||||||
# For further information see the following documentation:
|
# For further information see the following documentation:
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
# Be sure to restart your server when you modify this file.
|
|
||||||
#
|
|
||||||
# This file contains migration options to ease your Rails 5.1 upgrade.
|
|
||||||
#
|
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Unknown asset fallback will return the path passed in when the given
|
|
||||||
# asset is not present in the asset pipeline.
|
|
||||||
# Rails.application.config.assets.unknown_asset_fallback = false
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
||||||
|
|
||||||
# The priority is based upon order of creation: first created -> highest priority.
|
# The priority is based upon order of creation: first created -> highest priority.
|
||||||
# See how all your routes lay out with "rake routes".
|
# See how all your routes lay out with "rake routes".
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user