2017/02/01分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Remove deprecated
.to_prepare
,.to_cleanup
,.prepare!
and.cleanup!
fromActionDispatch::Reloader
. - Remove deprecated
ActionDispatch::Callbacks.to_prepare
andActionDispatch::Callbacks.to_cleanup
.
activejob/CHANGELOG.md
- Push skipped jobs to
enqueued_jobs
when usingperform_enqueued_jobs
with aonly
filter in tests - Correctly set test adapter when configure the queue adapter on a per job.
Fix inherit from deprecated ActionView::Template::Handlers::Erubis
actionview/lib/action_view/template/handlers/erb.rb
、
actionview/lib/action_view/template/handlers/erb/deprecated_erubis.rb
の修正です。
Erubis
が使われた際にdeprecateメッセージを出すためにActiveSupport::Deprecation::DeprecatedConstantProxy
クラスを使用してErubis
を定義していたのですが、それだとActionView::Template::Handlers::Erubis
を直接継承した場合にエラーになってしまう為、Erubis
は普通にファイルに定義し、そのファイルのrequire時にdeprecateメッセージを表示するよう修正しています。
Use temporary connection pool for sqlite3_mem adapter
activerecord/test/cases/query_cache_test.rb
の修正です。
query cacheのテストで、establish_connection
する際に、元々保持していたconnectionとは別にtempraryのconnetion poolを作成し、そちらをclearするよう修正しています。そして、テスト終了後に元のconnectionを再度使用するようにしています。元のconnectionが失われてしまうと、in_memory databaseを使用している場合に最初に作成したDBに再接続出来ない為、のようです。
Add sqlite3_mem adapter to Travis CI
.travis.yml
の修正です。
sqlite3_mem adapter のテストをCIに追加しています。
Merge pull request #27767 from benoittgt/freeze_sql_type_with_get_oid_type
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
の修正です。
PostgreSQLAdapter#get_oid_type
メソッドのsql_type
引数のデフォルト値をfreezeするよう修正しています。
Merge pull request #27758 from kenta-s/neglected-todo-in-render_test
actionview/test/template/render_test.rb
の修正です。
yieldを呼び出しているpartialにblockを渡さない場合のテストのテスト名をより適切な名前に変更、及び、古いTODOコメントを削除しています。
Merge pull request #27850 from apauly/feature/active_job_test_helper
activejob/lib/active_job/queue_adapters/test_adapter.rb
の修正です。
perform_enqueued_jobs
メソッドにonly
オプションを指定した場合に、only
オプションに指定した以外のjobがenqueueされないようになっていたのを、enqueueはされるよう修正しています。
Remove deprecated callbacks from ActionDispatch middlewares
Action Packの修正です。
deprecatedになっていたActionDispatch::Callbacks
のto_prepare
、to_cleanup
メソッドを削除、及び、ActionDispatch::Reloader
のto_prepare
、to_cleanup
、prepare!
、cleanup!
メソッドを削除しています。
Chain scope constraints should respect own table alias
activerecord/lib/active_record/associations/association_scope.rb
の修正です。
has_many through + scopeを使用した場合に、table aliasが使用されないバグがあったのを修正しています。
correctly set test adapter when configure the queue adapter on a per job (#26690)
activejob/lib/active_job/test_helper.rb
の修正です。
job毎にqueue adapterを設定していた場合に、ActiveJob::TestHelper
でqueue adapterのtest adapterへの置き換えが正しく行われないバグがあったのを修正しています。
Merge pull request #27795 from meagar/fix-missing-partial-iteration
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
partialをrenderした際に、テンプレート内に本来定義される<partial_name>_iteration
変数が定義されないバグがあったのを修正しています。
activesupport/test/file_update_checker_shared_tests.rb
の修正です。
使用していない変数を削除しています。
call gem
erubis
before require
actionview/lib/action_view/template/handlers/erb/erubis.rb
の修正です。
erubis
をrequireする前に、gem
メソッドで必要なgemのロード処理を行うよう修正しています。
+gem "erubis"
require "erubis"
Change ActionView ERB Handler from Erubis to ErubiでERB Handlerで使用するgemがErubisからErubiになりました。しかし、まだERB HandlerにErubisは使用出来るようになっています。ただ、Rails本体のdependencyにはもうErubisは無い為、Erubis handlerを使用したい場合、ユーザが明示的にRakefileにErubis gemを指定する必要があります。
その為、requireの前にgemメソッドを呼び出して、Erubis gemがロード出来ない場合にその状態がわかるようにしています。