Skip to content

Commit 6bfa5f7

Browse files
authored
Merge pull request #748 from lcreid/rails-8.0
Upgrade demo app to 8.0.1
2 parents 72f5604 + dade321 commit 6bfa5f7

20 files changed

+751
-221
lines changed

demo/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "https://rubygems.org"
22

33
gem "bootstrap_form", path: ".."
44

5-
gem "rails", "~> 7.2.1"
5+
gem "rails", "~> 8.0.0"
66

77
gem "bootsnap", require: false
88
gem "cssbundling-rails"

demo/Gemfile.lock

+57-56
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,65 @@ PATH
88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
actioncable (7.2.2.1)
12-
actionpack (= 7.2.2.1)
13-
activesupport (= 7.2.2.1)
11+
actioncable (8.0.2)
12+
actionpack (= 8.0.2)
13+
activesupport (= 8.0.2)
1414
nio4r (~> 2.0)
1515
websocket-driver (>= 0.6.1)
1616
zeitwerk (~> 2.6)
17-
actionmailbox (7.2.2.1)
18-
actionpack (= 7.2.2.1)
19-
activejob (= 7.2.2.1)
20-
activerecord (= 7.2.2.1)
21-
activestorage (= 7.2.2.1)
22-
activesupport (= 7.2.2.1)
17+
actionmailbox (8.0.2)
18+
actionpack (= 8.0.2)
19+
activejob (= 8.0.2)
20+
activerecord (= 8.0.2)
21+
activestorage (= 8.0.2)
22+
activesupport (= 8.0.2)
2323
mail (>= 2.8.0)
24-
actionmailer (7.2.2.1)
25-
actionpack (= 7.2.2.1)
26-
actionview (= 7.2.2.1)
27-
activejob (= 7.2.2.1)
28-
activesupport (= 7.2.2.1)
24+
actionmailer (8.0.2)
25+
actionpack (= 8.0.2)
26+
actionview (= 8.0.2)
27+
activejob (= 8.0.2)
28+
activesupport (= 8.0.2)
2929
mail (>= 2.8.0)
3030
rails-dom-testing (~> 2.2)
31-
actionpack (7.2.2.1)
32-
actionview (= 7.2.2.1)
33-
activesupport (= 7.2.2.1)
31+
actionpack (8.0.2)
32+
actionview (= 8.0.2)
33+
activesupport (= 8.0.2)
3434
nokogiri (>= 1.8.5)
35-
racc
36-
rack (>= 2.2.4, < 3.2)
35+
rack (>= 2.2.4)
3736
rack-session (>= 1.0.1)
3837
rack-test (>= 0.6.3)
3938
rails-dom-testing (~> 2.2)
4039
rails-html-sanitizer (~> 1.6)
4140
useragent (~> 0.16)
42-
actiontext (7.2.2.1)
43-
actionpack (= 7.2.2.1)
44-
activerecord (= 7.2.2.1)
45-
activestorage (= 7.2.2.1)
46-
activesupport (= 7.2.2.1)
41+
actiontext (8.0.2)
42+
actionpack (= 8.0.2)
43+
activerecord (= 8.0.2)
44+
activestorage (= 8.0.2)
45+
activesupport (= 8.0.2)
4746
globalid (>= 0.6.0)
4847
nokogiri (>= 1.8.5)
49-
actionview (7.2.2.1)
50-
activesupport (= 7.2.2.1)
48+
actionview (8.0.2)
49+
activesupport (= 8.0.2)
5150
builder (~> 3.1)
5251
erubi (~> 1.11)
5352
rails-dom-testing (~> 2.2)
5453
rails-html-sanitizer (~> 1.6)
55-
activejob (7.2.2.1)
56-
activesupport (= 7.2.2.1)
54+
activejob (8.0.2)
55+
activesupport (= 8.0.2)
5756
globalid (>= 0.3.6)
58-
activemodel (7.2.2.1)
59-
activesupport (= 7.2.2.1)
60-
activerecord (7.2.2.1)
61-
activemodel (= 7.2.2.1)
62-
activesupport (= 7.2.2.1)
57+
activemodel (8.0.2)
58+
activesupport (= 8.0.2)
59+
activerecord (8.0.2)
60+
activemodel (= 8.0.2)
61+
activesupport (= 8.0.2)
6362
timeout (>= 0.4.0)
64-
activestorage (7.2.2.1)
65-
actionpack (= 7.2.2.1)
66-
activejob (= 7.2.2.1)
67-
activerecord (= 7.2.2.1)
68-
activesupport (= 7.2.2.1)
63+
activestorage (8.0.2)
64+
actionpack (= 8.0.2)
65+
activejob (= 8.0.2)
66+
activerecord (= 8.0.2)
67+
activesupport (= 8.0.2)
6968
marcel (~> 1.0)
70-
activesupport (7.2.2.1)
69+
activesupport (8.0.2)
7170
base64
7271
benchmark (>= 0.3)
7372
bigdecimal
@@ -79,6 +78,7 @@ GEM
7978
minitest (>= 5.1)
8079
securerandom (>= 0.3)
8180
tzinfo (~> 2.0, >= 2.0.5)
81+
uri (>= 0.13.1)
8282
addressable (2.8.7)
8383
public_suffix (>= 2.0.2, < 7.0)
8484
base64 (0.2.0)
@@ -183,30 +183,30 @@ GEM
183183
rack (>= 1.3)
184184
rackup (2.2.1)
185185
rack (>= 3)
186-
rails (7.2.2.1)
187-
actioncable (= 7.2.2.1)
188-
actionmailbox (= 7.2.2.1)
189-
actionmailer (= 7.2.2.1)
190-
actionpack (= 7.2.2.1)
191-
actiontext (= 7.2.2.1)
192-
actionview (= 7.2.2.1)
193-
activejob (= 7.2.2.1)
194-
activemodel (= 7.2.2.1)
195-
activerecord (= 7.2.2.1)
196-
activestorage (= 7.2.2.1)
197-
activesupport (= 7.2.2.1)
186+
rails (8.0.2)
187+
actioncable (= 8.0.2)
188+
actionmailbox (= 8.0.2)
189+
actionmailer (= 8.0.2)
190+
actionpack (= 8.0.2)
191+
actiontext (= 8.0.2)
192+
actionview (= 8.0.2)
193+
activejob (= 8.0.2)
194+
activemodel (= 8.0.2)
195+
activerecord (= 8.0.2)
196+
activestorage (= 8.0.2)
197+
activesupport (= 8.0.2)
198198
bundler (>= 1.15.0)
199-
railties (= 7.2.2.1)
199+
railties (= 8.0.2)
200200
rails-dom-testing (2.2.0)
201201
activesupport (>= 5.0.0)
202202
minitest
203203
nokogiri (>= 1.6)
204204
rails-html-sanitizer (1.6.2)
205205
loofah (~> 2.21)
206206
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)
207-
railties (7.2.2.1)
208-
actionpack (= 7.2.2.1)
209-
activesupport (= 7.2.2.1)
207+
railties (8.0.2)
208+
actionpack (= 8.0.2)
209+
activesupport (= 8.0.2)
210210
irb (~> 1.13)
211211
rackup (>= 1.0.0)
212212
rake (>= 12.2)
@@ -245,6 +245,7 @@ GEM
245245
timeout (0.4.3)
246246
tzinfo (2.0.6)
247247
concurrent-ruby (~> 1.0)
248+
uri (1.0.3)
248249
useragent (0.16.11)
249250
web-console (4.2.1)
250251
actionview (>= 6.0.0)
@@ -279,7 +280,7 @@ DEPENDENCIES
279280
jbuilder
280281
jsbundling-rails
281282
puma
282-
rails (~> 7.2.1)
283+
rails (~> 8.0.0)
283284
selenium-webdriver
284285
sprockets-rails
285286
sqlite3

demo/bin/setup

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
33

4-
# path to your application root.
54
APP_ROOT = File.expand_path("..", __dir__)
65

76
def system!(*args)
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
1413
# Add necessary setup steps to this file.
1514

1615
puts "== Installing dependencies =="
17-
system! "gem install bundler --conservative"
1816
system("bundle check") || system!("bundle install")
1917

2018
# puts "\n== Copying sample files =="
@@ -28,6 +26,9 @@ FileUtils.chdir APP_ROOT do
2826
puts "\n== Removing old logs and tempfiles =="
2927
system! "bin/rails log:clear tmp:clear"
3028

31-
puts "\n== Restarting application server =="
32-
system! "bin/rails restart"
29+
unless ARGV.include?("--skip-server")
30+
puts "\n== Starting development server =="
31+
STDOUT.flush # flush the output before exec(2) so that it displays
32+
exec "bin/dev"
33+
end
3334
end

demo/config/environments/development.rb

+18-25
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
Rails.application.configure do
44
# Settings specified here will take precedence over those in config/application.rb.
55

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

119
# Do not eager load code on boot.
@@ -14,63 +12,58 @@
1412
# Show full error reports.
1513
config.consider_all_requests_local = true
1614

17-
# Enable server timing
15+
# Enable server timing.
1816
config.server_timing = true
1917

20-
# Enable/disable caching. By default caching is disabled.
21-
# Run rails dev:cache to toggle caching.
18+
# Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19+
# Run rails dev:cache to toggle Action Controller caching.
2220
if Rails.root.join("tmp/caching-dev.txt").exist?
2321
config.action_controller.perform_caching = true
2422
config.action_controller.enable_fragment_cache_logging = true
25-
26-
config.cache_store = :memory_store
27-
config.public_file_server.headers = {
28-
"Cache-Control" => "public, max-age=#{2.days.to_i}"
29-
}
23+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
3024
else
3125
config.action_controller.perform_caching = false
32-
33-
config.cache_store = :null_store
3426
end
3527

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3631
# Store uploaded files on the local file system (see config/storage.yml for options)
3732
config.active_storage.service = :local if config.respond_to?(:active_storage)
3833

3934
# Don't care if the mailer can't send.
4035
config.action_mailer.raise_delivery_errors = false
4136

37+
# Make template changes take effect immediately.
4238
config.action_mailer.perform_caching = false
4339

40+
# Set localhost to be used by links generated in mailer templates.
41+
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
42+
4443
# Print deprecation notices to the Rails logger.
4544
config.active_support.deprecation = :log
4645

47-
# Raise exceptions for disallowed deprecations.
48-
config.active_support.disallowed_deprecation = :raise
49-
50-
# Tell Active Support which deprecation messages to disallow.
51-
config.active_support.disallowed_deprecation_warnings = []
52-
5346
# Raise an error on page load if there are pending migrations.
5447
config.active_record.migration_error = :page_load
5548

5649
# Highlight code that triggered database queries in logs.
5750
config.active_record.verbose_query_logs = true
5851

52+
# Append comments with runtime information tags to SQL queries in logs.
53+
config.active_record.query_log_tags_enabled = true
54+
5955
# Highlight code that enqueued background job in logs.
6056
config.active_job.verbose_enqueue_logs = true
6157

62-
# Suppress logger output for asset requests.
63-
config.assets.quiet = true
64-
6558
# Raises error for missing translations.
6659
# config.i18n.raise_on_missing_translations = true
6760

6861
# Annotate rendered view with file names.
69-
# config.action_view.annotate_rendered_view_with_filenames = true
62+
config.action_view.annotate_rendered_view_with_filenames = true
7063

7164
# Uncomment if you wish to allow Action Cable access from any origin.
7265
# config.action_cable.disable_request_forgery_protection = true
7366

74-
# Raise error when a before_action's only/except options reference missing actions
75-
# config.action_controller.raise_on_missing_callback_actions = true
67+
# Raise error when a before_action's only/except options reference missing actions.
68+
config.action_controller.raise_on_missing_callback_actions = true
7669
end

0 commit comments

Comments
 (0)