Conversation
| redirect_to edit_admin_profile_path, notice: 'Password updated' | ||
| else | ||
| render 'admin/profile/edit', status: :unprocessable_entity | ||
| render 'admin/profile/edit', status: :unprocessable_content |
There was a problem hiding this comment.
Fixes a Rack deprecation warning
| 'Standard' => false, | ||
| 'Stylelint' => false | ||
| } | ||
| puts 'DEPRECATION WARNING: bin/test is deprecated. Use bin/ci instead.' |
There was a problem hiding this comment.
I wrote this script originally, serves the same purpose as the new inbuilt DSL
There was a problem hiding this comment.
Auto generated todo file. Can now pass and warn on newly introduced issues instead
| # Run using bin/ci | ||
|
|
||
| CI.run do | ||
| # TODO: Consider adding bin/setup |
There was a problem hiding this comment.
Bundler / npm audit are new, the rest are based on the previous bin/test command
| gem 'class_variants', '~> 1.1' | ||
| gem 'cssbundling-rails', '~> 1.4' | ||
| gem 'devise', '~> 4.9' | ||
| gem 'devise', '~> 5.0' |
There was a problem hiding this comment.
Bumped to fix a deprecation warning for passing hashes to routes
| gem 'stimulus-rails', '~> 1.3' | ||
| gem 'turbo-rails', '~> 2.0' | ||
| gem 'view_component', '~> 4.0' | ||
| gem 'view_component', '~> 4.5' |
There was a problem hiding this comment.
Bumped to fix a deprecation warning about the removal of ActiveSupport::Configurable
This commit: * Bump Rails version and run upgrade task * Bump brakeman and ignore existing warnings * Fix Rack :unprocessable_entity deprecation warning * Bump Devise to resolve routing deprecation warnings * Bump ViewComponent to fix ActiveSupport::Configurable Deprecation * Toggle on new framework defaults + update snapshots * Add new local CI DSL and align to our current scripts * Add bundler and npm security audits to CI script
65f2127 to
adb6d87
Compare
JoshDevHub
left a comment
There was a problem hiding this comment.
Seems awesome to me 👍
Two minor changes to suggest in .rubocop.yml:
- The Target Rails Version should be bumped.
- We'd temporarily disabled the
HttpStatusNameConsistencycop (it looks forunprocessable_contentinstead ofunprocessable_entity). Since you've converted the codebase over tounprocessable_content, that cop should be re-enabled.
|
I think an update to the testing section of the CONTRIBUTING guide could be nice too. It was already out of sync with the commands necessary to pass CI, but with this, you should be able to simplify down to telling contributors to run |
Good call, I'll add. I was unsure where the canonical instructions lived anymore, since there's been a bit of drift between the wiki / various contributing files |
Good catch 👌
For context, Rack is just aligning with RFC 9110 It looks like Rails already handles status code transforms, but there are parts of Devise where this doesn't happen. We could keep using the old status code by changing a setting in the Devise initialiser instead, but it seems more future proof to just align with Rack. It was fairly painless to make the switch |
Yeah I think it's fine to use the new code. The only rub for me is that Rails itself (like you said) makes sure Rack receives the code it wants even if you write But yeah, I think it's sensible to change still because other tools (Devise, RSpec, etc.) don't seem to be doing the same transform in their interactions with Rack. Plus it's an autocorrectable offense so even if someone scaffolds or copies some stuff from the docs, it can be cleaned up with a simple |
Chore: Upgrade to Rails 8.1
This commit: