Skip to content

Commit 0cd4d84

Browse files
authored
Upgrade Rails to 8.0.1 version (#174)
1 parent b6c8137 commit 0cd4d84

22 files changed

+579
-596
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
ruby "3.4.2"
55

66
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7-
gem "rails", "7.2.0"
7+
gem "rails", "8.0.1"
88
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
99
gem "propshaft", "0.9.0"
1010
# Use sqlite3 as the database for Active Record

Gemfile.lock

Lines changed: 64 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
GIT
22
remote: https://github.com/phlex-ruby/phlex-rails.git
3-
revision: be91ab54bc1b0497e4cc72f1f435524811e0be76
3+
revision: 2a0078767af4feea43e0772620e1d88529dc4d1a
44
specs:
55
phlex-rails (2.0.2)
66
phlex (~> 2.0.2)
77
railties (>= 6.1, < 9)
88

99
GIT
1010
remote: https://github.com/phlex-ruby/phlex.git
11-
revision: 2e858fb3fa95e144a0631ce77ff860a3a404f7ed
11+
revision: 8c5938db3254690c423ba42c63c7f8631f540c79
1212
specs:
1313
phlex (2.0.2)
1414

@@ -22,67 +22,67 @@ GIT
2222
GEM
2323
remote: https://rubygems.org/
2424
specs:
25-
actioncable (7.2.0)
26-
actionpack (= 7.2.0)
27-
activesupport (= 7.2.0)
25+
actioncable (8.0.1)
26+
actionpack (= 8.0.1)
27+
activesupport (= 8.0.1)
2828
nio4r (~> 2.0)
2929
websocket-driver (>= 0.6.1)
3030
zeitwerk (~> 2.6)
31-
actionmailbox (7.2.0)
32-
actionpack (= 7.2.0)
33-
activejob (= 7.2.0)
34-
activerecord (= 7.2.0)
35-
activestorage (= 7.2.0)
36-
activesupport (= 7.2.0)
31+
actionmailbox (8.0.1)
32+
actionpack (= 8.0.1)
33+
activejob (= 8.0.1)
34+
activerecord (= 8.0.1)
35+
activestorage (= 8.0.1)
36+
activesupport (= 8.0.1)
3737
mail (>= 2.8.0)
38-
actionmailer (7.2.0)
39-
actionpack (= 7.2.0)
40-
actionview (= 7.2.0)
41-
activejob (= 7.2.0)
42-
activesupport (= 7.2.0)
38+
actionmailer (8.0.1)
39+
actionpack (= 8.0.1)
40+
actionview (= 8.0.1)
41+
activejob (= 8.0.1)
42+
activesupport (= 8.0.1)
4343
mail (>= 2.8.0)
4444
rails-dom-testing (~> 2.2)
45-
actionpack (7.2.0)
46-
actionview (= 7.2.0)
47-
activesupport (= 7.2.0)
45+
actionpack (8.0.1)
46+
actionview (= 8.0.1)
47+
activesupport (= 8.0.1)
4848
nokogiri (>= 1.8.5)
49-
racc
50-
rack (>= 2.2.4, < 3.2)
49+
rack (>= 2.2.4)
5150
rack-session (>= 1.0.1)
5251
rack-test (>= 0.6.3)
5352
rails-dom-testing (~> 2.2)
5453
rails-html-sanitizer (~> 1.6)
5554
useragent (~> 0.16)
56-
actiontext (7.2.0)
57-
actionpack (= 7.2.0)
58-
activerecord (= 7.2.0)
59-
activestorage (= 7.2.0)
60-
activesupport (= 7.2.0)
55+
actiontext (8.0.1)
56+
actionpack (= 8.0.1)
57+
activerecord (= 8.0.1)
58+
activestorage (= 8.0.1)
59+
activesupport (= 8.0.1)
6160
globalid (>= 0.6.0)
6261
nokogiri (>= 1.8.5)
63-
actionview (7.2.0)
64-
activesupport (= 7.2.0)
62+
actionview (8.0.1)
63+
activesupport (= 8.0.1)
6564
builder (~> 3.1)
6665
erubi (~> 1.11)
6766
rails-dom-testing (~> 2.2)
6867
rails-html-sanitizer (~> 1.6)
69-
activejob (7.2.0)
70-
activesupport (= 7.2.0)
68+
activejob (8.0.1)
69+
activesupport (= 8.0.1)
7170
globalid (>= 0.3.6)
72-
activemodel (7.2.0)
73-
activesupport (= 7.2.0)
74-
activerecord (7.2.0)
75-
activemodel (= 7.2.0)
76-
activesupport (= 7.2.0)
71+
activemodel (8.0.1)
72+
activesupport (= 8.0.1)
73+
activerecord (8.0.1)
74+
activemodel (= 8.0.1)
75+
activesupport (= 8.0.1)
7776
timeout (>= 0.4.0)
78-
activestorage (7.2.0)
79-
actionpack (= 7.2.0)
80-
activejob (= 7.2.0)
81-
activerecord (= 7.2.0)
82-
activesupport (= 7.2.0)
77+
activestorage (8.0.1)
78+
actionpack (= 8.0.1)
79+
activejob (= 8.0.1)
80+
activerecord (= 8.0.1)
81+
activesupport (= 8.0.1)
8382
marcel (~> 1.0)
84-
activesupport (7.2.0)
83+
activesupport (8.0.1)
8584
base64
85+
benchmark (>= 0.3)
8686
bigdecimal
8787
concurrent-ruby (~> 1.0, >= 1.3.1)
8888
connection_pool (>= 2.2.5)
@@ -92,10 +92,12 @@ GEM
9292
minitest (>= 5.1)
9393
securerandom (>= 0.3)
9494
tzinfo (~> 2.0, >= 2.0.5)
95+
uri (>= 0.13.1)
9596
addressable (2.8.7)
9697
public_suffix (>= 2.0.2, < 7.0)
9798
ast (2.4.2)
9899
base64 (0.2.0)
100+
benchmark (0.4.0)
99101
bigdecimal (3.1.9)
100102
bindex (0.8.1)
101103
bootsnap (1.18.4)
@@ -167,7 +169,7 @@ GEM
167169
net-smtp (0.5.1)
168170
net-protocol
169171
nio4r (2.7.4)
170-
nokogiri (1.18.2)
172+
nokogiri (1.18.3)
171173
mini_portile2 (~> 2.8.2)
172174
racc (~> 1.4)
173175
parallel (1.26.3)
@@ -200,30 +202,30 @@ GEM
200202
rack (>= 1.3)
201203
rackup (2.2.1)
202204
rack (>= 3)
203-
rails (7.2.0)
204-
actioncable (= 7.2.0)
205-
actionmailbox (= 7.2.0)
206-
actionmailer (= 7.2.0)
207-
actionpack (= 7.2.0)
208-
actiontext (= 7.2.0)
209-
actionview (= 7.2.0)
210-
activejob (= 7.2.0)
211-
activemodel (= 7.2.0)
212-
activerecord (= 7.2.0)
213-
activestorage (= 7.2.0)
214-
activesupport (= 7.2.0)
205+
rails (8.0.1)
206+
actioncable (= 8.0.1)
207+
actionmailbox (= 8.0.1)
208+
actionmailer (= 8.0.1)
209+
actionpack (= 8.0.1)
210+
actiontext (= 8.0.1)
211+
actionview (= 8.0.1)
212+
activejob (= 8.0.1)
213+
activemodel (= 8.0.1)
214+
activerecord (= 8.0.1)
215+
activestorage (= 8.0.1)
216+
activesupport (= 8.0.1)
215217
bundler (>= 1.15.0)
216-
railties (= 7.2.0)
218+
railties (= 8.0.1)
217219
rails-dom-testing (2.2.0)
218220
activesupport (>= 5.0.0)
219221
minitest
220222
nokogiri (>= 1.6)
221223
rails-html-sanitizer (1.6.2)
222224
loofah (~> 2.21)
223225
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)
224-
railties (7.2.0)
225-
actionpack (= 7.2.0)
226-
activesupport (= 7.2.0)
226+
railties (8.0.1)
227+
actionpack (= 8.0.1)
228+
activesupport (= 8.0.1)
227229
irb (~> 1.13)
228230
rackup (>= 1.0.0)
229231
rake (>= 12.2)
@@ -256,7 +258,7 @@ GEM
256258
ruby-progressbar (1.13.0)
257259
rubyzip (2.4.1)
258260
securerandom (0.4.1)
259-
selenium-webdriver (4.28.0)
261+
selenium-webdriver (4.29.0)
260262
base64 (~> 0.2)
261263
logger (~> 1.4)
262264
rexml (~> 3.2, >= 3.2.5)
@@ -278,7 +280,7 @@ GEM
278280
rubocop-performance (~> 1.23.0)
279281
stimulus-rails (1.3.3)
280282
railties (>= 6.0.0)
281-
stringio (3.1.3)
283+
stringio (3.1.4)
282284
tailwind_merge (0.13.3)
283285
lru_redux (~> 1.1)
284286
thor (1.3.2)
@@ -292,6 +294,7 @@ GEM
292294
unicode-display_width (3.1.4)
293295
unicode-emoji (~> 4.0, >= 4.0.4)
294296
unicode-emoji (4.0.4)
297+
uri (1.0.2)
295298
useragent (0.16.11)
296299
web-console (4.2.1)
297300
actionview (>= 6.0.0)
@@ -323,7 +326,7 @@ DEPENDENCIES
323326
propshaft (= 0.9.0)
324327
pry (= 0.15.2)
325328
puma (= 6.4.2)
326-
rails (= 7.2.0)
329+
rails (= 8.0.1)
327330
rouge (~> 4.5)
328331
ruby_ui!
329332
selenium-webdriver

app/controllers/docs_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class DocsController < ApplicationController
4-
layout -> { DocsLayout }
4+
layout -> { Views::Layouts::DocsLayout }
55

66
# GETTING STARTED
77
def introduction

app/controllers/errors_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class ErrorsController < ApplicationController
4-
layout -> { ErrorsLayout }
4+
layout -> { Views::Layouts::ErrorsLayout }
55

66
def not_found
77
render Views::Errors::NotFound.new, status: :not_found

app/controllers/pages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class PagesController < ApplicationController
4-
layout -> { PagesLayout }
4+
layout -> { Views::Layouts::PagesLayout }
55

66
def home
77
render Views::Pages::Home.new

app/controllers/themes_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class ThemesController < ApplicationController
4-
layout -> { ApplicationLayout }
4+
layout -> { Views::Layouts::ApplicationLayout }
55

66
# GET /themes/:theme
77
def show

app/mailers/application_mailer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class ApplicationMailer < ActionMailer::Base
22
default from: email_address_with_name(ENV["MAILER_SENDER"], ENV["APP_NAME"]),
33
reply_to: ENV["MAILER_SENDER"]
4-
layout -> { MailerLayout }
4+
layout -> { Views::Layouts::MailerLayout }
55

66
def self.template_path
77
"mailers/#{name.underscore}"

app/views/layouts/application_layout.rb

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

3-
class ApplicationLayout < Views::Base
4-
include Phlex::Rails::Layout
3+
module Views
4+
module Layouts
5+
class ApplicationLayout < Views::Base
6+
include Phlex::Rails::Layout
57

6-
def view_template(&block)
7-
doctype
8+
def view_template(&block)
9+
doctype
810

9-
html do
10-
render Shared::Head.new
11+
html do
12+
render Shared::Head.new
1113

12-
body do
13-
render Shared::Navbar.new
14-
main(&block)
15-
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
14+
body do
15+
render Shared::Navbar.new
16+
main(&block)
17+
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
18+
end
19+
end
1620
end
1721
end
1822
end

app/views/layouts/docs_layout.rb

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
# frozen_string_literal: true
22

3-
class DocsLayout < Views::Base
4-
include Phlex::Rails::Layout
3+
module Views
4+
module Layouts
5+
class DocsLayout < Views::Base
6+
include Phlex::Rails::Layout
57

6-
def view_template(&block)
7-
doctype
8+
def view_template(&block)
9+
doctype
810

9-
html do
10-
render Shared::Head.new
11+
html do
12+
render Shared::Head.new
1113

12-
body do
13-
render Shared::Navbar.new
14-
div(class: "flex-1") do
15-
div(class: "border-b") do
16-
div(class: "container px-4 flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10") do
17-
render Shared::Sidebar.new
18-
main(class: "relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]", &block)
14+
body do
15+
render Shared::Navbar.new
16+
div(class: "flex-1") do
17+
div(class: "border-b") do
18+
div(class: "container px-4 flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10") do
19+
render Shared::Sidebar.new
20+
main(class: "relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]", &block)
21+
end
22+
end
1923
end
24+
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
2025
end
2126
end
22-
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
2327
end
2428
end
2529
end

app/views/layouts/errors_layout.rb

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# frozen_string_literal: true
22

3-
class ErrorsLayout < Views::Base
4-
include Phlex::Rails::Layout
3+
module Views
4+
module Layouts
5+
class ErrorsLayout < Views::Base
6+
include Phlex::Rails::Layout
57

6-
def view_template(&block)
7-
doctype
8+
def view_template(&block)
9+
doctype
810

9-
html do
10-
render Shared::Head.new
11+
html do
12+
render Shared::Head.new
1113

12-
body do
13-
main(class: "relative flex flex-col items-center justify-center gap-y-6 h-screen w-screen overflow-y-scroll") do
14-
render Shared::GridPattern.new
15-
ThemeToggle(class: "hidden") # In order for dark mode to work, we need to render the theme toggle somewhere in the DOM
16-
render Shared::Logo.new
17-
div(class: "container w-full max-w-md", &block)
14+
body do
15+
main(class: "relative flex flex-col items-center justify-center gap-y-6 h-screen w-screen overflow-y-scroll") do
16+
render Shared::GridPattern.new
17+
ThemeToggle(class: "hidden") # In order for dark mode to work, we need to render the theme toggle somewhere in the DOM
18+
render Shared::Logo.new
19+
div(class: "container w-full max-w-md", &block)
20+
end
21+
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
22+
end
1823
end
19-
render Shared::Flashes.new(notice: flash[:notice], alert: flash[:alert])
2024
end
2125
end
2226
end

0 commit comments

Comments
 (0)