-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config file updates for rails 7 upgrade (#1152)
* Apply changes from Rails 7 app:update - Updated configuration files to align with Rails 7 defaults, many are just updating commented examples/instructions or replacing single quotes with double. - Updated Redis caching configuration in development and test environments. - remove sidekiq as queue adapted in env configs - Applied updates to logging, caching, and middleware configurations for improved performance and maintainability. - Updated schema.rb to reflect changes introduced by Rails 7, previously set precision values removed will be added back via migration in next commit * Reapply timestamp precision values precision values were removed via app:update command as per rails 7 update va_facilities and visns tables previously had precision set to 11 which is outside the supported range of 0-6, so reimplementing with the max of 6
- Loading branch information
1 parent
f803891
commit 969f26d
Showing
16 changed files
with
484 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
load File.expand_path("../spring", __FILE__) | ||
rescue LoadError => e | ||
raise unless e.message.include?('spring') | ||
raise unless e.message.include?("spring") | ||
end | ||
APP_PATH = File.expand_path('../config/application', __dir__) | ||
require_relative '../config/boot' | ||
require 'rails/commands' | ||
APP_PATH = File.expand_path("../config/application", __dir__) | ||
require_relative "../config/boot" | ||
require "rails/commands" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
load File.expand_path("../spring", __FILE__) | ||
rescue LoadError => e | ||
raise unless e.message.include?('spring') | ||
raise unless e.message.include?("spring") | ||
end | ||
require_relative '../config/boot' | ||
require 'rake' | ||
require_relative "../config/boot" | ||
require "rake" | ||
Rake.application.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,33 @@ | ||
#!/usr/bin/env ruby | ||
require 'fileutils' | ||
include FileUtils | ||
require "fileutils" | ||
|
||
# path to your application root. | ||
APP_ROOT = File.expand_path('..', __dir__) | ||
APP_ROOT = File.expand_path("..", __dir__) | ||
|
||
def system!(*args) | ||
system(*args) || abort("\n== Command #{args} failed ==") | ||
end | ||
|
||
chdir APP_ROOT do | ||
# This script is a starting point to setup your application. | ||
FileUtils.chdir APP_ROOT do | ||
# This script is a way to set up or update your development environment automatically. | ||
# This script is idempotent, so that you can run it at any time and get an expectable outcome. | ||
# Add necessary setup steps to this file. | ||
|
||
puts '== Installing dependencies ==' | ||
system! 'gem install bundler --conservative' | ||
system('bundle check') || system!('bundle install') | ||
|
||
# Install JavaScript dependencies if using Yarn | ||
# system('bin/yarn') | ||
puts "== Installing dependencies ==" | ||
system! "gem install bundler --conservative" | ||
system("bundle check") || system!("bundle install") | ||
|
||
# puts "\n== Copying sample files ==" | ||
# unless File.exist?('config/database.yml') | ||
# cp 'config/database.yml.sample', 'config/database.yml' | ||
# unless File.exist?("config/database.yml") | ||
# FileUtils.cp "config/database.yml.sample", "config/database.yml" | ||
# end | ||
|
||
puts "\n== Preparing database ==" | ||
system! 'bin/rails db:setup' | ||
system! "bin/rails db:prepare" | ||
|
||
puts "\n== Removing old logs and tempfiles ==" | ||
system! 'bin/rails log:clear tmp:clear' | ||
system! "bin/rails log:clear tmp:clear" | ||
|
||
puts "\n== Restarting application server ==" | ||
system! 'bin/rails restart' | ||
system! "bin/rails restart" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Load the Rails application. | ||
require_relative 'application' | ||
require_relative "application" | ||
|
||
# Initialize the Rails application. | ||
Rails.application.initialize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Define an application-wide content security policy | ||
# For further information see the following documentation | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy | ||
# Define an application-wide content security policy. | ||
# See the Securing Rails Applications Guide for more information: | ||
# https://guides.rubyonrails.org/security.html#content-security-policy-header | ||
|
||
# Rails.application.config.content_security_policy do |policy| | ||
# policy.default_src :self, :https | ||
# policy.font_src :self, :https, :data | ||
# policy.img_src :self, :https, :data | ||
# policy.object_src :none | ||
# policy.script_src :self, :https | ||
# policy.style_src :self, :https | ||
# # If you are using webpack-dev-server then specify webpack-dev-server host | ||
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? | ||
|
||
# # Specify URI for violation reports | ||
# # policy.report_uri "/csp-violation-report-endpoint" | ||
# Rails.application.configure do | ||
# config.content_security_policy do |policy| | ||
# policy.default_src :self, :https | ||
# policy.font_src :self, :https, :data | ||
# policy.img_src :self, :https, :data | ||
# policy.object_src :none | ||
# policy.script_src :self, :https | ||
# policy.style_src :self, :https | ||
# # Specify URI for violation reports | ||
# # policy.report_uri "/csp-violation-report-endpoint" | ||
# end | ||
# | ||
# # Generate session nonces for permitted importmap and inline scripts | ||
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } | ||
# config.content_security_policy_nonce_directives = %w(script-src) | ||
# | ||
# # Report violations without enforcing the policy. | ||
# # config.content_security_policy_report_only = true | ||
# end | ||
|
||
# If you are using UJS then enable automatic nonce generation | ||
# 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 | ||
# For further information see the following documentation: | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only | ||
# Rails.application.config.content_security_policy_report_only = true |
Oops, something went wrong.