なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2018/11/09)

2018/11/09分のコミットです。

CHANGELOGへの追加はありませんでした。


PostgreSQL: Properly quote all Infinity and NaN

activerecord/lib/active_record/connection_adapters/postgresql/quoting.rbの修正です。

PostgreSQL adapterでInfinityNaNを適切にクォートするよう修正しています。


Test prepared statement cache only if prepared statements is enabled

activerecord/test/cases/hot_compatibility_test.rbの修正です。

prepared statement cacheに関するテストは、prepared statementsが有効になっている時だけ行うよう修正しています。


Refactor to initialize TableDefinition by kwargs

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbactiverecord/lib/active_record/connection_adapters/abstract/schema_statements.rbの修正です。

TableDefinition#initializeでキーワード引数を使用するようリファクタリングしています。


Deprecate t.indexes = [...] which is not by design

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbの修正です。

migration fileでindexを定義するのにt.indexes=が使用出来たのをdeprecateにしています。

予期せず使用出来るようになってしまっていた為。t.indexes=を仮に使用していた場合、t.indexを使用してください。


Use the same version of Rubocop as Code Climate

Gemfile.lockの修正です。

Rubocopのバージョンを0.60.0に更新しています。 Code Climateで使用されるRubocopと同じバージョンのRubocopを使用出来るようにする為。


Add test for parallel tests with unmarshable exception

railties/test/application/test_runner_test.rbの修正です。

parallel testsでmarshal出来ないExceptionが発生した場合に、正常に結果が表示される事を確認するテストを追加しています。


Restore private_constant which is lost accidentally in #30941

activejob/lib/active_job/arguments.rbの修正です。

ActiveJob::Arguments module内のGLOBALID_KEYSYMBOL_KEYS_KEYWITH_INDIFFERENT_ACCESS_KEY定数の可視性をprivateにしています。

元々privateだったのですが、Introduce custom serializers to ActiveJob argumentsの対応の際に誤ってpublicになってしまっていたので、再度privateに戻しています。


Docs: Update Development Dependencies Install

rails guideのContributing to Ruby on Railsの修正です。

Running Testsのセクションに、For a Specific DirectoryFor a Specific Fileの項を追加し、それぞれ特定のディレクトリ配下のテストをまとめて実行する方法、特定の一ファイルのテストのみ実行する方法、についての説明を追加しています。


Clarify the validation of present associations

rails guideのActive Record Validationsの修正です。

presence validatorについて説明している箇所に、foreign keyが空かどうかだけではなく、参照先のオブジェクトが存在するかどうかもチェックしている旨説明を追加しています。