Hi, it’s zzak, happy 節分! I’m very excited for spring, this winter has been tough!
Let’s get into this week’s changes in the Rails codebase.
Use infinitive form for all task descriptions verbs
All the common rails commands and some extended commands use the infinitive form for the verb in the description:
“Generate …”, “Start …”, “Run …”, instead of “Generates …”, “Starts …”, “Runs …”.
This changes the remaining tasks to use the infinitive form for the verb as well, for consistency.
ActiveRecord::QueryLogs: handle invalid encoding
It can sometimes happen that sql is encoded in UTF-8 but contains some invalid binary data of some sort.
When this happens strip ends up raising an EncodingError.
Run test:prepare unless exact tests are specified
This PR changes bin/rails test to always run test:prepare unless exact tests are specified via path arguments (e.g. bin/rails test path/to/test.rb) or a name pattern (e.g. bin/rails test -n test_foo).
Deprecate AbstractController::Helpers::MissingHelperError
This error used to be a wrapper for a LoadError raised when require_dependency was used to load helpers for controllers.
Since Zeitwerk does not use require_dependency, the only usage of this error was removed.
Deprecate ActionDispatch::IllegalStateError
This error was intended to be a guard to prevent mutating response headers after the response was already sent.
However, it didn’t really fulfill this purpose and was removed to make way for Rack 3 support.
A mountain of CLI and help command fixes
Jonathan Hefner contributed a bunch
of great patches for the Rails CLI.
Including the help text for secrets,
encrypted, and
credentials commands.
Lastly, all base
and bare namespaced commands were improved,
and “Did you mean?” was added for unrecognized commands!
You can view the whole list of changes here.
We had 24 contributors to the Rails codebase this past week!
Until next time!
Subscribe to get these updates mailed to you.