なるようになるブログ

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

rails commit log流し読み(2018/04/29)

2018/04/29分のコミットです。

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


[ci skip] update ActiveStorage documentation

rails guideのActive Storage Overviewの修正です。

File/IO Objectsをattachする場合の説明や、ファイルをダウンロードする方法の説明、及び、他のJSのライブラリと一緒に使用する場合の説明等を追加しています。


Merge pull request #32747 from printercu/improve_t_helper

actionview/lib/action_view/helpers/translation_helper.rbの修正です。

TranslationHelper#translateメソッドでdefaultオプションが指定されていない場合に、不要なオブジェクトを生成しないよう修正しています。


Fix Associations::ClassMethods doc [ci skip]

activerecord/lib/active_record/associations.rbのdocの修正です。

Associations:ClassMethodsのdocに、定義されない#association.nil?メソッドについての例があったのを削除、及び、各メソッド毎にttタグで囲むよう修正しています。


Restore original merging order to enforce if_exists: true

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

2.6 warnings: passing splat keyword arguments as a single Hashの対応で、create_tableforceオプションが指定された場合にif_exists: trueが強制的に指定されなくなってしまった(オプションにif_existsが指定されていたら、そちらが使用されてしまう)のを、元の挙動(必ずif_exists: trueを指定する)に戻しています。


We usually do not use GH#1234 style in the CHANGELOGs [ci skip]

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

Updating the CHANGELOGの項、issueを修正した際のエントリーの書き方の例を修正しています。

-    You can continue after the code example and you can attach issue number. GH#1234
+    You can continue after the code example and you can attach issue number. Fixes #1234.

今は通常GH#xxxという書き方はしていない為。


Swap assertion order for better reporting

railties/test/generators/app_generator_test.rbの修正です。

test_system_tests_directory_generatedtest/systemディレクトリの存在チェックの前にtest/system/.keepの存在チェックをしていたのを、test/systemディレクトリの方を先にチェックするよう修正しています。


Make Railties CI log for Ruby 2.6 accessible again

Gemfileの修正です。

thorのmasterブランチを使用してテストを実行するよう修正しています。ERB.newの引数指定によるdeprecateが表示されるのを避ける為。


Stream blobs from disk in 5 MB chunks

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

DiskService#downloadメソッドでstreaming downloadする際に、一度にファイルを読み込むサイズを64KBだったのを、5MBに修正しています。他のserivceと合わせる為。


Improve the performance of ActiveSupport::Inflector.ordinal

activesupport/lib/active_support/locale/en.rbの修正です。

ActiveSupport::Inflector.ordinalメソッドで、引数のnumberが1..13の場合に、値を決め打ちで返すよう修正しています。パフォーマンス改善。


Avoid duplicating downloads from Google Cloud Storage in memory

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

GCSService#downloadメソッドで、bodyを取得するのにreadメソッドを使用していたのを、stringメソッド使用するよう修正しています。

不要なオブジェクトの生成を避ける為。