なるようになるブログ

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

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

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

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

actionpack/CHANGELOG.md

activerecord/CHANGELOG.md


Fix "Esperanto" name

rails guideのActive Job Basicsの修正です。

EsperantoEsparantoにタイポしていたのを修正しています。


Fix mounted engine named routes regression

actionpack/lib/action_dispatch/routing/mapper.rbactionpack/lib/action_dispatch/routing/route_set.rbの修正です。

relative_url_root + mountable engineを使用した場合に、mountable engineのURIに、relative_url_rootが2回設定されてしまう(relative_url_rootsubdirが設定されていた場合に、mountable engineのURIが、/subdir/subdir/engine_pathのようになってしまっていた)バグがあったのを対応しています。

Fallback to RAILS_RELATIVE_URL_ROOT in url_for by yasyf · Pull Request #18775 · rails/rails の対応で発生してしまったリグレッションで、Rails 4.2.3から発生しています。


Added missing specs for not modifying queues when using AJ test helpers

activejob/lib/active_job/test_helper.rbactivejob/test/cases/test_helper_test.rbの修正です。

assert_enqueued_withassert_performed_withメソッドを使用した場合に、jobの数が変わらない事を確認するテストを追加しています。

んー、jobの数が変わってしまっているように見えるのですが、何か勘違いしているかな…。


Revert "Update asset_pipeline.md"

config.serve_static_filesconfig.assets.serve_static_filesに修正した、Update asset_pipeline.md · rails/rails@afe6721 をrevertしています。

config.serve_static_filesの方(assets無し)が正しい為。


Hide Minitest's aggregated results if outputting inline.

railties/lib/rails/test_unit/minitest_plugin.rbの修正です。

rails test runnerで、inline出力をtrueにしている場合に、Minitest自体のテスト結果の表示を行わないよう修正しています。 inlineで表示しているものと同じ内容が最後にまとめて出てしまうのを防止する為、のようです。


Refactor create_test_file to take a pass option.

railties/test/application/test_runner_test.rbの修正です。

各テストで使用する共通処理を、テスト用の共通メソッドで行うようリファクタリングしています。


Output inline is set to true in the plugin.

railties/lib/rails/test_unit/reporter.rbの修正です。

output_inlineが必ず設定されるようになったので、output_inlineの取得にfetchメソッドを使うのをやめて、[]で取得するよう修正しています。


code gardening in transliterate.rb

activesupport/lib/active_support/inflector/transliterate.rbの修正です。

parameterizeメソッドに対して、適切な空行の追加、ascii -> ASCIIに修正、フォーマットの修正等をまとめて行っています。


Improve readability in CSRF section of guide

rails guideのRuby on Rails Security Guideの修正です。

Cross-Site Request Forgery (CSRF)の項の言い回し、グラマーの修正を行っています。


Modify the scope method documentation

activerecord/lib/active_record/scoping/named.rbのdocの修正です。

ActiveRecord::Scoping::Named.scopeメソッドのdocに、メソッドの戻り値についての説明を追加しています。


Fix subsecond precision supported version

activerecord/test/cases/helper.rbの修正です。

subsecond precision をサポートしているかどうかのMySQLのバージョンチェック処理が、5.6.0以上、5.7.0以下だとサポートされているとみなす処理になっていたのですが、 実際は、subsecond precision はMySQL 5.6.4以上でサポートされている為、チェック処理を適切な形に修正しています。


Merge pull request #21686 from kamipo/remove_pk_and_sequence_for

activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rbの修正です。

使用していないAbstractMysqlAdapter#pk_and_sequence_forメソッドを削除しています。


remove unused require

railties/lib/rails/generators/testing/assertions.rbの修正です。

使用していないrequireファイルを削除しています。


Minor cleanup for form helpers guide [ci skip]

rails guideのForm Helpersの修正です。

全体に対して、グラマーの修正、適切な位置に改行を追加、等の対応を行っています。


Remove unused require

activerecord/lib/active_record/relation/query_methods.rbの修正です。

不要なrequireを削除しています。