2020/01/08分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fix railties changelog indent / code blocks [ci skip]
railties/CHANGELOG.md
の修正です。
各エントリーのインデントの修正、exampleコードのcode blockにlangの指定等を行っています。
Merge pull request #37955 from Manfred/named-routes-metal-integration
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
integration testsでActionController::Metal
を継承したcontrollerにアクセスした場合にNoMethodError
で落ちてしまっていたのを修正しています。
Defaults content_type to application/octet-stream
activestorage/app/assets/javascripts/activestorage.js
、
activestorage/app/javascript/activestorage/blob_record.js
の修正です。
Active Storageのdirect uploadでデフォルトのcontent typeとしてapplication/octet-stream
を指定するよう修正しています。content typeが取得出来なかった場合にもupload処理が行えるようにする為。
restores the ability to manually eager load applications
railties/lib/rails/application.rb
、
railties/lib/rails/engine.rb
の修正です。
zeitwerkを使用している場合、Rails::Application#eager_load!
明示的呼び出しても、eager loadがされないようになっていたのを、Rails 5.2まで同様にeager loadされるよう修正しています。
config.eager_load
の設定がfalseでも、gem等で強制的にeager loadを実行したい、というユースケースがある為、5.2までと同様に動作するようにしています。
Bump image_processing gem version since it fixes ruby 2.7 warnings
Gemfile.lock
の修正です。
image_processing gemを1.10.1に更新しています。Ruby 2.7でwarningが表示されるのを避ける為。
railties/test/application/zeitwerk_integration_test.rb
の修正です。
rubocopの設定に違反している箇所があったのを修正しています
Restore previous behavior of parallel test databases
Active Recordの修正です。
Pass env_name as a string in test databasesでtest用DBのセットアップをする際にnon-replicaの設定をconfigurationsの最後に追加するようにしたのですが、establish_connection
は引数指定なしで呼び出した場合configurationsの最初の値を使用する為、結果テスト時に予期せずreplicatの設定が使用されてしまう、という問題が発生していた為、configurationsの設定の変更は行わないよう修正しています。
Add AC::TestSession#dig method like AD::Request::Session
actionpack/lib/action_controller/test_case.rb
の修正です。
ActionDispatch::Request::Session#dig
と同様に、ActionController::TestSession
にdig
メソッドを追加しています。
Memoize regex when checking missing route keys
actionpack/lib/action_dispatch/journey/formatter.rb
、
actionpack/lib/action_dispatch/journey/path/pattern.rb
の修正です。
route keysの不足をチェックするための正規表現のオブジェクトがパラメータ毎に生成されていたのを、一度生成した値を保持してそれを使いまわすよう修正しています。
Merge pull request #38118 from mkrfowler/reduce_preloaded_records
activerecord/lib/active_record/associations/preloader/association.rb
の修正です。
has_one
経由でpreloadを行った場合に、後から破棄される不要なレコードまでロードされてしまっていたのを、不要なレコードはロードしないよう修正しています。
Remove method encode from url_test in Actionmailer:
actionmailer/test/url_test.rb
の修正です。
使用されていないencode
メソッドを削除しています。
Deprecate using Range#include?
to check the inclusion of a value in a date time range
activesupport/lib/active_support/core_ext/range/include_time_with_zone.rb
の修正です。
date time rangeに値が含まれているかをチェックするのにRange#include?
を使用するのがdeprecateになりました。今後はRange#cover?
を使用する必要があります。
Range#include?
では、値をただしくチェック出来ない(include?
はrangeのメンバーであるかどうかをチェックするためのメソッドで、値が指定された範囲内かどうかをチェックするにはcover?
を使用する必要がある為)。