なるようになるブログ

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

rails commit log流し読み(2018/05/02)

2018/05/02分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activestorage/CHANGELOG.md


Partly revert #32289 to provide Rails' custom fallback in case

railties/lib/rails/command/spellchecker.rbの修正です。

suggestメソッドでDidYouMean::SpellCheckerが使用出来るかチェックし、使用出来ない場合はレーベンシュタイン距離で計算したサジェストを出すよう修正しています。

did_you_meanが存在しないケースがある(did_you_meanはbundled gemで、普通にアンインストール出来る)為。


require "active_support/test_case" is not supported since 53e877f7

activerecord/test/cases/arel/helper.rbactiverecord/test/cases/test_case.rbの修正です。

テスト用にactive_support/test_caseをrequireしていたのを、active_supportをrequireするよう修正しています。

test_orderactive_supportに定義されてしまっており、active_supportをrequireしないとtest_orderが参照出来ずエラーになってしまう為。


Fix typo in ActiveRecord test method name

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

cachecashにタイポしている箇所があったのを修正しています。


Make sure that when serialing an just deserialized job arguments are there

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

ActiveJob::Core#serializeメソッドでargumentsをserializeする際に、argumentsがserialize済みかどうかをチェックし、既にserialize済みの場合、そちらの値を使い回すよう修正しています。

一度serializeしたjobを再度serializeした場合に、元のargumentsが取得出来るようにする為。


More exercise test_remove_named_index

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

違う定義のnamed indexを削除しようとするとエラーになることを確認するテストを追加しています。


Merge pull request #32784 from jpawlyn/allow-belongs-to-create-for-new-record

activerecord/lib/active_record/associations/has_one_association.rbactiverecord/lib/active_record/associations/singular_association.rbの修正です。

belong_to associationのobjectをnew record(保存していないrecord)から作成しようとするとエラーになっていたのを、作成出来るよう修正しています。


Remove unnecessary require

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

不要なrubygemsのrequireを削除しています。


Remove unused assert_like from Arel::Test

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

使用していないassert_likeメソッドを削除しています。


Support streaming downloads from Google Cloud Storage

activestorage/lib/active_storage/service/gcs_service.rbの修正です。

Google Cloud Storageでstreaming downloadを使用出来るよう修正しています。

google-cloud-storage gem側でstreaming downloadのサポートが入った為、なのですが、そちらの対応自体georgeclaghornによるものでした。

参考:Facilitate partial file downloads


Use https with weblog URI

weblog.rubyonrails.orgへのリンクをhttpsに修正しています。

GitHub Pagesでカスタムドメインhttpsが使用出来るようになった為。