なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2015/10/03)

2015/10/03分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

railties/CHANGELOG.md

activejob/CHANGELOG.md


Do not document private methods in AJ::TestHelper

activejob/lib/active_job/test_helper.rbのdocの修正です。

ActiveJob::TestHelperの各メソッドから、:nodoc:を削除しています。

Active Jobのテスト時に使用するヘルパーメソッドの為、public APIで良いのでは、という事で、:nodoc:を削除したようです。


removing Rack::Runtime from the default stack.

railtiesの修正です。

デフォルトのmiddleware stackから、Rack::Runtimeを削除しています。

runtime headerは、timing attacksを受ける可能性がある事、及びstreamingレスポンスでは正確な数字が返せない、という事から、デフォルトからは削除したとの事です。

割と影響大きそう、と思ったのですが、後でrevertされてました。 Revert "removing Rack::Runtime from the default stack." · rails/rails@24f9c03


use class to specify the middleware [ci skip]

guides/source/rails_on_rack.mdrailties/lib/rails/generators/rails/app/templates/config/initializers/cors.rbの修正です。

middlewareの指定に、deprecatedになったStringではなくClassで指定するよう修正しています。


Support passing array to assert_enqueued_jobs in :only option

activejob/lib/active_job/test_helper.rbの修正です。

assert_enqueued_jobsonlyオプションに、Arrayを渡せるよう修正しています。

assert_enqueued_jobs 2, only: [HelloJob, LoggingJob] do
  HelloJob.perform_later('jeremy')
  LoggingJob.perform_later('stewie')
  RescueJob.perform_later('david')
end

Fixed deprecated string to specify the middleware [ci skip]

guides/source/configuring.mdの修正です。

middlewareの指定に、deprecatedになったStringではなくClassで指定するよう修正しています。


Add Singleton in NullMutationTracker class

activerecord/lib/active_record/attribute_methods/dirty.rbactiverecord/lib/active_record/attribute_mutation_tracker.rbの修正です。

NullMutationTrackerクラスをシングルトンとして扱うよう修正しています。

オブジェクト生成によるメモリ使用量を減らす為、との事です。