Skip to content

Commit a135606

Browse files
app-rails: Update template-application-rails to version 0.4.1.post39.dev0+91f9597
1 parent d04ec9b commit a135606

18 files changed

Lines changed: 866 additions & 358 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.4.1-37-g9f559ac
2+
_commit: v0.4.1-39-g91f9597
33
_src_path: https://github.com/navapbc/template-application-rails
44
app_local_port: 3100
55
app_name: app-rails

app-rails/Gemfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source "https://rubygems.org"
55
ruby "3.4.9"
66

77
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
8-
gem "rails", "~> 7.2.0", ">= 7.2.2.1"
8+
gem "rails", "~> 8.0.5", ">= 8.0.5"
99

1010
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
1111
gem "sprockets-rails"
@@ -103,13 +103,7 @@ group :development do
103103
gem "letter_opener"
104104

105105
# Use console on exceptions pages [https://github.com/rails/web-console]
106-
#
107-
# 4.3.0 dropped support for Rails 7
108-
# https://github.com/rails/web-console/commit/6bc7159fa73b4b186cab95284ba9063c6eef0b23
109-
#
110-
# TODO(https://github.com/navapbc/template-application-rails/issues/71):
111-
# remove version constraint when updating to Rails 8+
112-
gem "web-console", "< 4.3.0"
106+
gem "web-console"
113107

114108
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
115109
# gem "rack-mini-profiler"

app-rails/Gemfile.lock

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,46 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.3)
5-
actionpack (= 7.2.3)
6-
activesupport (= 7.2.3)
4+
actioncable (8.0.5)
5+
actionpack (= 8.0.5)
6+
activesupport (= 8.0.5)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.3)
11-
actionpack (= 7.2.3)
12-
activejob (= 7.2.3)
13-
activerecord (= 7.2.3)
14-
activestorage (= 7.2.3)
15-
activesupport (= 7.2.3)
10+
actionmailbox (8.0.5)
11+
actionpack (= 8.0.5)
12+
activejob (= 8.0.5)
13+
activerecord (= 8.0.5)
14+
activestorage (= 8.0.5)
15+
activesupport (= 8.0.5)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.3)
18-
actionpack (= 7.2.3)
19-
actionview (= 7.2.3)
20-
activejob (= 7.2.3)
21-
activesupport (= 7.2.3)
17+
actionmailer (8.0.5)
18+
actionpack (= 8.0.5)
19+
actionview (= 8.0.5)
20+
activejob (= 8.0.5)
21+
activesupport (= 8.0.5)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.3)
25-
actionview (= 7.2.3)
26-
activesupport (= 7.2.3)
27-
cgi
24+
actionpack (8.0.5)
25+
actionview (= 8.0.5)
26+
activesupport (= 8.0.5)
2827
nokogiri (>= 1.8.5)
29-
racc
30-
rack (>= 2.2.4, < 3.3)
28+
rack (>= 2.2.4)
3129
rack-session (>= 1.0.1)
3230
rack-test (>= 0.6.3)
3331
rails-dom-testing (~> 2.2)
3432
rails-html-sanitizer (~> 1.6)
3533
useragent (~> 0.16)
36-
actiontext (7.2.3)
37-
actionpack (= 7.2.3)
38-
activerecord (= 7.2.3)
39-
activestorage (= 7.2.3)
40-
activesupport (= 7.2.3)
34+
actiontext (8.0.5)
35+
actionpack (= 8.0.5)
36+
activerecord (= 8.0.5)
37+
activestorage (= 8.0.5)
38+
activesupport (= 8.0.5)
4139
globalid (>= 0.6.0)
4240
nokogiri (>= 1.8.5)
43-
actionview (7.2.3)
44-
activesupport (= 7.2.3)
41+
actionview (8.0.5)
42+
activesupport (= 8.0.5)
4543
builder (~> 3.1)
46-
cgi
4744
erubi (~> 1.11)
4845
rails-dom-testing (~> 2.2)
4946
rails-html-sanitizer (~> 1.6)
@@ -53,22 +50,22 @@ GEM
5350
activestorage (>= 6.1.4)
5451
activesupport (>= 6.1.4)
5552
marcel (>= 1.0.3)
56-
activejob (7.2.3)
57-
activesupport (= 7.2.3)
53+
activejob (8.0.5)
54+
activesupport (= 8.0.5)
5855
globalid (>= 0.3.6)
59-
activemodel (7.2.3)
60-
activesupport (= 7.2.3)
61-
activerecord (7.2.3)
62-
activemodel (= 7.2.3)
63-
activesupport (= 7.2.3)
56+
activemodel (8.0.5)
57+
activesupport (= 8.0.5)
58+
activerecord (8.0.5)
59+
activemodel (= 8.0.5)
60+
activesupport (= 8.0.5)
6461
timeout (>= 0.4.0)
65-
activestorage (7.2.3)
66-
actionpack (= 7.2.3)
67-
activejob (= 7.2.3)
68-
activerecord (= 7.2.3)
69-
activesupport (= 7.2.3)
62+
activestorage (8.0.5)
63+
actionpack (= 8.0.5)
64+
activejob (= 8.0.5)
65+
activerecord (= 8.0.5)
66+
activesupport (= 8.0.5)
7067
marcel (~> 1.0)
71-
activesupport (7.2.3)
68+
activesupport (8.0.5)
7269
base64
7370
benchmark (>= 0.3)
7471
bigdecimal
@@ -80,6 +77,7 @@ GEM
8077
minitest (>= 5.1)
8178
securerandom (>= 0.3)
8279
tzinfo (~> 2.0, >= 2.0.5)
80+
uri (>= 0.13.1)
8381
addressable (2.8.8)
8482
public_suffix (>= 2.0.2, < 8.0)
8583
ast (2.4.3)
@@ -128,7 +126,6 @@ GEM
128126
rack-test (>= 0.6.3)
129127
regexp_parser (>= 1.5, < 3.0)
130128
xpath (~> 3.2)
131-
cgi (0.5.1)
132129
childprocess (5.1.0)
133130
logger (~> 1.5)
134131
choice (0.2.0)
@@ -249,7 +246,8 @@ GEM
249246
yard (~> 0.9)
250247
zeitwerk (~> 2.5)
251248
lumberjack (1.3.2)
252-
mail (2.8.1)
249+
mail (2.9.0)
250+
logger
253251
mini_mime (>= 0.1.1)
254252
net-imap
255253
net-pop
@@ -266,7 +264,7 @@ GEM
266264
nenv (0.3.0)
267265
net-http (0.8.0)
268266
uri (>= 0.11.1)
269-
net-imap (0.5.12)
267+
net-imap (0.6.3)
270268
date
271269
net-protocol
272270
net-pop (0.1.2)
@@ -343,20 +341,20 @@ GEM
343341
rack (>= 1.3)
344342
rackup (2.3.1)
345343
rack (>= 3)
346-
rails (7.2.3)
347-
actioncable (= 7.2.3)
348-
actionmailbox (= 7.2.3)
349-
actionmailer (= 7.2.3)
350-
actionpack (= 7.2.3)
351-
actiontext (= 7.2.3)
352-
actionview (= 7.2.3)
353-
activejob (= 7.2.3)
354-
activemodel (= 7.2.3)
355-
activerecord (= 7.2.3)
356-
activestorage (= 7.2.3)
357-
activesupport (= 7.2.3)
344+
rails (8.0.5)
345+
actioncable (= 8.0.5)
346+
actionmailbox (= 8.0.5)
347+
actionmailer (= 8.0.5)
348+
actionpack (= 8.0.5)
349+
actiontext (= 8.0.5)
350+
actionview (= 8.0.5)
351+
activejob (= 8.0.5)
352+
activemodel (= 8.0.5)
353+
activerecord (= 8.0.5)
354+
activestorage (= 8.0.5)
355+
activesupport (= 8.0.5)
358356
bundler (>= 1.15.0)
359-
railties (= 7.2.3)
357+
railties (= 8.0.5)
360358
rails-dom-testing (2.3.0)
361359
activesupport (>= 5.0.0)
362360
minitest
@@ -369,10 +367,9 @@ GEM
369367
rails-html-sanitizer (1.7.0)
370368
loofah (~> 2.25)
371369
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
372-
railties (7.2.3)
373-
actionpack (= 7.2.3)
374-
activesupport (= 7.2.3)
375-
cgi
370+
railties (8.0.5)
371+
actionpack (= 8.0.5)
372+
activesupport (= 8.0.5)
376373
irb (~> 1.13)
377374
rackup (>= 1.0.0)
378375
rake (>= 12.2)
@@ -566,7 +563,7 @@ DEPENDENCIES
566563
puma (>= 5.0)
567564
pundit
568565
pundit-matchers
569-
rails (~> 7.2.0, >= 7.2.2.1)
566+
rails (~> 8.0.5, >= 8.0.5)
570567
rails-erd
571568
route_translator
572569
rqrcode
@@ -580,7 +577,7 @@ DEPENDENCIES
580577
stimulus-rails
581578
turbo-rails (>= 2.0)
582579
tzinfo-data
583-
web-console (< 4.3.0)
580+
web-console
584581

585582
RUBY VERSION
586583
ruby 3.4.9p82

app-rails/app/helpers/application_helper.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# frozen_string_literal: true
22

33
module ApplicationHelper
4-
def us_form_with(model: nil, scope: nil, url: nil, format: nil, **options, &block)
4+
def us_form_with(model: false, scope: nil, url: nil, format: nil, **options, &block)
55
options[:builder] = UswdsFormBuilder
6-
form_with model: model, scope: scope, url: url, format: format, **options, &block
6+
7+
# Build arguments hash, excluding model if it's nil
8+
form_args = { scope: scope, url: url, format: format, **options }
9+
form_args[:model] = model if model
10+
11+
form_with(**form_args, &block)
712
end
813

914
def local_time(time, format: nil, timezone: "America/Chicago")

app-rails/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Application < Rails::Application
1919
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**", "*.{rb,yml}")]
2020

2121
# Initialize configuration defaults for originally generated Rails version.
22-
config.load_defaults 7.2
22+
config.load_defaults 8.0
2323

2424
# Fetch authentication flow; default to cognito
2525
Rails.application.config.auth_adapter = ENV.fetch("AUTH_ADAPTER", "cognito")

app-rails/config/environments/development.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
Rails.application.configure do
99
# Settings specified here will take precedence over those in config/application.rb.
1010

11-
# In the development environment your application's code is reloaded any time
12-
# it changes. This slows down response time but is perfect for development
13-
# since you don't have to restart the web server when you make code changes.
11+
# Make code changes take effect immediately without server restart.
1412
config.enable_reloading = true
1513

1614
# Do not eager load code on boot.
@@ -22,8 +20,8 @@
2220
# Enable server timing.
2321
config.server_timing = true
2422

25-
# Enable/disable caching. By default caching is disabled.
26-
# Run rails dev:cache to toggle caching.
23+
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
24+
# Run rails dev:cache to toggle Action Controller caching.
2725
if Rails.root.join("tmp/caching-dev.txt").exist?
2826
config.action_controller.perform_caching = true
2927
config.action_controller.enable_fragment_cache_logging = true
@@ -45,8 +43,7 @@
4543
# Don't care if the mailer can't send.
4644
config.action_mailer.raise_delivery_errors = false
4745

48-
# Disable caching for Action Mailer templates even if Action Controller
49-
# caching is enabled.
46+
# Make template changes take effect immediately.
5047
config.action_mailer.perform_caching = false
5148

5249
config.action_mailer.default_url_options = { host: "localhost", port: 3100 }
@@ -66,6 +63,9 @@
6663
# Highlight code that triggered database queries in logs.
6764
config.active_record.verbose_query_logs = true
6865

66+
# Append comments with runtime information tags to SQL queries in logs.
67+
# config.active_record.query_log_tags_enabled = true
68+
6969
# Highlight code that enqueued background job in logs.
7070
config.active_job.verbose_enqueue_logs = true
7171

app-rails/config/environments/production.rb

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
# Code is not reloaded between requests.
1212
config.enable_reloading = false
1313

14-
# Eager load code on boot. This eager loads most of Rails and
15-
# your application in memory, allowing both threaded web servers
16-
# and those relying on copy on write to perform better.
17-
# Rake tasks automatically ignore this option for performance.
14+
# Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
1815
config.eager_load = true
1916

20-
# Full error reports are disabled and caching is turned on.
17+
# Full error reports are disabled.
2118
config.consider_all_requests_local = false
19+
20+
# Turn on fragment caching in view templates.
2221
config.action_controller.perform_caching = true
2322

2423
# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
@@ -70,13 +69,20 @@
7069

7170
# Prepend all log lines with the following tags.
7271
config.log_tags = [ :request_id ]
72+
# config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
7373

7474
# "info" includes generic and useful information about system operation, but avoids logging too much
7575
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
7676
# want to log everything, set the level to "debug".
7777
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
7878

79-
# Use a different cache store in production.
79+
# Prevent health checks from clogging up the logs.
80+
# config.silence_healthcheck_path = "/health"
81+
82+
# Don't log any deprecations.
83+
config.active_support.report_deprecations = false
84+
85+
# Replace the default in-process memory cache store with a durable alternative.
8086
# config.cache_store = :mem_cache_store
8187

8288
# Use a real queuing backend for Active Job (and separate queues per environment).
@@ -93,13 +99,22 @@
9399
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
94100
# config.action_mailer.raise_delivery_errors = false
95101

102+
# Set host to be used by links generated in mailer templates.
103+
# config.action_mailer.default_url_options = { host: "example.com" }
104+
105+
# Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
106+
# config.action_mailer.smtp_settings = {
107+
# user_name: Rails.application.credentials.dig(:smtp, :user_name),
108+
# password: Rails.application.credentials.dig(:smtp, :password),
109+
# address: "smtp.example.com",
110+
# port: 587,
111+
# authentication: :plain
112+
# }
113+
96114
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
97115
# the I18n.default_locale when a translation cannot be found).
98116
config.i18n.fallbacks = true
99117

100-
# Don't log any deprecations.
101-
config.active_support.report_deprecations = false
102-
103118
# Do not dump schema after migrations.
104119
config.active_record.dump_schema_after_migration = false
105120

app-rails/config/initializers/filter_parameter_logging.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# Use this to limit dissemination of sensitive information.
77
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
88
Rails.application.config.filter_parameters += [
9-
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
9+
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
1010
]

0 commit comments

Comments
 (0)