Skip to content

Commit

Permalink
Update Rails to 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Hirt committed Dec 24, 2024
1 parent ccae57d commit 3831358
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 74 deletions.
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ ruby '3.3.6'

# Rails and rails-y stuff
gem 'bootsnap', '>= 1.4.4', require: false
gem 'rails', '~> 7.2.0'
gem 'rails', '~> 8.0.1'

# Authentication & Authorization
gem 'cancancan', '~> 3.6.0'
gem 'devise', '~> 4.9'
gem 'devise-two-factor', '~> 5.1.0'
gem 'devise-two-factor', '~> 6.1.0'
gem 'doorkeeper', '~> 5.7.0'
gem 'doorkeeper-openid_connect', '~> 1.8.4'
gem 'recaptcha', '~> 5.17.0'
Expand Down Expand Up @@ -48,7 +48,7 @@ gem 'simple_form', '~> 5.3.0'
# Translations
gem 'gettext_i18n_rails', '~> 1.12.0'
gem 'mobility', '~> 1.2.5'
gem 'rails-i18n', '~> 7.0.1'
gem 'rails-i18n', '~> 8.0.0'

# Markdown rendering
gem 'redcarpet', '~> 3.6.0'
Expand Down Expand Up @@ -77,7 +77,8 @@ gem 'omniauth-rails_csrf_protection', '~> 1.0.1'
gem 'omniauth-steam', '~> 1.0.6'

# Notifications
gem 'exception_notification', '~> 4.5.0'
# TODO: either see that this gets tagged or that I can use something else
gem 'exception_notification', git: 'https://github.com/smartinez87/exception_notification.git', branch: 'master'

# Development gems
group :development do
Expand Down
146 changes: 76 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/smartinez87/exception_notification.git
revision: 60e158888bbff96f7a9ae00ae97305cdd33726e9
branch: master
specs:
exception_notification (4.5.0)
actionmailer (>= 5.2, < 9)
activesupport (>= 5.2, < 9)

PATH
remote: payment_gateways/dummy_payment
specs:
Expand All @@ -20,46 +29,45 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
actioncable (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
actionmailbox (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
mail (>= 2.8.0)
actionmailer (7.2.2.1)
actionpack (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activesupport (= 7.2.2.1)
actionmailer (8.0.1)
actionpack (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activesupport (= 8.0.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
actionpack (8.0.1)
actionview (= 8.0.1)
activesupport (= 8.0.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.2.1)
actionpack (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
actiontext (8.0.1)
actionpack (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
actionview (8.0.1)
activesupport (= 8.0.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
Expand All @@ -71,14 +79,14 @@ GEM
activesupport (>= 5.2.0)
active_type (2.6.0)
activerecord (>= 6.1)
activejob (7.2.2.1)
activesupport (= 7.2.2.1)
activejob (8.0.1)
activesupport (= 8.0.1)
globalid (>= 0.3.6)
activemodel (7.2.2.1)
activesupport (= 7.2.2.1)
activerecord (7.2.2.1)
activemodel (= 7.2.2.1)
activesupport (= 7.2.2.1)
activemodel (8.0.1)
activesupport (= 8.0.1)
activerecord (8.0.1)
activemodel (= 8.0.1)
activesupport (= 8.0.1)
timeout (>= 0.4.0)
activerecord-session_store (2.1.0)
actionpack (>= 6.1)
Expand All @@ -87,13 +95,13 @@ GEM
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activesupport (= 7.2.2.1)
activestorage (8.0.1)
actionpack (= 8.0.1)
activejob (= 8.0.1)
activerecord (= 8.0.1)
activesupport (= 8.0.1)
marcel (~> 1.0)
activesupport (7.2.2.1)
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -105,6 +113,7 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
Expand Down Expand Up @@ -133,17 +142,17 @@ GEM
csv (3.3.0)
datagrid (1.8.1)
railties (>= 6.0)
date (3.3.4)
date (3.4.1)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-two-factor (5.1.0)
activesupport (~> 7.0)
devise-two-factor (6.1.0)
activesupport (>= 7.0, < 8.1)
devise (~> 4.0)
railties (~> 7.0)
railties (>= 7.0, < 8.1)
rotp (~> 6.0)
docile (1.4.0)
doorkeeper (5.7.0)
Expand All @@ -153,9 +162,6 @@ GEM
jwt (>= 2.5)
drb (2.2.1)
erubi (1.13.0)
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
activesupport (>= 5.2, < 8)
faker (3.4.1)
i18n (>= 1.8.11, < 2)
faraday (2.9.2)
Expand Down Expand Up @@ -269,7 +275,7 @@ GEM
bigdecimal (~> 3.1)
net-http (0.4.1)
uri
net-imap (0.4.14)
net-imap (0.5.4)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -341,30 +347,30 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.2.2.1)
actioncable (= 7.2.2.1)
actionmailbox (= 7.2.2.1)
actionmailer (= 7.2.2.1)
actionpack (= 7.2.2.1)
actiontext (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activemodel (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
rails (8.0.1)
actioncable (= 8.0.1)
actionmailbox (= 8.0.1)
actionmailer (= 8.0.1)
actionpack (= 8.0.1)
actiontext (= 8.0.1)
actionview (= 8.0.1)
activejob (= 8.0.1)
activemodel (= 8.0.1)
activerecord (= 8.0.1)
activestorage (= 8.0.1)
activesupport (= 8.0.1)
bundler (>= 1.15.0)
railties (= 7.2.2.1)
railties (= 8.0.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails-i18n (7.0.9)
rails-i18n (8.0.1)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (>= 8.0.0, < 9)
rails-settings-cached (2.9.4)
activerecord (>= 5.0.0)
railties (>= 5.0.0)
Expand All @@ -374,9 +380,9 @@ GEM
rails
request_store
schemacop (>= 3.0.0, <= 3.1)
railties (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
railties (8.0.1)
actionpack (= 8.0.1)
activesupport (= 8.0.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -484,7 +490,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
uri (0.13.0)
uri (1.0.2)
useragent (0.16.11)
version_gem (1.1.4)
warden (1.2.9)
Expand Down Expand Up @@ -512,11 +518,11 @@ DEPENDENCIES
cssbundling-rails (~> 1.4.0)
datagrid (~> 1.8.0)
devise (~> 4.9)
devise-two-factor (~> 5.1.0)
devise-two-factor (~> 6.1.0)
doorkeeper (~> 5.7.0)
doorkeeper-openid_connect (~> 1.8.4)
dummy_payment!
exception_notification (~> 4.5.0)
exception_notification!
faker (~> 3.4.0)
figaro (= 1.2.0)
gettext (>= 3.0.2)
Expand All @@ -539,8 +545,8 @@ DEPENDENCIES
pg (~> 1.5.3)
pry-byebug (~> 3.9)
puma (~> 6.4)
rails (~> 7.2.0)
rails-i18n (~> 7.0.1)
rails (~> 8.0.1)
rails-i18n (~> 8.0.0)
rails-settings-cached (~> 2.9.2)
rails_ops (~> 1.5.8)
recaptcha (~> 5.17.0)
Expand Down
13 changes: 13 additions & 0 deletions config/initializers/devise_rails8_patch.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This can be removed when https://github.com/heartcombo/devise/pull/5728 is released
# and testing with devise works again.
require 'devise'

module Devise
def self.mappings
# Starting from Rails 8.0, routes are lazy-loaded by default in test and development environments.
# However, Devise's mappings are built during the routes loading phase.
# To ensure it works correctly, we need to load the routes first before accessing @@mappings.
Rails.application.try(:reload_routes_unless_loaded)
@@mappings
end
end

0 comments on commit 3831358

Please sign in to comment.