2016/02/25分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Update default rendering policies when the controller action did not explicitly indicate a response.
[ci skip] Move collection caching changelog entry.
actionview/CHANGELOG.md
の修正です。
collection cachingの対応についのてentryが、Rails 5.0.0.beta2
の下にあったのをRails 5.0.0.beta2
の上に移動しています。対応が入ったのは。 beta2リリース後の為。
Prep release for Rails 5 beta3
各コンポーネントの修正です。
バージョンをbeta2
からbeta3
に更新しています。rcの前にbeta3がリリースされたんですねえ。
Enable tmp_restart plugin for puma
railties/lib/rails/generators/rails/app/templates/config/puma.rb
の修正です。
development環境で、bin/rails restart
でpumaをrestart出来るよう、デフォルトのpumaのconfigにplugin :tmp_restart
を追加しています。
rails guideのRuby on Rails 5.0 Release Notes
の修正です。
Action Mailerのviewでcacheが使用出来るようになった対応、及びconfigにconfig.action_mailer.perform_caching
を追加した対応(どちらもPRはCache mailer view by st0012 · Pull Request #22825 · rails/rails)について、Release Notesに追加しています。
Preparing for 5.0.0.beta3 release
CHANGELOGの先頭に、Rails 5.0.0.beta3 (February 24, 2016)
セクションを追加しています。
Add ActionMailer configuration options
rails guideのConfiguring Rails Applications
の修正です。
config.action_mailer.perform_caching
についての説明を追加しています。
Add caching guide in ActionMailer basics
rails guideのAction Mailer Basics
の修正です。
Caching mailer view
の項を追加しています。名前の通りで、mailer viewでのcacheのやり方についての説明が記載されています。
Do not define methods in the included block
activejob/lib/active_job/test_helper.rb
の修正です。
ActiveJob::TestHelper
moduleでメソッドを定義するのに、不要なincluded
があったのを削除しています。
Fix ActionView's cache section reference
rails guideのAction View Overview
の修正です。
Cache mailer view by st0012 · Pull Request #22825 · rails/railsでCaching::Fragments
がActionController::Caching::Fragments
からActionDispatch::Caching::Fragments
に移動したので、その内容をdocに反映しています。
が、ActionDispatch::Caching::Fragments
ではなく、AbstractController::Caching::Fragments
が正しく、後ほど再度修正されています。
Add Ruby formatting to CHANGELOG entry
actioncable/CHANGELOG.md
の修正です。
entry内のRailsのメソッド名にエスケープ("`")を追加しています。
Fix wording and wrong reference
guides/source/5_0_release_notes.md
、
guides/source/action_view_overview.md
の修正です。
Action View
をActionView
に誤っていたのを修正、及びAbstractController::Caching::Fragments
をActionDispatch::Caching::Fragments
と誤って記載していたのを合わせて修正しています。
Don't put config.action_mailer.perform_caching entry twice in development.rb
railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
の修正です。
config.action_mailer.perform_caching
が同じ内容で2回記載されていたので、一度だけ記載するよう修正しています。
changes caching guide to add note on weak etags
rails guideのCaching with Rails: An Overview
の修正です。
weak ETagsについて説明しているA note on weak ETags
セクションを追加しています。
Updated file documentation [ci skip]
rails guideのCaching with Rails: An Overview
の修正です。
先ほど追加されたA note on weak ETags
セクションのグラマーの修正を行っています。
actionview/lib/action_view/lookup_context.rb
の修正です。
使用していないempty?
メソッドを削除しています。
Ensure suppressor runs before validations
activerecord/lib/active_record/suppressor.rb
の修正です。
Active Recordのsuppress処理をvalidationの前に実行するよう修正しています。
元々はrecordのsave / update時のみsuppressを行っており、validation処理でエラーになった際にエラーが発生していたのですが、保存しないrecordなので、validationでエラーを起こす必要は無いだろう、という事で修正したようです。
Merge pull request #23866 from abhishekjain16/document
actionpack/lib/action_dispatch/journey/route.rb
、
actionpack/lib/action_dispatch/routing/inspector.rb
の修正です。
routes表示用のコマンドがrake routes
になっていたのを、rails routes
に修正しています。
[ci skip] Need to mention debug_exception_response_format in the api_app documentation.
rails guideのUsing Rails for API-only Applications
の修正です。
config.debug_exception_response_format
オプションについての詳細な説明を追加しています。
Merge pull request #23862 from prathamesh-sonpatki/test-for-strong-etag
actionpack/test/dispatch/response_test.rb
n修正です。
responseのheaderに強いEtagを直接設定した場合のテストを追加しています。
Enable Action Cable routes by default
Action Cable / railtiesの修正です。
デフォルトでAction Cable用のroutesを有効にするよう修正しています。
デフォルトのpathは/cable
になっており、変更したい場合はconfig.action_cable.mount_path
に値を設定すれば変更出来るようになっています。また、無効にしたい場合は、nil
を設定すればOKです。
また、そもそもAction Cable のserverを別serverにしたい場合は、config.action_cable.url
にURLを指定すればOKとなっています。
Only open Action Cable connection if data is being sent
actioncable/app/assets/javascripts/action_cable/connection.coffee
、
railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/cable.coffee
の修正です。
Action Cableのclientサイドで、送信出来るデータがあるときのみconnectionをオープンするよう修正しています
Fix title of README according to Markdown conventions
各READMEの修正です。
タイトル部分に##
(h2)を使用している箇所があったのを、#
(h1)を使用するよう修正しています。
Only hijack Rack socket when first needed
Action Cableの修正です。
ActionCable::Connection::Stream
クラスの初期化処理で行っていたRack socketのhijack処理を、必要になったとき(driverを起動するとき)に処理を行うよう修正しています。
初期化時に処理を行ってしまうと、以降その値を引き継いてしまい、最初に正常なアクセスがありその後不正なアクセスがあった場合、正常なアクセスの情報のまま不正アクセスのチェック処理をしてしまう、という問題があった為、のようです。多分。
Lock down new ImplicitRender
behavior for 5.0 RC
https://github.com/rails/rails/commit/73b1efc58f4e04b4af7ed93685352ebe9108cd7e
Action Packの修正です。
デフォルトのrenderingの挙動を修正しています。
API controllerの場合、テンプレートが見つからなかった場合、"204 No Content"を返します。
それ以外の場合、以下の条件がチェックされます。
- テンプレートが見つかった場合、そのテンプレートがrenderされます。テンプレートのlookup処理はアクション名、locale、format、variant等が考慮され行われます。
- アクション名と一致するテンプレートはあったが、formatやvariantが一致しなかった場合、
ActionController::UnknownFormat
がraiseされます。 - アクション名と一致するテンプレートが見つからなかった、かつ、browserからのリクエストの場合、こちらも
ActionController::UnknownFormat
がraiseされます。2番目の場合とは、表示されるエラーメッセージの内容が異なります。 - 上記どの条件とも一致しなかった場合、API controller同様、"204 No Content"を返します。
詳細はコード参照。この辺り:https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/implicit_render.rb#L36..L79
actionpack/lib/action_controller/metal/implicit_render.rb
、
guides/source/5_0_release_notes.md
の修正です。
エラーメッセージ内にタイポがあったのを修正、及び使用していないテスト用のファイルを削除しています。
Merge pull request #23874 from st0012/update-documents
rails guideのConfiguring Rails Applications
の修正です。
config.debug_exception_response_format
オプションについての説明を追加、及びconfig.force_ssl
オプションの箇所に、force_ssl
にtrueを設定した場合config.action_mailer.default_url_options
に{ protocol: 'https' }
が設定される旨説明を追加しています。