2019/03/20分のコミットです。
CHANGELOGへの追加はありませんでした。
Update regular expression for checking valid MIME type
actionpack/lib/action_dispatch/http/mime_type.rb
の修正です。
Raise exception when building invalid mime typeで行われたmime typeのチェック処理で、パラメータが指定されていた場合の考慮(e.g. text/html; parameter"
)が不足していたのを修正しています。
Instrument middleware processing
actionpack/lib/action_dispatch/middleware/stack.rb
の修正です。
middleware生成時に使用する為のinstrument event(process_middleware.action_dispatch
)を追加しています。payloadにはmiddlewareのクラス名が含まれるようになっています。
Merge pull request #35660 from kamipo/sanitize_as_sql_comment
Active Recordの修正です。
sanitize_as_sql_comment
メソッドをSQL visitorからconnectionに移動しています。他の箇所でも使用出来るようにする為。
Merge pull request #35662 from jhawthorn/fallback_resolver_no_virtual_path
actionview/lib/action_view/template/resolver.rb
の修正です。
FallbackFileSystemResolver
のインスタンス生成時にvirtual_path
を渡さないよう修正しています。
以前はdecorate
メソッドでvirtual_path
が削除されるようになっていたのですが、Don't mutate virtual_path
, remove decorate
でdecorate
メソッドが削除された影響でvirtual_path
が渡されるようになっていました。
これにより、rails-controller-testing
gemの挙動に影響を与えてしまった為、元の挙動を維持するよう修正しています。
参考:Allow assert_template(file:) to work using Rails 6
Merge pull request #35664 from jeremyevans/remove-roflscaling
Active Recordの修正です。
GROUP BY
やWHERE
等のSQLクエリー使用時に使用する文字列を定数で保持していたのを、定数を使用しないよう修正しています。
元々不要なオブジェクトが生成されるのを避けるために定数を使用していたのですが、frozen string literalsが使用される事になった事で、定数で保持するメリットが無くなった為。
railties/lib/rails/generators.rb
の修正です。
javascripts
、及び、javascript_engine
オプションを削除した、Remove javascripts
and javascript_engine
options for generatorsをRevertしています。
coffee-railsを引き続き使用するような場合に、これらのオプションが無いとgeneratorで正しくファイルの生成が出来ないため。
が、修正する箇所に誤りがあり、後ほどRevertされています。
Re-add Template#updated_at as deprecated
actionview/lib/action_view/file_template.rb
、
actionview/lib/action_view/template.rb
の修正です。
Make Template::Resolver always cacheで削除されたActionView::Template#updated_at
を、再度指定出来るよう修正しています。
openになっているattributeだった為、いきなり削除ではなく、まずはdeprecateメッセージを表示するようにしています。
Fix test broken by 04ae0b0b5e594e0bb99c5cd608921745977bcdcd
actionpack/test/controller/show_exceptions_test.rb
の修正です。
Instrument middleware processingの対応の影響で、ActionDispatch::ShowExceptions
のテストがエラーになってしまっていたのを修正しています。
Revert "Revert "Remove javascripts
and javascript_engine
options for generators""
javascripts
、及び、javascript_engine
オプションを削除した、Remove javascripts
and javascript_engine
options for generatorsをRevertした、Merge pull request #35656 from larouxn/revert-34277-remove-javascripts-javascripts_engine-options-for-generatorsをRevetしています。
修正する箇所に誤りがあった為。
Merge pull request #35595 from shioyama/generated_attribute_methods_namespaced_constant
activerecord/lib/active_record/attribute_methods.rb
の修正です。
GeneratedAttributeMethods
moduleをmodelのnamespace配下で生成するよう修正しています。
# Before User.send(:generated_attribute_methods) # => #<ActiveRecord::AttributeMethods::GeneratedAttributeMethods:0x000056275f3c2aa8> # After User.send(:generated_attribute_methods) # => User::GeneratedAttributeMethods
GeneratedAssociationMethods
はmodelのnamespace配下で生成するようになっており、挙動を合わせる為。
Merge pull request #35649 from andrehjr/fix-override-of-cookies-controller-specs
actionpack/lib/action_dispatch/middleware/cookies.rb
の修正です。
CookieJar#update_cookies_from_jar
で既に設定済みのkeyについては上書きしないよう修正しています。
Add mention about process_middleware.action_dispatch
in the guide [ci skip]
rails guideのActive Support Instrumentation
の修正です。
Instrument middleware processingで追加されたprocess_middleware.action_dispatch
eventについてguiden説明を追加しています。
Make aliases of database
option in generators work
Refactor migrations_path command option to databaseで追加されたgeneratorのdatabase
オプションの、aliasであるdb
オプションが指定しても動作しないバグがあったのを修正しています。