2018/09/21分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #33925 from rafaelfranca/rm-fix-column_defaults
activerecord/lib/active_record/model_schema.rb
の修正です。
column_defaults
メソッドでdefault attributesをcopyする際に、deep_dup
メソッドを使用するよう修正しています。
attributeのdefault
にProcを使用している場合に、そのProcがcolumn_defaults
呼び出し時に評価されるようにする為。
Merge pull request #33112 from yahonda/ci_postgresql10
.travis.yml
の修正です。
CIで使用するPostgreSQLのバージョンを10系に修正しています。
Make assert_<enqueued|performed>_with()
compare hashes ignoring order of keys
activejob/lib/active_job/test_helper.rb
の修正です。
assert_enqueued_with
、assert_performed_with
メソッドで、args
オプションに指定した値とjobに指定されたargumentsが一致しているかどうかチェックする際に、値の順番が異なっても問題無いよう修正しています。
元々は、
assert_enqueued_with job: KwargJob, args: [{a: 1, b: 1}] do KwargJob.perform_later(b: 1, a: 1) end
のassertがパスしなかった({a: 1, b: 1}
と{b: 1, a: 1}
が一致しているとみなされなかった)のですが、このような場合でも問題無いようになっています。
Use utf8mb4 in all tests and examples
Active Recordの修正です。
各docやテストで使用するcharsetを全てutf8mb4
に変更しています。
utf8mb4
が使えないMySQL 5.1はMerge pull request #33853 from yahonda/use_utf8mb4_only_if_availableでサポートしなくなり、utf8
を使用する必要は無いため。
Merge pull request #33891 from jgorman/remote_names
rails guideのContributing to Ruby on Rails
の修正です。
Contributing to the Rails Code
の項で使用しているgitのリモートリポジトリの名称が統一されていなかったのを修正、及び、不要なpush処理等の削除を行っています。
Correct spelling in "Contributing to Ruby on Rails" guide [ci skip]
rails guideのContributing to Ruby on Rails
の修正です。
ambiguity
をambigity
にタイポしていたのを修正しています。
Merge pull request #33906 from dark-panda/ignore-psqlrc-when-using-psql
activerecord/lib/active_record/tasks/postgresql_database_tasks.rb
の修正です。
PostgreSQL adapterでdb系タスクを実行する際に、~/.psqlrc
ファイルを読み込まないよう修正しています。
.psqlrc
ファイルにユーザの入力が必要なコマンド(e.g. \pset pager
)等が定義されている場合に、タスクの実行の妨げになってしまう事がある為、それを避ける為、との事です。
Fix missing curly brace in documentation
activerecord/lib/active_record/associations.rb
のdocの修正です。
has_and_belongs_to_many
メソッドのdoc内のexampleコードで、閉じ括弧が不足している箇所があったのを修正しています。
Add missing test case for redirect_to
when request includes a port.
actionpack/test/controller/redirect_test.rb
の修正です。
request hostにportが含まれている場合に、redirect_to
メソッドが生成するURLにもportが含まれる事を確認するテストを追加しています。
Merge pull request #33922 from schneems/schneems/collection-caching-easier-to-understand
actionview/lib/action_view/renderer/partial_renderer/collection_caching.rb
のdocの修正です。
各処理にドキュメントを追加しています。
Replace line items with chapters [ci skip]
rails guideのActive Record Associations
の修正です。
exmapleコードのLineItem
クラスをChapter
クラスに変更しています。
関連付けするクラスが、Association Guide replaces Order as example with Author-Book Example …でOrder
からBook
に変更になっており、Book
と関連付けするクラスがLineItem
なのはおかしいだろう、という事でChapter
に変更されました。
Merge pull request #33932 from schneems/schneems/recyclable-key-support-cache
Active Support、railtiesの修正です。
cache versioningをサポートしていないcache storeを使用している(e.g. dalli_store
)、かつ、cache versioningを有効化している場合に、使用しているcache storeではcaching versioningは使用出来ない旨エラーをraiseするよう修正しています。