Rails 7 RC1 updates
This commit is contained in:
@@ -6,28 +6,37 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|||||||
ruby '3.0.3'
|
ruby '3.0.3'
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
||||||
gem 'rails', '~> 7.0.0.alpha2'
|
gem 'rails', '~> 7.0.0.rc1'
|
||||||
|
|
||||||
|
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
|
||||||
|
gem 'sprockets-rails', '>= 3.4.1'
|
||||||
|
|
||||||
# Use postgresql as the database for Active Record
|
# Use postgresql as the database for Active Record
|
||||||
gem 'pg', '~> 1.1'
|
gem 'pg', '~> 1.1'
|
||||||
|
|
||||||
# Use the Puma web server [https://github.com/puma/puma]
|
# Use the Puma web server [https://github.com/puma/puma]
|
||||||
gem 'puma', '~> 5.5'
|
gem 'puma', '~> 5.0'
|
||||||
|
|
||||||
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
|
||||||
gem 'importmap-rails', '>= 0.3.4'
|
gem 'importmap-rails', '>= 0.9.2'
|
||||||
|
|
||||||
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
|
||||||
gem 'turbo-rails', '>= 0.7.11'
|
gem 'turbo-rails', '>= 0.9.0'
|
||||||
|
|
||||||
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
|
||||||
gem 'stimulus-rails', '>= 0.4.0'
|
gem 'stimulus-rails', '>= 0.7.3'
|
||||||
|
|
||||||
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
||||||
gem 'jbuilder', '~> 2.11'
|
gem 'jbuilder', '~> 2.11'
|
||||||
|
|
||||||
# Use Redis adapter to run Action Cable in production
|
# Use Redis adapter to run Action Cable in production
|
||||||
gem 'redis', '~> 4.5'
|
gem 'redis', '~> 4.0'
|
||||||
|
|
||||||
|
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
||||||
|
# gem "kredis"
|
||||||
|
|
||||||
|
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
||||||
|
# gem "bcrypt", "~> 3.1.7"
|
||||||
|
|
||||||
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||||
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
|
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
|
||||||
@@ -35,9 +44,6 @@ gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
|
|||||||
# Reduces boot times through caching; required in config/boot.rb
|
# Reduces boot times through caching; required in config/boot.rb
|
||||||
gem 'bootsnap', '>= 1.4.4', require: false
|
gem 'bootsnap', '>= 1.4.4', require: false
|
||||||
|
|
||||||
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
|
||||||
# gem "bcrypt", "~> 3.1.7"
|
|
||||||
|
|
||||||
# Use Sass to process CSS
|
# Use Sass to process CSS
|
||||||
# gem "sassc-rails", "~> 2.1"
|
# gem "sassc-rails", "~> 2.1"
|
||||||
|
|
||||||
@@ -49,7 +55,7 @@ gem 'bundler-audit'
|
|||||||
gem 'rubocop-rails'
|
gem 'rubocop-rails'
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# Start debugger with binding.b [https://github.com/ruby/debug]
|
# See https://edgeguides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
||||||
gem 'debug', '>= 1.0.0', platforms: %i[mri mingw x64_mingw]
|
gem 'debug', '>= 1.0.0', platforms: %i[mri mingw x64_mingw]
|
||||||
gem 'rspec-rails'
|
gem 'rspec-rails'
|
||||||
gem 'rubocop-rspec'
|
gem 'rubocop-rspec'
|
||||||
@@ -60,8 +66,8 @@ group :development do
|
|||||||
gem 'web-console', '>= 4.1.0'
|
gem 'web-console', '>= 4.1.0'
|
||||||
|
|
||||||
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
||||||
# gem "rack-mini-profiler", ">= 2.3.3"
|
gem 'rack-mini-profiler', '>= 2.3.3'
|
||||||
|
|
||||||
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
||||||
# gem "spring"
|
# gem 'spring'
|
||||||
end
|
end
|
||||||
|
|||||||
+68
-64
@@ -1,60 +1,61 @@
|
|||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (7.0.0.alpha2)
|
actioncable (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (7.0.0.alpha2)
|
actionmailbox (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
activejob (= 7.0.0.alpha2)
|
activejob (= 7.0.0.rc1)
|
||||||
activerecord (= 7.0.0.alpha2)
|
activerecord (= 7.0.0.rc1)
|
||||||
activestorage (= 7.0.0.alpha2)
|
activestorage (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (7.0.0.alpha2)
|
actionmailer (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
actionview (= 7.0.0.alpha2)
|
actionview (= 7.0.0.rc1)
|
||||||
activejob (= 7.0.0.alpha2)
|
activejob (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (7.0.0.alpha2)
|
actionpack (7.0.0.rc1)
|
||||||
actionview (= 7.0.0.alpha2)
|
actionview (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
rack (~> 2.0, >= 2.2.0)
|
rack (~> 2.0, >= 2.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.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (7.0.0.alpha2)
|
actiontext (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
activerecord (= 7.0.0.alpha2)
|
activerecord (= 7.0.0.rc1)
|
||||||
activestorage (= 7.0.0.alpha2)
|
activestorage (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
|
globalid (>= 0.6.0)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (7.0.0.alpha2)
|
actionview (7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
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.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (7.0.0.alpha2)
|
activejob (7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (7.0.0.alpha2)
|
activemodel (7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
activerecord (7.0.0.alpha2)
|
activerecord (7.0.0.rc1)
|
||||||
activemodel (= 7.0.0.alpha2)
|
activemodel (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
activestorage (7.0.0.alpha2)
|
activestorage (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
activejob (= 7.0.0.alpha2)
|
activejob (= 7.0.0.rc1)
|
||||||
activerecord (= 7.0.0.alpha2)
|
activerecord (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
marcel (~> 1.0.0)
|
marcel (~> 1.0)
|
||||||
mini_mime (>= 1.1.0)
|
mini_mime (>= 1.1.0)
|
||||||
activesupport (7.0.0.alpha2)
|
activesupport (7.0.0.rc1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
@@ -113,39 +114,40 @@ GEM
|
|||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.6.0)
|
racc (1.6.0)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
|
rack-mini-profiler (2.3.3)
|
||||||
|
rack (>= 1.2.0)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (7.0.0.alpha2)
|
rails (7.0.0.rc1)
|
||||||
actioncable (= 7.0.0.alpha2)
|
actioncable (= 7.0.0.rc1)
|
||||||
actionmailbox (= 7.0.0.alpha2)
|
actionmailbox (= 7.0.0.rc1)
|
||||||
actionmailer (= 7.0.0.alpha2)
|
actionmailer (= 7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
actiontext (= 7.0.0.alpha2)
|
actiontext (= 7.0.0.rc1)
|
||||||
actionview (= 7.0.0.alpha2)
|
actionview (= 7.0.0.rc1)
|
||||||
activejob (= 7.0.0.alpha2)
|
activejob (= 7.0.0.rc1)
|
||||||
activemodel (= 7.0.0.alpha2)
|
activemodel (= 7.0.0.rc1)
|
||||||
activerecord (= 7.0.0.alpha2)
|
activerecord (= 7.0.0.rc1)
|
||||||
activestorage (= 7.0.0.alpha2)
|
activestorage (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 7.0.0.alpha2)
|
railties (= 7.0.0.rc1)
|
||||||
sprockets-rails (>= 2.0.0)
|
|
||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.2)
|
rails-html-sanitizer (1.4.2)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
railties (7.0.0.alpha2)
|
railties (7.0.0.rc1)
|
||||||
actionpack (= 7.0.0.alpha2)
|
actionpack (= 7.0.0.rc1)
|
||||||
activesupport (= 7.0.0.alpha2)
|
activesupport (= 7.0.0.rc1)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.13)
|
rake (>= 12.2)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
zeitwerk (~> 2.5.0.beta3)
|
zeitwerk (~> 2.5)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
redis (4.5.1)
|
redis (4.5.1)
|
||||||
regexp_parser (2.1.1)
|
regexp_parser (2.2.0)
|
||||||
reline (0.2.7)
|
reline (0.2.7)
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
@@ -220,17 +222,19 @@ DEPENDENCIES
|
|||||||
brakeman
|
brakeman
|
||||||
bundler-audit
|
bundler-audit
|
||||||
debug (>= 1.0.0)
|
debug (>= 1.0.0)
|
||||||
importmap-rails (>= 0.3.4)
|
importmap-rails (>= 0.9.2)
|
||||||
jbuilder (~> 2.11)
|
jbuilder (~> 2.11)
|
||||||
pg (~> 1.1)
|
pg (~> 1.1)
|
||||||
puma (~> 5.5)
|
puma (~> 5.0)
|
||||||
rails (~> 7.0.0.alpha2)
|
rack-mini-profiler (>= 2.3.3)
|
||||||
redis (~> 4.5)
|
rails (~> 7.0.0.rc1)
|
||||||
|
redis (~> 4.0)
|
||||||
rspec-rails
|
rspec-rails
|
||||||
rubocop-rails
|
rubocop-rails
|
||||||
rubocop-rspec
|
rubocop-rspec
|
||||||
stimulus-rails (>= 0.4.0)
|
sprockets-rails (>= 3.4.1)
|
||||||
turbo-rails (>= 0.7.11)
|
stimulus-rails (>= 0.7.3)
|
||||||
|
turbo-rails (>= 0.9.0)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
web-console (>= 4.1.0)
|
web-console (>= 4.1.0)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
//= link_tree ../images
|
//= link_tree ../images
|
||||||
//= link_directory ../stylesheets .css
|
//= link_directory ../stylesheets .css
|
||||||
//= link_tree ../../javascript .js
|
//= link_tree ../../javascript .js
|
||||||
|
//= link_tree ../../../vendor/javascript .js
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
||||||
import "controllers"
|
|
||||||
import "@hotwired/turbo-rails"
|
import "@hotwired/turbo-rails"
|
||||||
|
import "controllers"
|
||||||
|
|
||||||
console.log('Hello World from application.js');
|
console.log('Hello World from application.js');
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Application } from "@hotwired/stimulus"
|
|||||||
const application = Application.start()
|
const application = Application.start()
|
||||||
|
|
||||||
// Configure Stimulus development experience
|
// Configure Stimulus development experience
|
||||||
application.warnings = true
|
|
||||||
application.debug = false
|
application.debug = false
|
||||||
window.Stimulus = application
|
window.Stimulus = application
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
// Import and register all your controllers from the importmap under controllers/*
|
// Import and register all your controllers from the importmap under controllers/*
|
||||||
|
|
||||||
import { application } from "controllers/application"
|
import { application } from "controllers/application"
|
||||||
import { registerControllersFrom } from "@hotwired/stimulus-importmap-autoloader"
|
|
||||||
registerControllersFrom("controllers", application)
|
// Eager load all controllers defined in the import map under controllers/**/*_controller
|
||||||
|
import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
|
||||||
|
eagerLoadControllersFrom("controllers", application)
|
||||||
|
|
||||||
|
// Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
|
||||||
|
// import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
|
||||||
|
// lazyLoadControllersFrom("controllers", application)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Railsondocker</title>
|
<title>Railsondocker</title>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
<%= csp_meta_tag %>
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,5 @@ module Railsondocker
|
|||||||
#
|
#
|
||||||
# config.time_zone = "Central Time (US & Canada)"
|
# config.time_zone = "Central Time (US & Canada)"
|
||||||
# config.eager_load_paths << Rails.root.join("extras")
|
# config.eager_load_paths << Rails.root.join("extras")
|
||||||
|
|
||||||
# Don't generate system test files.
|
|
||||||
config.generators.system_tests = nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ Rails.application.configure do
|
|||||||
# Show full error reports.
|
# Show full error reports.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
||||||
|
# Enable server timing
|
||||||
|
config.server_timing = true
|
||||||
|
|
||||||
# Enable/disable caching. By default caching is disabled.
|
# Enable/disable caching. By default caching is disabled.
|
||||||
# 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?
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Rails.application.configure do
|
|||||||
config.log_level = :info
|
config.log_level = :info
|
||||||
|
|
||||||
# Prepend all log lines with the following tags.
|
# Prepend all log lines with the following tags.
|
||||||
config.log_tags = [:request_id]
|
config.log_tags = [ :request_id ]
|
||||||
|
|
||||||
# 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
|
||||||
@@ -85,7 +85,7 @@ Rails.application.configure do
|
|||||||
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
|
||||||
|
|
||||||
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
if ENV['RAILS_LOG_TO_STDOUT'].present?
|
||||||
logger = ActiveSupport::Logger.new($stdout)
|
logger = ActiveSupport::Logger.new(STDOUT)
|
||||||
logger.formatter = config.log_formatter
|
logger.formatter = config.log_formatter
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
end
|
end
|
||||||
@@ -113,4 +113,14 @@ Rails.application.configure do
|
|||||||
# config.active_record.database_selector = { delay: 2.seconds }
|
# config.active_record.database_selector = { delay: 2.seconds }
|
||||||
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||||
|
|
||||||
|
# Inserts middleware to perform automatic shard swapping. The `shard_selector` hash
|
||||||
|
# can be used to pass options to the `ShardSelector` middleware. The `lock` option is
|
||||||
|
# used to determine whether shard swapping should be prohibited for the request.
|
||||||
|
#
|
||||||
|
# The `shard_resolver` option is used by the middleware to determine which shard
|
||||||
|
# to switch to. The application must provide a mechanism for finding the shard name
|
||||||
|
# in a proc. See guides for an example.
|
||||||
|
# config.active_record.shard_selector = { lock: true }
|
||||||
|
# config.active_record.shard_resolver = ->(request) { Tenant.find_by!(host: request.host).shard }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ Rails.application.configure do
|
|||||||
# Turn false under Spring and add config.action_view.cache_template_loading = true
|
# Turn false under Spring and add config.action_view.cache_template_loading = true
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
|
|
||||||
# Do not eager load code on boot. This avoids loading your whole application
|
# Eager loading loads your whole application. When running a single test locally,
|
||||||
# just for the purpose of running a single test. If you are using a tool that
|
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
||||||
# preloads Rails for running tests, you may have to set it to true.
|
# system, or in some way before deploying your code.
|
||||||
config.eager_load = false
|
config.eager_load = ENV["CI"].present?
|
||||||
|
|
||||||
# Configure public file server for tests with Cache-Control for performance.
|
# Configure public file server for tests with Cache-Control for performance.
|
||||||
config.public_file_server.enabled = true
|
config.public_file_server.enabled = true
|
||||||
|
|||||||
+6
-9
@@ -1,10 +1,7 @@
|
|||||||
# Use direct uploads for Active Storage (remember to import "@rails/activestorage" in your application.js)
|
# Pin npm packages by running ./bin/importmap
|
||||||
# pin "@rails/activestorage", to: "activestorage.esm.js"
|
|
||||||
|
|
||||||
# Use node modules from a JavaScript CDN by running ./bin/importmap
|
pin "application", preload: true
|
||||||
|
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
||||||
pin 'application'
|
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
||||||
pin '@hotwired/turbo-rails', to: 'turbo.js'
|
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
||||||
pin '@hotwired/stimulus', to: 'stimulus.js'
|
pin_all_from "app/javascript/controllers", under: "controllers"
|
||||||
pin '@hotwired/stimulus-importmap-autoloader', to: 'stimulus-importmap-autoloader.js'
|
|
||||||
pin_all_from 'app/javascript/controllers', under: 'controllers'
|
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
# 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
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
||||||
|
|
||||||
# Rails.application.config.content_security_policy do |policy|
|
# Rails.application.configure do
|
||||||
|
# config.content_security_policy do |policy|
|
||||||
# policy.default_src :self, :https
|
# policy.default_src :self, :https
|
||||||
# policy.font_src :self, :https, :data
|
# policy.font_src :self, :https, :data
|
||||||
# policy.img_src :self, :https, :data
|
# policy.img_src :self, :https, :data
|
||||||
@@ -15,14 +16,12 @@
|
|||||||
# # Specify URI for violation reports
|
# # Specify URI for violation reports
|
||||||
# # policy.report_uri "/csp-violation-report-endpoint"
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
||||||
# end
|
# end
|
||||||
|
#
|
||||||
# If you are using UJS then enable automatic nonce generation
|
# # Generate session nonces for permitted importmap and inline scripts
|
||||||
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
||||||
|
# config.content_security_policy_nonce_directives = %w(script-src)
|
||||||
# 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. See:
|
||||||
|
# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
||||||
# Report CSP violations to a specified URI
|
# # config.content_security_policy_report_only = true
|
||||||
# For further information see the following documentation:
|
# end
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
|
||||||
# Rails.application.config.content_security_policy_report_only = true
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Configure sensitive parameters which will be filtered from the log file.
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
Rails.application.config.filter_parameters += %i[
|
Rails.application.config.filter_parameters += [
|
||||||
passw secret token _key crypt salt certificate otp ssn
|
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
||||||
]
|
]
|
||||||
|
|||||||
Vendored
Reference in New Issue
Block a user