From 34aba8e138c5c8f4be4a6a61790663a2cf2c7650 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 2 Aug 2023 19:34:45 -0500 Subject: [PATCH 01/23] APPEALS-26726 Rails updated to 5.2.8.1 --- Gemfile | 2 +- Gemfile.lock | 157 +++++++++++++++++++++++++++------------------------ 2 files changed, 85 insertions(+), 74 deletions(-) diff --git a/Gemfile b/Gemfile index bb48ffa18..5af7178e5 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ gem "omniauth-saml-va", git: "https://github.com/department-of-veterans-affairs/ gem "pg", "~> 0.18", platforms: :ruby gem "puma", "5.6.4" gem "rack-cors", ">= 1.0.4" -gem "rails", "5.2.4.6" +gem "rails", "5.2.8.1" gem "redis-namespace" gem "redis-rails", "~> 5.0.2" gem "redis-semaphore" diff --git a/Gemfile.lock b/Gemfile.lock index 850b7e5d9..e24be7da3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,25 +85,25 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.6) - actionpack (= 5.2.4.6) + actioncable (5.2.8.1) + actionpack (= 5.2.8.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.6) - actionpack (= 5.2.4.6) - actionview (= 5.2.4.6) - activejob (= 5.2.4.6) + actionmailer (5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.6) - actionview (= 5.2.4.6) - activesupport (= 5.2.4.6) + actionpack (5.2.8.1) + actionview (= 5.2.8.1) + activesupport (= 5.2.8.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.6) - activesupport (= 5.2.4.6) + actionview (5.2.8.1) + activesupport (= 5.2.8.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -113,23 +113,23 @@ GEM activemodel (>= 4.1, < 6.2) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (5.2.4.6) - activesupport (= 5.2.4.6) + activejob (5.2.8.1) + activesupport (= 5.2.8.1) globalid (>= 0.3.6) activejob_dj_overrides (0.2.0) delayed_job rails (>= 4.2) - activemodel (5.2.4.6) - activesupport (= 5.2.4.6) - activerecord (5.2.4.6) - activemodel (= 5.2.4.6) - activesupport (= 5.2.4.6) + activemodel (5.2.8.1) + activesupport (= 5.2.8.1) + activerecord (5.2.8.1) + activemodel (= 5.2.8.1) + activesupport (= 5.2.8.1) arel (>= 9.0) - activestorage (5.2.4.6) - actionpack (= 5.2.4.6) - activerecord (= 5.2.4.6) - marcel (~> 0.3.1) - activesupport (5.2.4.6) + activestorage (5.2.8.1) + actionpack (= 5.2.8.1) + activerecord (= 5.2.8.1) + marcel (~> 1.0.0) + activesupport (5.2.8.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -182,13 +182,14 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.2.2) crack (0.4.5) rexml crass (1.0.6) d3-rails (5.9.2) railties (>= 3.1) database_cleaner (1.8.5) + date (3.3.3) delayed_job (4.1.9) activesupport (>= 3.0, < 6.2) diff-lcs (1.4.4) @@ -200,7 +201,7 @@ GEM dotenv-rails (2.7.6) dotenv (= 2.7.6) railties (>= 3.2) - erubi (1.10.0) + erubi (1.12.0) execjs (2.7.0) faraday (1.3.0) faraday-net_http (~> 1.0) @@ -208,8 +209,8 @@ GEM ruby2_keywords faraday-net_http (1.0.0) ffi (1.14.2) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.1.0) + activesupport (>= 5.0) gyoku (1.3.1) builder (>= 2.1.2) hashdiff (1.0.1) @@ -221,7 +222,7 @@ GEM httpi (2.4.5) rack socksify - i18n (1.8.10) + i18n (1.14.1) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) jbuilder (2.10.1) @@ -241,28 +242,27 @@ GEM logstasher (2.1.5) activesupport (>= 5.2) request_store - loofah (2.9.1) + loofah (2.21.3) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) macaddr (1.7.2) systemu (~> 2.6.5) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp makara (0.4.1) activerecord (>= 3.0.0) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.2) method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2020.1104) - mimemagic (0.3.10) - nokogiri (~> 1) - rake mini_magick (4.11.0) - mini_mime (1.1.0) - mini_portile2 (2.8.1) - minitest (5.14.4) + mini_mime (1.1.2) + mini_portile2 (2.8.4) + minitest (5.19.0) moment_timezone-rails (0.5.14) momentjs-rails (~> 2.15.1) momentjs-rails (2.15.1) @@ -273,11 +273,19 @@ GEM ruby2_keywords (~> 0.0.1) neat (4.0.0) thor (~> 0.19) + net-imap (0.3.7) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol newrelic_rpm (6.14.0) - nio4r (2.5.8) - racc (~> 1.4) - nokogiri (1.14.2) - mini_portile2 (~> 2.8.0) + nio4r (2.5.9) + nokogiri (1.15.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) nori (2.6.0) omniauth (1.9.1) @@ -301,41 +309,43 @@ GEM public_suffix (4.0.6) puma (5.6.4) nio4r (~> 2.0) - racc (1.5.2) - rack (2.2.6.2) + racc (1.7.1) + rack (2.2.8) rack-cors (1.1.1) rack (>= 2.0.0) rack-protection (2.2.0) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.4.6) - actioncable (= 5.2.4.6) - actionmailer (= 5.2.4.6) - actionpack (= 5.2.4.6) - actionview (= 5.2.4.6) - activejob (= 5.2.4.6) - activemodel (= 5.2.4.6) - activerecord (= 5.2.4.6) - activestorage (= 5.2.4.6) - activesupport (= 5.2.4.6) + rack-test (2.1.0) + rack (>= 1.3) + rails (5.2.8.1) + actioncable (= 5.2.8.1) + actionmailer (= 5.2.8.1) + actionpack (= 5.2.8.1) + actionview (= 5.2.8.1) + activejob (= 5.2.8.1) + activemodel (= 5.2.8.1) + activerecord (= 5.2.8.1) + activestorage (= 5.2.8.1) + activesupport (= 5.2.8.1) bundler (>= 1.3.0) - railties (= 5.2.4.6) + railties (= 5.2.8.1) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) rails_stdout_logging (0.0.5) - railties (5.2.4.6) - actionpack (= 5.2.4.6) - activesupport (= 5.2.4.6) + railties (5.2.8.1) + actionpack (= 5.2.8.1) + activesupport (= 5.2.8.1) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -451,9 +461,9 @@ GEM sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) systemu (2.6.5) therubyracer (0.12.3) @@ -463,10 +473,11 @@ GEM thread_safe (0.3.6) tilt (2.0.11) timecop (0.9.2) + timeout (0.4.0) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.9) + tzinfo (1.2.11) thread_safe (~> 0.1) tzinfo-data (1.2020.6) tzinfo (>= 1.0.0) @@ -488,7 +499,7 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xmldsig (0.3.2) @@ -544,7 +555,7 @@ DEPENDENCIES pry-byebug puma (= 5.6.4) rack-cors (>= 1.0.4) - rails (= 5.2.4.6) + rails (= 5.2.8.1) rails_stdout_logging rb-readline redis-namespace @@ -579,4 +590,4 @@ DEPENDENCIES zero_downtime_migrations BUNDLED WITH - 1.17.3 + 2.4.17 From 58ca37087de25de48d2a83b0ddff461ce4bfa302 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:07:50 -0500 Subject: [PATCH 02/23] APPEALS-26726 app:update bin/bundle changes --- bin/bundle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/bundle b/bin/bundle index 5015ba6f8..2dbb71769 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,5 +1,5 @@ #!/usr/bin/env ruby # frozen_string_literal: true -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -load Gem.bin_path("bundler", "bundle") +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +load Gem.bin_path('bundler', 'bundle') From de1c8f9ea72f44665225ffd58deb7d24cac961bc Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:09:45 -0500 Subject: [PATCH 03/23] APPEALS-26726 app:update bin/rails changes --- bin/rails | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/rails b/bin/rails index efc037749..073966023 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -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' From 22d55d4084c0375e70277ea2debb89b472344119 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:11:28 -0500 Subject: [PATCH 04/23] APPEALS-26726 app:update bin/rake changes --- bin/rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/rake b/bin/rake index 4fbf10b96..17240489f 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative "../config/boot" -require "rake" +require_relative '../config/boot' +require 'rake' Rake.application.run From 8064410e6210254f3c9b5bfe67acfd58d9d2e219 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:16:38 -0500 Subject: [PATCH 05/23] APPEALS-26726 app:update bin/setup changes --- bin/setup | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 bin/setup diff --git a/bin/setup b/bin/setup new file mode 100755 index 000000000..b2db6e6a2 --- /dev/null +++ b/bin/setup @@ -0,0 +1,36 @@ +#!/usr/bin/env ruby +require 'fileutils' +include FileUtils + +# path to your application root. +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. + # 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 "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end From c08f177ca0fb6f8532cf5c72170faed31a4699ac Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:21:49 -0500 Subject: [PATCH 06/23] APPEALS-26726 app:update bin/update changes --- bin/update | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/bin/update b/bin/update index 74cb785c0..00b5a05c7 100755 --- a/bin/update +++ b/bin/update @@ -1,30 +1,33 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require "pathname" -require "fileutils" +require 'fileutils' +include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path("..", __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -Dir.chdir APP_ROOT do +chdir APP_ROOT do # This script is a way to update your development environment automatically. # Add necessary update steps to this file. - puts "== Installing dependencies ==" - system! "gem install bundler --conservative" - system("bundle check") || system!("bundle install") + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies if using Yarn + system('bin/yarn') puts "\n== Updating database ==" - system! "bin/rails db:migrate" + system! 'bin/rails db:migrate' 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 From f2118eb8cdceecf01d48109427a0e6fea19fbad4 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:23:21 -0500 Subject: [PATCH 07/23] APPEALS-26726 app:update bin/yarn changes --- bin/yarn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/yarn b/bin/yarn index 00a359e3e..460dd565b 100755 --- a/bin/yarn +++ b/bin/yarn @@ -1,11 +1,11 @@ #!/usr/bin/env ruby -VENDOR_PATH = File.expand_path("..", __dir__) -Dir.chdir(VENDOR_PATH) do +APP_ROOT = File.expand_path('..', __dir__) +Dir.chdir(APP_ROOT) do begin - exec "yarnpkg #{ARGV.join(' ')}" + exec "yarnpkg", *ARGV rescue Errno::ENOENT - warn "Yarn executable was not detected in the system." - warn "Download Yarn at https://yarnpkg.com/en/docs/install" + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 end end From 4dfb73a1259aa427f1f4b932d82fe87fa7f14908 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 13:25:45 -0500 Subject: [PATCH 08/23] APPEALS-26726 app:update config/boot.rb changes --- config/boot.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/boot.rb b/config/boot.rb index 30f5120df..b9e460cef 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. +require 'bootsnap/setup' # Speed up boot time by caching expensive operations. From dd9c8427a850d8d54e4a9b7e987ac38f216a15f8 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 20:58:46 -0500 Subject: [PATCH 09/23] APPEALS-26726 bin/update recomment system(bin/yarn) --- bin/update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update b/bin/update index 00b5a05c7..313c74b38 100755 --- a/bin/update +++ b/bin/update @@ -20,7 +20,7 @@ chdir APP_ROOT do system('bundle check') || system!('bundle install') # Install JavaScript dependencies if using Yarn - system('bin/yarn') + # system('bin/yarn') puts "\n== Updating database ==" system! 'bin/rails db:migrate' From f4d00c760ddd57d1e7d549a7924f943f578ddc93 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 21:17:55 -0500 Subject: [PATCH 10/23] APPEALS-26726 app:update config/cable.yml changes --- config/cable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cable.yml b/config/cable.yml index 91016d2dd..406d88c91 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -6,5 +6,5 @@ test: production: adapter: redis - url: redis://localhost:6379/1 + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> channel_prefix: caseflow_efolder_production From ee89d761c16a5c2e0b17a8d1d974b79de27e486e Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 21:20:10 -0500 Subject: [PATCH 11/23] APPEALS-26726 app:update config/storage.yml changes --- config/storage.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 config/storage.yml diff --git a/config/storage.yml b/config/storage.yml new file mode 100644 index 000000000..d32f76e8f --- /dev/null +++ b/config/storage.yml @@ -0,0 +1,34 @@ +test: + service: Disk + root: <%= Rails.root.join("tmp/storage") %> + +local: + service: Disk + root: <%= Rails.root.join("storage") %> + +# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) +# amazon: +# service: S3 +# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> +# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> +# region: us-east-1 +# bucket: your_own_bucket + +# Remember not to checkin your GCS keyfile to a repository +# google: +# service: GCS +# project: your_project +# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> +# bucket: your_own_bucket + +# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) +# microsoft: +# service: AzureStorage +# storage_account_name: your_account_name +# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> +# container: your_container_name + +# mirror: +# service: Mirror +# primary: local +# mirrors: [ amazon, google, microsoft ] From 296a86222dc7e81f9f5b8ee7736b1af5e520dd90 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 21:22:37 -0500 Subject: [PATCH 12/23] APPEALS-26726 app:update config/initializers/content_security_policy.rb changes --- .../initializers/content_security_policy.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/initializers/content_security_policy.rb diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb new file mode 100644 index 000000000..d3bcaa5ec --- /dev/null +++ b/config/initializers/content_security_policy.rb @@ -0,0 +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 + +# 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 + +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end + +# If you are using UJS then enable automatic nonce generation +# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } + +# 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 From b7a13a287349137c6a3bd1e9acc766fdd464460d Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 23:44:53 -0500 Subject: [PATCH 13/23] APPEALS-26726 app:update config/locales/en.yml changes --- config/locales/en.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 36b71369e..decc5a857 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -26,7 +26,6 @@ # en: # 'true': 'foo' # - # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. From 92e7f19ae44ff8e34f9372b899c9e696f6afb8e5 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 23:48:34 -0500 Subject: [PATCH 14/23] APPEALS-26726 app:update config/initializers/assets.rb changes --- config/initializers/assets.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 56555eaa7..6b3aaf985 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -3,14 +3,15 @@ # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' -# Add additional assets to the asset load path +# Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules folder to the asset load path. Rails.application.config.assets.paths << Rails.root.join('node_modules') # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets +# application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w( react-app.js stats.js ) Rails.application.config.assets.precompile += %w( favicon.ico ) Rails.application.config.assets.precompile += %w( *.woff *.woff2 *.eot *.ttf ) From 00d4cf4b0f0340ba42f9d1dbcdb4bf89942315a2 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Wed, 9 Aug 2023 23:52:28 -0500 Subject: [PATCH 15/23] APPEALS-26726 app:update config/puma.rb changes --- config/puma.rb | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/config/puma.rb b/config/puma.rb index 1e19380dc..b2102072b 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -15,6 +15,9 @@ # environment ENV.fetch("RAILS_ENV") { "development" } +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + # Specifies the number of `workers` to boot in clustered mode. # Workers are forked webserver processes. If using threads and workers together # the concurrency of the application would be max `threads` * `workers`. @@ -26,31 +29,9 @@ # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code # before forking the application. This takes advantage of Copy On Write -# process behavior so workers use less memory. If you use this option -# you need to make sure to reconnect any threads in the `on_worker_boot` -# block. +# process behavior so workers use less memory. # # preload_app! -# If you are preloading your application and using Active Record, it's -# recommended that you close any connections to the database before workers -# are forked to prevent connection leakage. -# -# before_fork do -# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) -# end - -# The code in the `on_worker_boot` will be called if you are using -# clustered mode by specifying a number of `workers`. After each worker -# process is booted, this block will be run. If you are using the `preload_app!` -# option, you will want to use this block to reconnect to any threads -# or connections that may have been created at application boot, as Ruby -# cannot share connections between processes. -# -# on_worker_boot do -# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) -# end -# - # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart From eaa7abfb42666957823949bbd49dec0b92ed47dc Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Thu, 10 Aug 2023 04:33:45 -0500 Subject: [PATCH 16/23] APPEALS-26726 app:update config/environments/development.rb changes --- config/environments/development.rb | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 34e2e4656..3f6d1274c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -13,16 +13,23 @@ config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. - if Rails.root.join('tmp/caching-dev.txt').exist? + # Run rails dev:cache to toggle caching. + if Rails.root.join('tmp', 'caching-dev.txt').exist? config.action_controller.perform_caching = true + config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" + '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 @@ -34,6 +41,9 @@ # 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. @@ -42,6 +52,18 @@ # Suppress logger output for asset requests. config.assets.quiet = true + # 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 + + +#========================================================================================= +# eFolder - Custom Config Settings +# Keep all efolder specific config settings below for clean diff's when upgrading rails +#========================================================================================= config.vva_wsdl = "https://vbaphid521ldb.vba.va.gov:7002/VABFI/services/vva?wsdl" config.s3_enabled = true @@ -54,8 +76,4 @@ config.sqs_create_queues = true config.sqs_endpoint = 'http://localhost:4566' - - # 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 From bc18bfcba4f2c21c9e2efe030998c9cddaa87593 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Thu, 10 Aug 2023 05:25:41 -0500 Subject: [PATCH 17/23] APPEALS-26726 app:update config/environments/production.rb changes --- config/environments/production.rb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index a32d0ab61..59c5e36b4 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -14,10 +14,9 @@ config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Attempt to read encrypted secrets from `config/secrets.yml.enc`. - # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or - # `config/secrets.yml.key`. - # config.read_encrypted_secrets = true + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. @@ -39,6 +38,9 @@ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # 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) + config.active_storage.service = :local + # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' @@ -53,7 +55,7 @@ config.log_level = :debug # Prepend all log lines with the following tags. - config.log_tags = [ :subdomain, :uuid ] + config.log_tags = [ :request_id ] # Use a different cache store in production. # config.cache_store = :mem_cache_store @@ -61,6 +63,7 @@ # 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 = "caseflow_efolder_#{Rails.env}" + config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. @@ -84,12 +87,17 @@ if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) + config.logger = ActiveSupport::TaggedLogging.new(logger) end # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + +#========================================================================================= +# eFolder - Custom Config Settings +# Keep all efolder specific config settings below for clean diff's when upgrading rails +#========================================================================================= config.vva_wsdl = ENV["VVA_WSDL"] config.s3_enabled = true From 70798e41e18fd86b5c60e12799f3c09eac305635 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Thu, 10 Aug 2023 05:30:35 -0500 Subject: [PATCH 18/23] APPEALS-26726 app:update config/environments/test.rb changes --- config/environments/test.rb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index d00523b91..e4170a107 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -15,7 +15,7 @@ # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. @@ -27,6 +27,10 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false + + # Store uploaded files on the local file system in a temporary directory + config.active_storage.service = :test + config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. @@ -37,10 +41,15 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + +#========================================================================================= +# eFolder - Custom Config Settings +# Keep all efolder specific config settings below for clean diff's when upgrading rails +#========================================================================================= config.s3_enabled = false config.api_key = "token" - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true end From ac3cd0b6754882a379737f4988ba178a1b8c5088 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Thu, 10 Aug 2023 07:51:46 -0500 Subject: [PATCH 19/23] APPEALS-26726 app:update config/application.rb changes --- config/application.rb | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/config/application.rb b/config/application.rb index 5447618db..613d4d33a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,5 @@ require_relative 'boot' + require 'rails/all' # Require the gems listed in Gemfile, including any gems @@ -7,16 +8,33 @@ module CaseflowEfolder class Application < Rails::Application - # Initialize configuration defaults for originally generated Rails version. - # config.load_defaults 5.1 - + # config.load_defaults 5.0 + # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. + # Application configuration can go into files in config/initializers + # -- all .rb files in that directory are automatically loaded after loading + # the framework and any gems in your application. + + #======================================================================================= + # Rails 5.0 default overrides + #--------------------------------------------------------------------------------------- - config.download_filepath = Rails.root + "tmp/files" + #======================================================================================= + # Rails 5.1 default overrides + #--------------------------------------------------------------------------------------- + + + #======================================================================================= + # Rails 5.2 default overrides + #--------------------------------------------------------------------------------------- + + + #======================================================================================= + # eFolder Specific configs + #--------------------------------------------------------------------------------------- + config.download_filepath = Rails.root + "tmp/files" config.autoload_paths += Dir[Rails.root + 'app/jobs'] config.autoload_paths << Rails.root.join('lib') From e8e368b8a25a3de7656f3c676b86e74e6a8cc640 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Thu, 10 Aug 2023 12:09:17 -0500 Subject: [PATCH 20/23] APPEALS-26726 cleaned up and updated new_framework_defaulsts for 5.0-5.2 --- Gemfile | 1 + Gemfile.lock | 4 ++ config/application.rb | 48 ++++++++++++++++++- config/initializers/new_framework_defaults.rb | 20 -------- .../new_framework_defaults_5_1.rb | 14 ------ 5 files changed, 52 insertions(+), 35 deletions(-) delete mode 100644 config/initializers/new_framework_defaults.rb delete mode 100644 config/initializers/new_framework_defaults_5_1.rb diff --git a/Gemfile b/Gemfile index 5af7178e5..1cdf8e9a0 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ gem "active_model_serializers" gem "activejob_dj_overrides" gem "aws-sdk", "~> 2" gem "bgs", git: "https://github.com/department-of-veterans-affairs/ruby-bgs.git", ref: "98547485d863f2f0d3bb9a1b9ec92a8fe21ba306" +gem "bootsnap", require: false gem "caseflow", git: "https://github.com/department-of-veterans-affairs/caseflow-commons", ref: "fb6fa9658825c143eb8d202b87128f34ca7e210b" gem "coffee-rails", "> 4.1.0" gem "connect_vbms", git: "https://github.com/department-of-veterans-affairs/connect_vbms.git", ref: "ac1ae63ffb04a2ab4d2d5469262981acab162e94" diff --git a/Gemfile.lock b/Gemfile.lock index e24be7da3..5133f3918 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -151,6 +151,8 @@ GEM aws-sdk-core (= 2.11.632) aws-sigv4 (1.2.2) aws-eventstream (~> 1, >= 1.0.2) + bootsnap (1.16.0) + msgpack (~> 1.2) bourbon (4.2.7) sass (~> 3.4) thor (~> 0.19) @@ -267,6 +269,7 @@ GEM momentjs-rails (~> 2.15.1) momentjs-rails (2.15.1) railties (>= 3.1) + msgpack (1.7.2) multi_xml (0.6.0) multipart-post (2.3.0) mustermann (1.1.2) @@ -525,6 +528,7 @@ DEPENDENCIES activejob_dj_overrides aws-sdk (~> 2) bgs! + bootsnap brakeman bundler-audit byebug diff --git a/config/application.rb b/config/application.rb index 613d4d33a..7465bf641 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,7 +9,7 @@ module CaseflowEfolder class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - # config.load_defaults 5.0 + config.load_defaults 5.2 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers @@ -19,17 +19,63 @@ class Application < Rails::Application #======================================================================================= # Rails 5.0 default overrides #--------------------------------------------------------------------------------------- + + # Enable per-form CSRF tokens. Previous versions had false. + # Deafault as of 5.0: true + Rails.application.config.action_controller.per_form_csrf_tokens = false + + # Enable origin-checking CSRF mitigation. Previous versions had false. + # Default as of 5.0: true + Rails.application.config.action_controller.forgery_protection_origin_check = false + + # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. + # Previous versions had false. + # Default as of 5.0: true + ActiveSupport.to_time_preserves_timezone = false + + # Require `belongs_to` associations by default. Previous versions had false. + # Default as of 5.0: true + Rails.application.config.active_record.belongs_to_required_by_default = false #======================================================================================= # Rails 5.1 default overrides #--------------------------------------------------------------------------------------- + + # Make `form_with` generate non-remote forms. + # Default as of 5.1: true + Rails.application.config.action_view.form_with_generates_remote_forms = false #======================================================================================= # Rails 5.2 default overrides #--------------------------------------------------------------------------------------- + # Use AES-256-GCM authenticated encryption for encrypted cookies. + # Also, embed cookie expiry in signed or encrypted cookies for increased security. + # + # This option is not backwards compatible with earlier Rails versions. + # It's best enabled when your entire app is migrated and stable on 5.2. + # + # Existing cookies will be converted on read then written with the new scheme. + # Default as of 5.2: true + Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = false + + # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages + # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true. + # Default as of 5.2: true + Rails.application.config.active_support.use_authenticated_message_encryption = false + + # Add default protection from forgery to ActionController::Base instead of in + # ApplicationController. + # Default as of 5.2: true + Rails.application.config.action_controller.default_protect_from_forgery = false + + # Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and + # 'f' after migrating old data. + # Default as of 5.2: true + Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = false + #======================================================================================= # eFolder Specific configs diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb deleted file mode 100644 index a2bfed300..000000000 --- a/config/initializers/new_framework_defaults.rb +++ /dev/null @@ -1,20 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains migration options to ease your Rails 5.0 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. - -# Enable per-form CSRF tokens. Previous versions had false. -Rails.application.config.action_controller.per_form_csrf_tokens = false - -# Enable origin-checking CSRF mitigation. Previous versions had false. -Rails.application.config.action_controller.forgery_protection_origin_check = false - -# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. -# Previous versions had false. -ActiveSupport.to_time_preserves_timezone = false - -# Require `belongs_to` associations by default. Previous versions had false. -Rails.application.config.active_record.belongs_to_required_by_default = false diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb deleted file mode 100644 index 9010abd5c..000000000 --- a/config/initializers/new_framework_defaults_5_1.rb +++ /dev/null @@ -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 From 3664a3d7b702b2374d3e2df836dffed21e575896 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Tue, 15 Aug 2023 11:14:57 -0500 Subject: [PATCH 21/23] APPEALS-26726 pr corrections --- .rubocop.yml | 1 + config/cable.yml | 2 +- config/environments/demo.rb | 2 +- config/environments/development.rb | 4 +- config/environments/production.rb | 2 +- .../new_framework_defaults_5_2.rb | 38 +++++++++++++++++++ config/puma.rb | 2 +- 7 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 config/initializers/new_framework_defaults_5_2.rb diff --git a/.rubocop.yml b/.rubocop.yml index 9e014f0d3..65fb2ef47 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,6 +6,7 @@ AllCops: - '**/Rakefile' - '**/*.rake' Exclude: + - 'bin/**/*' - 'db/**/*' - 'config/**/*' - 'script/**/*' diff --git a/config/cable.yml b/config/cable.yml index 406d88c91..91016d2dd 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -6,5 +6,5 @@ test: production: adapter: redis - url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + url: redis://localhost:6379/1 channel_prefix: caseflow_efolder_production diff --git a/config/environments/demo.rb b/config/environments/demo.rb index a87b06c45..3e28bc881 100644 --- a/config/environments/demo.rb +++ b/config/environments/demo.rb @@ -22,7 +22,7 @@ # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier diff --git a/config/environments/development.rb b/config/environments/development.rb index 3f6d1274c..805361a92 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -16,15 +16,13 @@ # Run rails dev:cache to toggle caching. if Rails.root.join('tmp', 'caching-dev.txt').exist? config.action_controller.perform_caching = 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) diff --git a/config/environments/production.rb b/config/environments/production.rb index 59c5e36b4..1f8fd447c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -55,7 +55,7 @@ config.log_level = :debug # Prepend all log lines with the following tags. - config.log_tags = [ :request_id ] + config.log_tags = [ :subdomain, :uuid ] # Use a different cache store in production. # config.cache_store = :mem_cache_store diff --git a/config/initializers/new_framework_defaults_5_2.rb b/config/initializers/new_framework_defaults_5_2.rb new file mode 100644 index 000000000..c383d072b --- /dev/null +++ b/config/initializers/new_framework_defaults_5_2.rb @@ -0,0 +1,38 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.2 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 Active Record use stable #cache_key alongside new #cache_version method. +# This is needed for recyclable cache keys. +# Rails.application.config.active_record.cache_versioning = true + +# Use AES-256-GCM authenticated encryption for encrypted cookies. +# Also, embed cookie expiry in signed or encrypted cookies for increased security. +# +# This option is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 5.2. +# +# Existing cookies will be converted on read then written with the new scheme. +# Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true + +# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages +# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true. +# Rails.application.config.active_support.use_authenticated_message_encryption = true + +# Add default protection from forgery to ActionController::Base instead of in +# ApplicationController. +# Rails.application.config.action_controller.default_protect_from_forgery = true + +# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and +# 'f' after migrating old data. +# Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true + +# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header. +# Rails.application.config.active_support.use_sha1_digests = true + +# Make `form_with` generate id attributes for any generated HTML tags. +# Rails.application.config.action_view.form_with_generates_ids = true diff --git a/config/puma.rb b/config/puma.rb index b2102072b..989b288d2 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -16,7 +16,7 @@ environment ENV.fetch("RAILS_ENV") { "development" } # Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } +pidfile ENV.fetch("PIDFILE") { "tmp/pids/puma.pid" } # Specifies the number of `workers` to boot in clustered mode. # Workers are forked webserver processes. If using threads and workers together From a284650c2f99d380b03aa5356b7ec5bd2ae62284 Mon Sep 17 00:00:00 2001 From: Alec Kagebein Date: Tue, 15 Aug 2023 14:28:58 -0500 Subject: [PATCH 22/23] APPEALS-26726 new_framework_defaults_5_2 removal --- .../new_framework_defaults_5_2.rb | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 config/initializers/new_framework_defaults_5_2.rb diff --git a/config/initializers/new_framework_defaults_5_2.rb b/config/initializers/new_framework_defaults_5_2.rb deleted file mode 100644 index c383d072b..000000000 --- a/config/initializers/new_framework_defaults_5_2.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains migration options to ease your Rails 5.2 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 Active Record use stable #cache_key alongside new #cache_version method. -# This is needed for recyclable cache keys. -# Rails.application.config.active_record.cache_versioning = true - -# Use AES-256-GCM authenticated encryption for encrypted cookies. -# Also, embed cookie expiry in signed or encrypted cookies for increased security. -# -# This option is not backwards compatible with earlier Rails versions. -# It's best enabled when your entire app is migrated and stable on 5.2. -# -# Existing cookies will be converted on read then written with the new scheme. -# Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true - -# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages -# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true. -# Rails.application.config.active_support.use_authenticated_message_encryption = true - -# Add default protection from forgery to ActionController::Base instead of in -# ApplicationController. -# Rails.application.config.action_controller.default_protect_from_forgery = true - -# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and -# 'f' after migrating old data. -# Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true - -# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header. -# Rails.application.config.active_support.use_sha1_digests = true - -# Make `form_with` generate id attributes for any generated HTML tags. -# Rails.application.config.action_view.form_with_generates_ids = true From 7483a9090a067910dd7b4067367da7ee3f844917 Mon Sep 17 00:00:00 2001 From: Jeremy Croteau Date: Thu, 12 Oct 2023 18:47:00 -0400 Subject: [PATCH 23/23] =?UTF-8?q?=E2=AC=87=EF=B8=8F=20Downgrade=20Bundler?= =?UTF-8?q?=20back=20to=201.17.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version of Bundler installed with RubyGems during the build process was not forwards compatible with 2.4.17, so lets change this back to 1.17.3 for now --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 182fab52a..8125011d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -594,4 +594,4 @@ DEPENDENCIES zero_downtime_migrations BUNDLED WITH - 2.4.17 + 1.17.3