2019/09/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
Optimize Module#delegate to no longer be linear
activesupport/lib/active_support/core_ext/module/delegation.rb
の修正です。
Module#delegate
メソッドでdelegate処理をする毎にmodule_eval
を実行していたのを、極力module_eval
の呼び出しを行わずにすむようリファクタリングしています。
Merge pull request #37139 from Shopify/define-url-helper-patch
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
UrlHelper.optimize_helper?
でrouteのglob?
より先にroute.path.requirements.empty?
のチェックを行うよう修正しています。
(routingの内容によりますが)glob?
は遅くなる事が多く、empty?
チェックを先にする事で性能改善する事がある為。
Implement content disposition in direct upload
Active Storageの修正です。
クラウドサービスにdirect uploadを行う際に、ヘッダーにcontent dispositionを含むよう修正しています。
Fix comments to update mysql version in reference URL [ci skip]
activerecord/lib/arel/visitors/mysql.rb
、
activerecord/test/cases/arel/visitors/mysql_test.rb
のdocの修正です。
MySQLのdocへのリンクのバージョンを5.0(https://dev.mysql.com/doc/refman/5.0/en)から8.0(https://dev.mysql.com/doc/refman/8.0/en)に更新しています。
railties/lib/rails/generators/rails/app/templates/Gemfile.tt
の修正です。
rails new
で生成されるGemfile
内のCapybaraのバージョン指定を>= 3.26
に修正しています。Stop setting a default Capybara app hostでCapybara 3.26以上がsysem testで必要になっている為。
Unify AR touch method signatures
Active Recordの修正です。
touch
メソッドの引数定義を全てのクラス / モジュールで同じになるよう修正しています。
Revert "send with **options only when options is not empty"
RequestHelpersのメソッドを呼びだす際にoptions
が空でない場合にのみoptions
を指定するよう修正した、send with **options only when options is not emptyをRevertしています。
Ruby側で修正が入り空の場合でもエラーにならなくなった為。が、Ruby 2.5、2.6では動作しない(エラーになる)為、後ほどRevertされています。
AR save takes keyword arguments
activerecord/lib/active_record/suppressor.rb
の修正です。
save
メソッドでキーワード引数を受け取れるようメソッド定義を修正しています。
Passing in a Hash instance as kwargs parameters requires the "double splat" prefix
activerecord/lib/active_record/railties/collection_cache_association_loading.rb
の修正です。
Hashをキーワード引数として渡す箇所にdouble splatの指定を追加しています。
Include kwargs definition in the generated method signatures and method calls
activemodel/lib/active_model/attribute_methods.rb
の修正です。
attribute methodsでキーワード引数を受け取れるよう修正しています。が、これによりテストがコケるようになってしまった為、後ほどRevertされています。
Keyword arguments is not a Hash
activestorage/lib/active_storage/service/disk_service.rb
の修正です。
キーワード引数を渡す際にHashとして渡していたのを、Hashではなくそのままキーワード引数として渡すよう修正しています。
Revert "Revert "send with **options only when options is not empty""
Revert "send with **options only when options is not empty"を再度Revertしています。
Refactor define_url_helper
to share the same instance between path and url
actionpack/lib/action_dispatch/routing/route_set.rb
の修正です。
path helperとurl helperを定義するのにそれぞれ事なるUrlHelper
のインスタンスを使用していたのを、同じインスタンスを使い回すようリファクタリングしています。
Revert "Include kwargs definition in the generated method signatures and method calls"
attribute methodsでキーワード引数を受け取れるよう修正した、Include kwargs definition in the generated method signatures and method callsをRevertしています。