なるようになるブログ

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

rails commit log流し読み(2014/11/14)

2014/11/14分のコミットです。

CHANGELOGへの追加はありませんでした。


[ci skip] Add one more example to routing testing, and highlight association

rails gudideのA Guide to Testing Rails Applicationsの修正です。

assert_routingを使用したテストのサンプルを追加しています。


[ci skip] Capybara added to other testing approaches

rails gudideのA Guide to Testing Rails Applicationsの修正です。

Other Testing ApproachesのCapybaraを追加しています。 今まで無かったのが意外な位ですねえ。


[ci skip] Improve upon testing tasks guide

rails gudideのA Guide to Testing Rails Applicationsの修正です。

Rake Tasks for Running your Testsの説明の修正及び、タスクの追加を行っています。

が、追加されたタスクはつい先日deprecateになったばかりのtest:all関係のタスクなので、後ほど削除されています。


Add basic tests for ActionDispatch::ExceptionWrapper

actionpack/test/dispatch/exception_wrapper_test.rbの追加です。

ActionDispatch::ExceptionWrapperクラスについてのテストを追加しています。


exec_prepared is GVL friendly, so lets use it.

Gemfileactiverecord/lib/active_record/connection_adapters/postgresql_adapter.rbの修正です。

PostgreSQL接続用のgemであるpgのバージョンを0.15にバージョンアップし、prepare処理に使用する関数をsend_query_preparedからexec_preparedに修正しています。exec_preparedの方がGVLと相性が良いとの事で変更しています。

"Release Ruby's GVL while calls to blocking libpq functions to allow better concurrency in threaded applications" 辺りの話かなあ。


[ci skip] Remove deprecated testing tasks

rails gudideのA Guide to Testing Rails Applicationsの修正です。

先のコミットで誤って追加してしまったdeprecateになったタスクを削除しています。


[CI SKIP] Corrections to testing guide.

rails gudideのA Guide to Testing Rails Applicationsの修正です。

Rake Tasks for Running your Tests項の説明の修正を行っています。


Build fix when running in isolation

ActiveRecordのテストの修正です。

単体で実行した際に、requireが足りておらずコケてしまうテストがあったので、不足していたrequireを追加して対応しています。


Use DelegateClass instead of SimpleDelegator for type decorators

activerecord/lib/active_record/attribute_methods/time_zone_conversion.rbactiverecord/lib/active_record/type/serialized.rbの修正です。

TimeZoneConverterSerializedの親クラスに、 SimpleDelegatorの代わりにDelegateClassクラスを使用するように修正しています。

移譲するのはType::ValueだけなのでDelegateClassクラスで十分なようです。また性能的にも、DelegateClassの方が良いようですねえ。