Skip to content

Commit

Permalink
Update for Rails 8 (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 authored Oct 30, 2024
1 parent 04d4dcb commit b5f4791
Show file tree
Hide file tree
Showing 33 changed files with 315 additions and 538 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec

gem "puma"
gem "sqlite3", "< 2"
gem "sqlite3"
gem "debug", ">= 1.7.0"
gem "mocha"
gem "rubocop-shopify", "~> 2.15", require: false
Expand All @@ -17,7 +17,7 @@ gem "rubocop-sorbet", "~> 0.8", require: false
gem "sorbet-static-and-runtime", platforms: :ruby
gem "tapioca", "~> 0.13", require: false, platforms: :ruby
gem "psych", "~> 5.1", require: false
gem "rails"
gem "rails", "8.0.0.beta1"
gem "webmock"

platforms :mingw, :x64_mingw, :mswin, :jruby do
Expand Down
182 changes: 91 additions & 91 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,87 +7,85 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
actioncable (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.3)
actionpack (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activesupport (= 7.1.3.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
mail (>= 2.8.0)
actionmailer (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
actionview (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.3.3)
actionview (= 7.1.3.3)
activesupport (= 7.1.3.3)
actionpack (8.0.0.beta1)
actionview (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.3)
actionpack (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
useragent (~> 0.16)
actiontext (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.3)
activesupport (= 7.1.3.3)
actionview (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.3)
activesupport (= 7.1.3.3)
activejob (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
globalid (>= 0.3.6)
activemodel (7.1.3.3)
activesupport (= 7.1.3.3)
activerecord (7.1.3.3)
activemodel (= 7.1.3.3)
activesupport (= 7.1.3.3)
activemodel (8.0.0.beta1)
activesupport (= 8.0.0.beta1)
activerecord (8.0.0.beta1)
activemodel (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
timeout (>= 0.4.0)
activestorage (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activesupport (= 7.1.3.3)
activestorage (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
marcel (~> 1.0)
activesupport (7.1.3.3)
activesupport (8.0.0.beta1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.3.0)
bigdecimal (3.1.8)
builder (3.2.4)
concurrent-ruby (1.2.3)
builder (3.3.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crack (1.0.0)
bigdecimal
Expand All @@ -98,14 +96,14 @@ GEM
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
erubi (1.12.0)
erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.1.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.13.1)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
Expand All @@ -121,11 +119,10 @@ GEM
net-smtp
marcel (1.0.4)
mini_mime (1.1.5)
minitest (5.23.0)
minitest (5.25.1)
mocha (2.3.0)
ruby2_keywords (>= 0.0.5)
mutex_m (0.2.0)
net-imap (0.4.11)
net-imap (0.4.16)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -136,13 +133,13 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.7.3)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x64-mingw-ucrt)
nokogiri (1.16.7-x64-mingw-ucrt)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
parallel (1.24.0)
parser (3.3.1.0)
Expand All @@ -154,40 +151,40 @@ GEM
public_suffix (5.0.5)
puma (6.4.3)
nio4r (~> 2.0)
racc (1.7.3)
rack (3.0.11)
racc (1.8.1)
rack (3.1.7)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.3)
actioncable (= 7.1.3.3)
actionmailbox (= 7.1.3.3)
actionmailer (= 7.1.3.3)
actionpack (= 7.1.3.3)
actiontext (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activemodel (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
rails (8.0.0.beta1)
actioncable (= 8.0.0.beta1)
actionmailbox (= 8.0.0.beta1)
actionmailer (= 8.0.0.beta1)
actionpack (= 8.0.0.beta1)
actiontext (= 8.0.0.beta1)
actionview (= 8.0.0.beta1)
activejob (= 8.0.0.beta1)
activemodel (= 8.0.0.beta1)
activerecord (= 8.0.0.beta1)
activestorage (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
bundler (>= 1.15.0)
railties (= 7.1.3.3)
railties (= 8.0.0.beta1)
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)
railties (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
irb
railties (8.0.0.beta1)
actionpack (= 8.0.0.beta1)
activesupport (= 8.0.0.beta1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand All @@ -199,10 +196,10 @@ GEM
sorbet-runtime (>= 0.5.9204)
rbs (3.6.1)
logger
rdoc (6.6.3.1)
rdoc (6.7.0)
psych (>= 4.0.0)
regexp_parser (2.9.0)
reline (0.5.7)
reline (0.5.10)
io-console (~> 0.5)
rexml (3.3.8)
rubocop (1.63.4)
Expand Down Expand Up @@ -234,6 +231,7 @@ GEM
sorbet-runtime (>= 0.5.10782)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
securerandom (0.3.1)
sorbet (0.5.11577)
sorbet-static (= 0.5.11577)
sorbet-runtime (0.5.11577)
Expand All @@ -247,11 +245,11 @@ GEM
prism (>= 0.19.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x64-mingw-ucrt)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
stringio (3.1.0)
sqlite3 (2.1.0-arm64-darwin)
sqlite3 (2.1.0-x64-mingw-ucrt)
sqlite3 (2.1.0-x86_64-darwin)
sqlite3 (2.1.0-x86_64-linux-gnu)
stringio (3.1.1)
tapioca (0.16.2)
bundler (>= 2.2.25)
netrc (>= 0.11.0)
Expand All @@ -261,13 +259,15 @@ GEM
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
thor (1.3.1)
thor (1.3.2)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.1)
tzinfo (>= 1.0.0)
unicode-display_width (2.5.0)
uri (0.13.1)
useragent (0.16.10)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand All @@ -280,7 +280,7 @@ GEM
yard-sorbet (0.8.1)
sorbet-runtime (>= 0.5)
yard (>= 0.9)
zeitwerk (2.6.14)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin
Expand All @@ -293,14 +293,14 @@ DEPENDENCIES
mocha
psych (~> 5.1)
puma
rails
rails (= 8.0.0.beta1)
rubocop-minitest (~> 0.35.0)
rubocop-rake (~> 0.6.0)
rubocop-shopify (~> 2.15)
rubocop-sorbet (~> 0.8)
ruby-lsp-rails!
sorbet-static-and-runtime
sqlite3 (< 2)
sqlite3
tapioca (~> 0.13)
tzinfo
tzinfo-data
Expand Down
3 changes: 3 additions & 0 deletions test/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ def create
archive_users_path
invalid_path
end

# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
allow_browser versions: :modern
end
9 changes: 9 additions & 0 deletions test/dummy/app/jobs/application_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked

# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end
6 changes: 6 additions & 0 deletions test/dummy/app/mailers/application_mailer.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

class ApplicationMailer < ActionMailer::Base
default from: "[email protected]"
layout "mailer"
end
14 changes: 13 additions & 1 deletion test/dummy/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>Dummy</title>
<title><%= content_for(:title) || "Dummy" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= yield :head %>
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>

<link rel="icon" href="/icon.png" type="image/png">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/icon.png">

<%# Includes all stylesheet files in app/views/stylesheets %>
<%= stylesheet_link_tag "application" %>
</head>

Expand Down
Loading

0 comments on commit b5f4791

Please sign in to comment.