2016/02/23分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #23521 from kamipo/fix_assert_in_delta_failure
activerecord/test/cases/timestamp_test.rbの修正です。
touchメソッドで指定したattributeの値が更新される事を確認するテストが、MySQL 5.5だとsubsecondがturncationされてしまう事の影響で時折コケてしまっていたので、usecの値は0にしてテストを行うよう修正しています。
Merge pull request #23752 from vipulnsward/23524-fix-button_to_delete
actionview/lib/action_view/helpers/url_helper.rbの修正です。
button_toメソッドでtoken tagを生成する際、httpメソッドの値が正しくtoken_tagメソッドに渡されてなかったのを、正しく渡すよう修正しています。
Do not pass more options that are needed.
actionview/lib/action_view/helpers/url_helper.rbの修正です。
button_toメソッドでtoken tagを生成する際、引数にform optionsをまるまる渡していたのを、必要な情報(action、method)のみ渡すよう修正しています。
Make per form token work when method is not provided
actionview/lib/action_view/helpers/url_helper.rbの修正です。
button_toメソッドにhttpメソッドが指定されていない場合に、デフォルトでpostを指定するよう修正しています。
http メソッドにpostが指定されてないと、form毎のtokenが正しく生成されない為、との事です。
We are calling to_s in the method so we can call downcase now
actionview/lib/action_view/helpers/form_tag_helper.rbの修正です。
extra_tags_for_formメソッドでhttpメソッドの判定をする際、大文字小文字を区別するのに正規表現のiオプションを使用して処理を行っていたのを、最初にdowncaseで小文字に変換してから処理を行うように、iオプションは削除するよう修正しています。
make sure rake test respects TESTOPTS
railties/lib/rails/test_unit/minitest_plugin.rbの修正です。
rake run実行時に、TESTOPTSオプションで指定したオプションを正しく引き継ぐよう修正しています。
Merge pull request #23816 from rails/params_parser_api
Action Packの修正です。
Railsがデフォルトで設定しているmime typeの値を上書き出来ないバグがあったのを修正しています。
Add internal attribute to routes
Action Packの修正です。
ActionDispatch::Journey::Routeクラスに、Railsが内部で定義したroutesかどうかを判別する為のinternal attributeを追加しています。
/rails/mailers、/rails/info等のroutesにはinternal attributeが設定され、internal attributeが設定されているroutesについては、routing inspector(rails routes)には表示されないようになります。
Generate config/cable.yml in rails:update command
railties/lib/rails/generators/rails/app/app_generator.rbの修正です。
rails:updateコマンド実行時に、config/cable.ymlが無い場合自動でファイルを生成するよう修正しています。
Generate ApplicationRecord if it does not already exist
activerecord/lib/rails/generators/active_record/model/model_generator.rb、
activerecord/lib/rails/generators/active_record/model/templates/application_record.rbの修正です。
modelのGenerator実行時に、application_record.rbが無い場合、自動でapplication_record.rbを生成するよう修正しています。
Generate ApplicationCable files if they do not already exist
Action Cableの修正です。
cableのgenerator実行時に、application_cable/channel.rb、application_cable/connection.rbが無い場合、自動でファイルを生成するよう修正しています。
actioncable/lib/rails/generators/channel/channel_generator.rb、
activerecord/lib/rails/generators/active_record/model/model_generator.rbのdocの修正です。
Action Cableのファイル(application_cable/channel.rb、application_cable/connection.rb)及びapplication_record.rbを生成するメソッドに、RubyGems 2.5.0になったらsymlinkを使用するようにする旨コメントを入れています。
rubygems 2.5.0からsymlink使えるようになったんですねえ。参考: Add support for packaging specs that contain symlinks by segiddins · Pull Request #1209 · rubygems/rubygems
Merge pull request #23668 from maclover7/cable-docs
Action Cableのdocの修正です。
Action Cable全体の、docのグラマーや言い回しの修正をまとめて行っています。
Action Cable readme fix [ci skip]
actioncable/README.mdの修正です。
ActionCableをAction Cable`に修正しています。
activerecord/lib/active_record/migration/compatibility.rbの修正です。
古いmigrationファイル(versioning指定の無いActiveRecord::Migrationクラスを直接継承しているmigrationファイル)でmigrateを実行した場合に、ActiveRecord::Migration[4.2]を継承するようdeprecateワーニングを表示するようになっていたのですが、オーバーライドするメソッドが間違っており、正しくワーニングが表示されてなかったのを、正しくメッセージが表示されるよう修正しています。
Merge pull request #23821 from dgynn/actionmailer_lazy_loading
actionmailer/lib/action_mailer/railtie.rbの修正です。
ActionMailer::Railtieのconfig.after_initializeでpreview pathを使用するかどうかのチェックをActionMailer::Base.preview_pathで行っていたのですが、config.after_initializeは、initalizerの設定によってはAction Mailerのload処理より先に処理が行わる事がある為、チェックにActionMailer::Base.preview_pathではなく、app.config.action_maileの値を参照するよう修正しています。
remove args from assert_nothing_raised in tests
assert_nothing_raisedメソッドの引数に例外クラスを指定している箇所から、引数を全て削除しています。
後のコミットでassert_nothing_raisedメソッドの引数に例外クラスを指定する事はdeprecateになり、その為の対応です
update assert_nothing_raised in testing.md
rails guideのA Guide to Testing Rails Applicationsの修正です。
assert_nothing_raisedメソッドについて説明している箇所から、引数に例外クラスが渡せる旨説明していたのを削除しています。
add deprecation warning to assert_nothing_raised and changelog entry
activesupport/lib/active_support/test_case.rbの修正です。
assert_nothing_raisedメソッドの引数を渡すのをdepreateにしています。
assert_nothing_raisedメソッドは渡されたブロックを実行するだけで、引数に例外クラスを指定されてもそれようの特別な処理を行っておらず、指定出来るのは逆に混乱の元だろう、という事でdeprecateになったようです。
Remove needless drop_table :test_limits
activerecord/test/cases/migration_test.rbの修正です。
テストの中で、実際には作成していないテーブル(test_limits)のdrop処理があったのを削除しています。