2017/08/13分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Test for the new exception of delegate_missing_to (#30191)
activesupport/lib/active_support/core_ext/module/delegation.rb
の修正です。
Module#delegate_missing_to
メソッドで、targetがnilの場合、DelegationError
をraiseするよう修正しています。
Merge pull request #30209 from kamipo/remove_duplicated_table_name
activerecord/lib/active_record/reflection.rb
の修正です。
PolymorphicReflection#table_name
、RuntimeReflection#table_name
メソッドを削除しています。親クラスのAbstractReflection#table_name
と実装が同じで、親クラスのメソッドを使えば済むため。
Use references
to respect primary key type in active storage tables
activestorage/db/migrate/20170806125915_create_active_storage_tables.rb
の修正です。
record_id
、blob_id
を格納するカラム名の型がintegerになっていたのを、references
メソッドを使用するよう修正しています。
PostgreSQL / MySQLではprimary keyの型はbigintになっている等adapter毎にprimary keyの型が違う為、adapterに合わせた適切な型が使用されるようreferences
メソッドを使用しています。
Delegate to Enumerable#find
for CollectionProxy
activerecord/lib/active_record/associations/collection_association.rb
の修正です。
CollectionProxy#find
メソッドで、引数にblockが与えられた場合に、単純にsuper
を呼び出すだけに済むようりファクリングしています。
Rellation
はEnumerable
をincludeしており、super
を呼べばEnumerable#find
が使える為。
Merge pull request #30079 from kamipo/move_test_not_compatible_with_serialize_macro
activerecord/test/cases/adapters/postgresql/json_test.rb
、
activerecord/test/cases/json_shared_test_cases.rb
の修正です。
PostgresqlJSONSharedTestCases
に定義されていたtest_not_compatible_with_serialize_macro
をJSONSharedTestCases
クラスに移動しています。
MySQLの方のJSONテスト用のクラス(Mysql2JSONTest
)でもテストが実行されるようにする為。
Fix random CI failure due to non-deterministic sorting order
activerecord/test/cases/scoping/named_scoping_test.rb
の修正です。
assertionで値を比較する際に、値をidでsortするよう修正しています。
sortを指定していと結果が不定になり、seedによってはテストが失敗してしまう為。
Merge pull request #30211 from koic/frozen_activestorage
Active Storageの修正です。
各ファイルの先頭にfrozen_string_literal: true
を指定、及び、 Stringを変更する箇所でdup
を呼び出す等行い、エラーにならないよう対応しています。
Wait for the Delayed Job worker thread to finish
activejob/test/support/integration/adapters/delayed_job.rb
の修正です。
Delayed Jobのworkerを停止する際に、スレッドが終わるまで処理をまつよう修正しています。
Use frozen string literal in guides/
guides
ディレクトリ配下のファイルの先頭にfrozen_string_literal: true
を指定しています。
Use frozen string literal in tasks/
tasks
ディレクトリ配下のファイルの先頭にfrozen_string_literal: true
を指定しています。
Use frozen string literal in tools/
tools
ディレクトリ配下のファイルの先頭にfrozen_string_literal: true
を指定しています。
Use frozen string literal in ci/
ci
ディレクトリ配下のファイルの先頭にfrozen_string_literal: true
を指定しています。
Use frozen string literal in root files
ルートディレクトリ配下のファイルの先頭にfrozen_string_literal: true
を指定しています。