2015/10/17分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #21953 from bdunne/fix_dep_warn
activesupport/lib/active_support/deprecation/method_wrappers.rb
、
activesupport/lib/active_support/testing/deprecation.rb
の修正です。
ActiveSupport::Deprecation#deprecate_methods
でdeprecatorに、自身のインスタンスを設定するよう修正しています。これにより、deprecateメッセージに表示させるクラス名/モジュール名が、指定したクラス名/モジュール名に変わっています。
実行例。
ActiveSupport::Deprecation.new("next-release", "MyGem").deprecate_methods(MyModule, :aaa) # => [:aaa] # before MyModule.aaa # => DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.0. (called from irb_binding at (irb):7) # after MyModule.aaa # => DEPRECATION WARNING: aaa is deprecated and will be removed from MyGem next-release. (called from irb_binding at (irb):7)
Move the handling of supported arguments to where
activerecord/lib/active_record/relation/query_methods.rb
、
activerecord/lib/active_record/relation/where_clause_factory.rb
の修正です。
先日行われた、Active Recordのwhere
メソッドに使用できない型のオブジェクトが渡された場合にArgumentError
をraiseするようにした対応を、where
メソッドではなく、WhereClauseFactory#build
で行うよう対応しています。
ちなみに、この対応が原因でActive Recordのテストが壮大に壊れている(本来通るべき型がエラーになってしまうようになってしまった)ので、後でまだ修正が入りそうです。
[ci skip] Add backend queue starting documentation
rails guideのActive Job Basics
の修正です。
Starting the Backend
の項を追加し、各バックエンドシステムの、Active Jobを使用した場合の使い方について説明したdocへのリンクを追加しています。 当然、Active Jobを使用した場合の使い方のdocがあるものだけのようです。
Use "rake time:zones:all" instead of "rake -D time" [ci skip]
activesupport/lib/active_support/railtie.rb
、
railties/lib/rails/generators/rails/app/templates/config/application.rb
の修正です。
time zoneの確認をさせる際、rake -D time
でtimeに関するタスクを表示するのではなく、rake time:zones:all
で直接time zoneの一覧を表示させるよう修正しています。
Suppress warnings of assigned but unused variable
activerecord/test/cases/relation/where_test.rb
の修正です。
where
メソッドのテストから、使用していない変数を削除しています。