Skip to content

Commit 87ee0b2

Browse files
authored
Merge pull request #51 from amatsuda/rails80
Rails 8.0
2 parents b776eff + 26c8858 commit 87ee0b2

File tree

19 files changed

+696
-428
lines changed

19 files changed

+696
-428
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source "https://rubygems.org"
33
ruby file: '.ruby-version'
44

55
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
6-
gem "rails", "~> 7.2.0"
6+
gem "rails", "~> 8.0.0"
77

88
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
99
gem "sprockets-rails"

Gemfile.lock

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,65 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.2.2.2)
5-
actionpack (= 7.2.2.2)
6-
activesupport (= 7.2.2.2)
4+
actioncable (8.0.3)
5+
actionpack (= 8.0.3)
6+
activesupport (= 8.0.3)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.2.2.2)
11-
actionpack (= 7.2.2.2)
12-
activejob (= 7.2.2.2)
13-
activerecord (= 7.2.2.2)
14-
activestorage (= 7.2.2.2)
15-
activesupport (= 7.2.2.2)
10+
actionmailbox (8.0.3)
11+
actionpack (= 8.0.3)
12+
activejob (= 8.0.3)
13+
activerecord (= 8.0.3)
14+
activestorage (= 8.0.3)
15+
activesupport (= 8.0.3)
1616
mail (>= 2.8.0)
17-
actionmailer (7.2.2.2)
18-
actionpack (= 7.2.2.2)
19-
actionview (= 7.2.2.2)
20-
activejob (= 7.2.2.2)
21-
activesupport (= 7.2.2.2)
17+
actionmailer (8.0.3)
18+
actionpack (= 8.0.3)
19+
actionview (= 8.0.3)
20+
activejob (= 8.0.3)
21+
activesupport (= 8.0.3)
2222
mail (>= 2.8.0)
2323
rails-dom-testing (~> 2.2)
24-
actionpack (7.2.2.2)
25-
actionview (= 7.2.2.2)
26-
activesupport (= 7.2.2.2)
24+
actionpack (8.0.3)
25+
actionview (= 8.0.3)
26+
activesupport (= 8.0.3)
2727
nokogiri (>= 1.8.5)
28-
racc
29-
rack (>= 2.2.4, < 3.2)
28+
rack (>= 2.2.4)
3029
rack-session (>= 1.0.1)
3130
rack-test (>= 0.6.3)
3231
rails-dom-testing (~> 2.2)
3332
rails-html-sanitizer (~> 1.6)
3433
useragent (~> 0.16)
35-
actiontext (7.2.2.2)
36-
actionpack (= 7.2.2.2)
37-
activerecord (= 7.2.2.2)
38-
activestorage (= 7.2.2.2)
39-
activesupport (= 7.2.2.2)
34+
actiontext (8.0.3)
35+
actionpack (= 8.0.3)
36+
activerecord (= 8.0.3)
37+
activestorage (= 8.0.3)
38+
activesupport (= 8.0.3)
4039
globalid (>= 0.6.0)
4140
nokogiri (>= 1.8.5)
42-
actionview (7.2.2.2)
43-
activesupport (= 7.2.2.2)
41+
actionview (8.0.3)
42+
activesupport (= 8.0.3)
4443
builder (~> 3.1)
4544
erubi (~> 1.11)
4645
rails-dom-testing (~> 2.2)
4746
rails-html-sanitizer (~> 1.6)
48-
activejob (7.2.2.2)
49-
activesupport (= 7.2.2.2)
47+
activejob (8.0.3)
48+
activesupport (= 8.0.3)
5049
globalid (>= 0.3.6)
51-
activemodel (7.2.2.2)
52-
activesupport (= 7.2.2.2)
53-
activerecord (7.2.2.2)
54-
activemodel (= 7.2.2.2)
55-
activesupport (= 7.2.2.2)
50+
activemodel (8.0.3)
51+
activesupport (= 8.0.3)
52+
activerecord (8.0.3)
53+
activemodel (= 8.0.3)
54+
activesupport (= 8.0.3)
5655
timeout (>= 0.4.0)
57-
activestorage (7.2.2.2)
58-
actionpack (= 7.2.2.2)
59-
activejob (= 7.2.2.2)
60-
activerecord (= 7.2.2.2)
61-
activesupport (= 7.2.2.2)
56+
activestorage (8.0.3)
57+
actionpack (= 8.0.3)
58+
activejob (= 8.0.3)
59+
activerecord (= 8.0.3)
60+
activesupport (= 8.0.3)
6261
marcel (~> 1.0)
63-
activesupport (7.2.2.2)
62+
activesupport (8.0.3)
6463
base64
6564
benchmark (>= 0.3)
6665
bigdecimal
@@ -72,6 +71,7 @@ GEM
7271
minitest (>= 5.1)
7372
securerandom (>= 0.3)
7473
tzinfo (~> 2.0, >= 2.0.5)
74+
uri (>= 0.13.1)
7575
addressable (2.8.7)
7676
public_suffix (>= 2.0.2, < 7.0)
7777
ast (2.4.3)
@@ -205,42 +205,43 @@ GEM
205205
puma (7.0.4)
206206
nio4r (~> 2.0)
207207
racc (1.8.1)
208-
rack (3.1.18)
208+
rack (3.2.3)
209209
rack-session (2.1.1)
210210
base64 (>= 0.1.0)
211211
rack (>= 3.0.0)
212212
rack-test (2.2.0)
213213
rack (>= 1.3)
214214
rackup (2.2.1)
215215
rack (>= 3)
216-
rails (7.2.2.2)
217-
actioncable (= 7.2.2.2)
218-
actionmailbox (= 7.2.2.2)
219-
actionmailer (= 7.2.2.2)
220-
actionpack (= 7.2.2.2)
221-
actiontext (= 7.2.2.2)
222-
actionview (= 7.2.2.2)
223-
activejob (= 7.2.2.2)
224-
activemodel (= 7.2.2.2)
225-
activerecord (= 7.2.2.2)
226-
activestorage (= 7.2.2.2)
227-
activesupport (= 7.2.2.2)
216+
rails (8.0.3)
217+
actioncable (= 8.0.3)
218+
actionmailbox (= 8.0.3)
219+
actionmailer (= 8.0.3)
220+
actionpack (= 8.0.3)
221+
actiontext (= 8.0.3)
222+
actionview (= 8.0.3)
223+
activejob (= 8.0.3)
224+
activemodel (= 8.0.3)
225+
activerecord (= 8.0.3)
226+
activestorage (= 8.0.3)
227+
activesupport (= 8.0.3)
228228
bundler (>= 1.15.0)
229-
railties (= 7.2.2.2)
229+
railties (= 8.0.3)
230230
rails-dom-testing (2.3.0)
231231
activesupport (>= 5.0.0)
232232
minitest
233233
nokogiri (>= 1.6)
234234
rails-html-sanitizer (1.6.2)
235235
loofah (~> 2.21)
236236
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)
237-
railties (7.2.2.2)
238-
actionpack (= 7.2.2.2)
239-
activesupport (= 7.2.2.2)
237+
railties (8.0.3)
238+
actionpack (= 8.0.3)
239+
activesupport (= 8.0.3)
240240
irb (~> 1.13)
241241
rackup (>= 1.0.0)
242242
rake (>= 12.2)
243243
thor (~> 1.0, >= 1.2.2)
244+
tsort (>= 0.2)
244245
zeitwerk (~> 2.6)
245246
rainbow (3.1.1)
246247
rake (13.3.0)
@@ -305,6 +306,7 @@ GEM
305306
unicode-display_width (3.2.0)
306307
unicode-emoji (~> 4.1)
307308
unicode-emoji (4.1.0)
309+
uri (1.0.4)
308310
useragent (0.16.11)
309311
web-console (4.2.1)
310312
actionview (>= 6.0.0)
@@ -343,7 +345,7 @@ DEPENDENCIES
343345
importmap-rails
344346
pg
345347
puma (>= 5.0)
346-
rails (~> 7.2.0)
348+
rails (~> 8.0.0)
347349
rubocop
348350
selenium-webdriver
349351
simplecov

bin/dev

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env ruby
2+
exec "./bin/rails", "server", *ARGV

bin/setup

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require "fileutils"
33

44
APP_ROOT = File.expand_path("..", __dir__)
5-
APP_NAME = "blade-ruby-lang-org"
65

76
def system!(*args)
87
system(*args, exception: true)
@@ -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,10 +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"
33-
34-
# puts "\n== Configuring puma-dev =="
35-
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
36-
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
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
3734
end

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
module BladeRubyLangOrg
1010
class Application < Rails::Application
1111
# Initialize configuration defaults for originally generated Rails version.
12-
config.load_defaults 7.2
12+
config.load_defaults 8.0
1313

1414
# Please, add to the `ignore` list any other `lib` subdirectories that do
1515
# not contain `.rb` files, or that should not be reloaded or eager loaded.

config/environments/development.rb

Lines changed: 12 additions & 21 deletions
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.
@@ -17,53 +15,46 @@
1715
# 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 = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
23+
config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
2824
else
2925
config.action_controller.perform_caching = false
30-
31-
config.cache_store = :null_store
3226
end
3327

28+
# Change to :null_store to avoid any caching.
29+
config.cache_store = :memory_store
30+
3431
# Store uploaded files on the local file system (see config/storage.yml for options).
3532
config.active_storage.service = :local
3633

3734
# Don't care if the mailer can't send.
3835
config.action_mailer.raise_delivery_errors = false
3936

40-
# Disable caching for Action Mailer templates even if Action Controller
41-
# caching is enabled.
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.
4441
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
4542

4643
# Print deprecation notices to the Rails logger.
4744
config.active_support.deprecation = :log
4845

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

5849
# Highlight code that triggered database queries in logs.
5950
config.active_record.verbose_query_logs = true
6051

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

64-
# Suppress logger output for asset requests.
65-
config.assets.quiet = true
66-
6758
# Raises error for missing translations.
6859
# config.i18n.raise_on_missing_translations = true
6960

0 commit comments

Comments
 (0)