2018/11/20分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actionmailer/CHANGELOG.md
allow right to left styling of docs (#3)
rails guideの修正です。
guideのテキストをを右から左に表示する為のcssを追加しています。デフォルトでは当然使われず、RTL
環境変数に値が指定されている場合のみ使用されるようになっています。
PRに貼られている画像を見る限り、恐らくguideをアラビア語(?)に翻訳する為、のようです。
Merge pull request #34476 from y-yagi/fix_no_method_error_in_parallelization
activesupport/lib/active_support/testing/parallelization.rb
の修正です。
parallel testsでテスト結果がDRb::DRbUnknown
になった場合(テスト実行側ではmarshal出来ていたがテスト結果をまとめるサーバ側でunmarshal出来ない場合)に、 テスト結果表示時にNoMethodError
でエラーになってしまっていたのを、テスト結果が正しく表示されるよう修正しています。
Merge pull request #34410 from gmcgibbon/test_support_windows
activesupport/lib/active_support/notifications/instrumenter.rb
、
activesupport/lib/active_support/testing/parallelization.rb
の修正です。
Windows向けのサポートとして、下記を行っています。
- parallel testsで強制的に
drb/unix
をrequireしていたのをWindowsの場合はrequireしないよう修正(Windowsだとdrb/unix
をrequireするとエラーになる為) - デフォルトで生成される
test/test_helper.rb
でWindowsの場合、parallel testのworkerにスレッドを使用するよう修正(Windowsだとプロセスが使用出来ない為) Instrumenter
でWindowsの場合はProcess::CLOCK_PROCESS_CPUTIME_ID
を使用しないよう修正
Merge pull request #34453 from bogdanvlviv/exercise-connected_to-and-connects_to
activerecord/lib/active_record/connection_handling.rb
、
activerecord/test/cases/connection_adapters/connection_handlers_multi_db_test.rb
の修正です。
ActiveRecord::Base.connected_to
の戻り値がconnectionのArrayであることを確認するテスト、及び、connected_to
にdatabase
とrole
引数両方指定した場合にエラーになる事を確認するテストを追加しています。
Merge pull request #34482 from jacobherrington/chore/add-comments-to-templates
.github/issue_template.md
、
.github/pull_request_template.md
の修正です。
GitHubで使用されるissue template、pull request templateで、説明部分はmarkdownのコメント(<!-- ... -->
)として扱い、表示はされないよう修正しています。
Permit ActionController::Parameters for serializable Hash
activejob/lib/active_job/arguments.rb
の修正です。
ActiveJobの引数にActionController::Parameters
クラスのインスタンスを指定出来るよう修正しています。
Merge pull request #34085 from albertoalmagro/display-help-as-command-line-guides
railties/lib/rails/command.rb
の修正です。
rails help
でコマンドを表示する際に、railsのコマンドとrakeのタスクをそれぞれ別に表示していたのを、全てまとめて表示するよう修正しています。
Merge pull request #34488 from mullican/word_wrap_preserve_left_side_whitespace
actionview/lib/action_view/helpers/text_helper.rb
の修正です。
ActionView::TextHelper#word_wrap
メソッドで行の左側のスペースについてはtrimしないよう修正しています。
This is a paragraph with an initial indent, followed by additional lines that are not indented, and finally terminated with a blockquote: "A pithy saying"
上記のようなテキストがあった場合、元は、
This is a paragraph with an initial indent, followed by additional lines that are not indented, and finally terminated with a blockquote: "A pithy saying by a wise person"
このように行左側のスペースがtrimされてしまっていのたを、
This is a paragraph with an initial indent, followed by additional lines that are not indented, and finally terminated with a blockquote: "A pithy saying by a wise person"
のように、元のスペースは維持するようになっています。
Merge pull request #20865 from colavitam/only-except-behavior
actionpack/lib/action_dispatch/routing/mapper.rb
の修正です。
resource(s)
メソッドで、only
とexcept
オプションを同時に指定できなかった(指定した場合only
だけが使用されていたのを)のを、指定出来るよう修正しています。
が、大分混乱を招く書き方(e.g. resources :products, only: [:show, :destroy], except: :destroy
)なので、基本的には推奨しないとの事です。
Merge pull request #22534 from evopark/master
actionmailer/lib/action_mailer/base.rb
の修正です。
mail送信用のmultipart format blockで、使用されるテンプレート名がaction name固定だったのを、任意の値を指定出来るよう修正しています。
mail(template_name: template_name) do |format| format.text format.html end
上記のようにtemplate_name
オプションで指定出来るようになっています。
Deprecate event.end = Time.now
in favor of event.finish!
activesupport/lib/active_support/notifications/instrumenter.rb
の修正です。
Notifications::Event#end=
をdeprecateにしています。
Notifications::Event
が保持するデータに、cpu time, idle time等を追加した、 Add cpu time, idle time, and allocations features to log subscriber events の対応により、end=
は使用されず、代わりにfinish!
を使用する必要がある為。