-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for Rails 8 #479
Update for Rails 8 #479
Conversation
4e7fb36
to
b48958b
Compare
b48958b
to
bd9dc2e
Compare
.rubocop.yml
Outdated
@@ -10,7 +10,7 @@ AllCops: | |||
NewCops: disable | |||
SuggestExtensions: false | |||
Exclude: | |||
- "test/dummy/db/**/*.rb" | |||
- "test/dummy/**/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't care about styling in the dummy app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
99aa3ed
to
7d83ae8
Compare
@@ -315,7 +315,7 @@ def index | |||
uri = response[0].command.arguments.first.first | |||
|
|||
assert_match("GET /users(.:format)", response[0].command.title) | |||
assert_match("config/routes.rb#L4", uri) | |||
assert_match("config/routes.rb#L3", uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line number have changed because routes.rb
no longer has # frozen_string_literal: true
.
9aba385
to
0bdd5e1
Compare
@@ -7,7 +7,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |||
gemspec | |||
|
|||
gem "puma" | |||
gem "sqlite3", "< 2" | |||
gem "sqlite3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2 was causing an issue with Rails 7 previously
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're up to RC2 now, but I will hold off updating until the proper release is out.
4653631
to
4eb2491
Compare
I've marked this as Ready for Review, however there are 2 tests which are failing only in CI and I cannot figure out why 😭 . |
Ah, it's related to the |
4eb2491
to
af30614
Compare
.rubocop.yml
Outdated
@@ -10,7 +10,7 @@ AllCops: | |||
NewCops: disable | |||
SuggestExtensions: false | |||
Exclude: | |||
- "test/dummy/db/**/*.rb" | |||
- "test/dummy/**/*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
ec3a221
to
7abfad3
Compare
My original intention was to have keep the dummy app as unchanged as possible, so as to minimize the work needed when regenerating it, but we can stick with the current approach. |
@@ -186,8 +186,8 @@ def baz; end | |||
URI::Generic.from_path(path: File.join(dummy_root, "config", "routes.rb")).to_s, | |||
response[0].uri, | |||
) | |||
assert_equal(3, response[0].range.start.line) | |||
assert_equal(3, response[0].range.end.line) | |||
assert_equal(4, response[0].range.start.line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line numbers changed because the generated routes.rb
has a new comment.
@@ -1,5 +0,0 @@ | |||
# typed: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(just noticed this was unintentionally removed, looking into whether to restore)
c96a17a
to
b384651
Compare
b384651
to
8fe81ac
Compare
Re-verified against code-db and Core with the latest changes. |
Closes #468
There are two main things here:
I re-generated the dummy app with
bundle exec rails plugin new
then did some manual clean-up. There are more files than previously, but I think this is fine since otherwise we would need to clean these up on on every Rails update.Due to Rails 8 changes, we now have to explictly eager load the routes.I verified against code-db which is on Rails 7.2.