2019/12/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Fix system test driver option initialization for non-headless browsers.
- Bring back the feature that allows loading external route files from the router.
Switch to the writer DB to generate ASt previews
activestorage/app/models/active_storage/preview.rb
の修正です。
Active Storageのpreviewを生成する際にwriting_role
に接続してから生成するよう修正しています。
previewの生成はGETリクエストで行われるが、DBへの書き込み処理が呼ばれるので、明示的にwriting_role
を指定しないとreading_role
に接続されてしまいエラーになってしまう為。
perform_caching config affects collection caching
actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
の修正です。
cached partialをrenderする際に、config.action_controller.perform_caching
を参照して、config.action_controller.perform_caching
がfalseの場合はrenderしないよう修正しています。
Upgrade listen to 3.2.1 for darwin fixes
Gemfile.lock
の修正です。
listen
gemのバージョンを3.2.1に更新しています。
listen
3.2.0にdarwin adapterでディレクトリ毎にfsevent_watch
processが生成されてしまう、という問題があった為。
参考: Use one fsevent_watch
process per listener instead of one per dir
Use ActiveStorage::Preview#url instead of deprecated #service_url
activestorage/app/controllers/active_storage/representations_controller.rb
の修正です。
deprecatedになったActiveStorage::Preview#service_url
メソッドを使っていた箇所があったのを#url
メソッドを使うよう修正しています。
Merge pull request #37853 from tgxworld/use_proper_file_watcher
railties/lib/rails/application.rb
、
railties/lib/rails/application/routes_reloader.rb
の修正です。
RoutesReloader
(config/routes.rb
のリロード処理用クラス)で使用するファイル更新チェック用のクラスがActiveSupport::FileUpdateChecker
固定だったのをconfig.file_watcher
を使用するよう修正しています。更新チェック用のクラスにActiveSupport::EventedFileUpdateChecker
を使用出来るようにする為。
が、ActiveSupport::EventedFileUpdateChecker
は監視がディレクトリ単位で行われる、という仕様があり、config/routes.rb
を監視対象とするとconfig
ディレクトリが監視対象になってしまいます。その場合、予期せにファイルまで監視対象になってしまう、という問題が発生するほど、後ほどRevertされています。
Merge pull request #37792 from glaszig/fix/actiondispatch/non-headless-driver-options
actionpack/lib/action_dispatch/system_testing/browser.rb
、
actionpack/lib/action_dispatch/system_testing/driver.rb
の修正です。
system testでnon-headless driversを使用している場合に、driven_by
のblockで指定したオプションが正しくdriverに指定されないバグがあったのを修正しています。
Revert "Use app.config.file_watcher
for watcher in RoutesReloader
"
RoutesReloader
で使用するファイル更新チェック用のクラスがActiveSupport::FileUpdateChecker
固定だったのをconfig.file_watcher
を使用するよう修正した、Merge pull request #37853 from tgxworld/use_proper_file_watcherをRevertしています。理由は先述の通り。
unlinks Ruby on Rails Tutorial [skip ci]
docの修正です。
各docからRuby on Rails Tutorialへのリンクを削除しています。Ruby on Rails Tutorialは元々はオンラインで無料で参照する事が出来る為、リンクを公式ドキュメントに入れていました。しかし、現在は無料ではすべてのコンテンツを参照する事が出来なくなっており、ほぼ有料コンテンツだけになってしまいました。そのため、他の有料の書籍等と公平に扱う為、リンクを削除したとの事です。
Bring back feature that allows loading external route iles:
actionpack/lib/action_dispatch/routing/mapper.rb
、
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
routerで外部ファイルに定義したrouteをロードするためのdraw
メソッドを追加しています。
config/routes/admin.rb
というファイルにrouteが定義されていた場合、config/routes.rb
でdraw(:admin)
とすると、confi/routes/admin.rb
に定義されているrouteがrouterに追加されるようになっています。
2012年にRevertされた機能(Revert "Allow loading external route files from the router")の再コミット。
Remove extraneous begin..end
around single case
statement
actionpack/lib/action_dispatch/system_testing/browser.rb
の修正です。
initialize_options
メソッドから不要なbegn..end
を削除しています。