なるようになるブログ

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

rails commit log流し読み(2016/03/08)

2016/03/08分のコミットです。

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

activerecord/CHANGELOG.md


Merge pull request #23993 from kamipo/no_need_to_extract_limit_for_boolean

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

boolean typeを定義するのに、他のtype同様、Typeクラス(Type::Boolean)を使用するよう修正しています。


Merge pull request #23939 from akshaymohite/fix-configuration-tests-semantics

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

テスト名の中で、グラマーを誤っている箇所があったのを修正しています。


Remove incorrect Rack documentation example

rails guideのRails Routing from the Outside Inの修正です。

Routing to Rack Applicationsの項にあるexampleコードで、matchメソッドに指定するクラス名に誤りがあったのを修正しています。


extract ActionDispatch::IntegrationTest::Behavior

actionpack/lib/action_dispatch/testing/integration.rbの修正です。

ActionDispatch::IntegrationTestクラスの処理をActionDispatch::IntegrationTest::Behavior moduleに切り出しています。他のテストフレームワークとうからのhook処理を入れやすくする為に、との事です。


Merge pull request #23922 from rthbound/fix-funny-spelling

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

テスト名の中で、グラマーを誤っている箇所があったのを修正しています。


Add changelog for #20997

activerecord/CHANGELOG.mdの修正です。

ActiveRecord::Associations::CollectionAssociation#ids_writerメソッドで、値をidの値を取得するカラムがidカラム決め打ちになっていたのをprimary_keyメソッドで定義したカラムを参照するよう修正した対応(https://github.com/rails/rails/commit/bcd0c8cfc250039ddc145c3302633c4890880930)について、CHANGELOGにentryを追加しています。


move changelog to right place [skip ci]

activerecord/CHANGELOG.mdの修正です。

先のコミットで追加されたentryを適切な位置(Rails 5.0.0.beta3 (February 24, 2016)セクションの下)に移動しています。


Add changelog for batch touch records.

activerecord/CHANGELOG.mdの修正です。

複数レコードに対するtouch処理が一度だけ行われるよう修正した対応(Batch touch parent records](https://github.com/rails/rails/pull/19324))について、CHANGELOGにentryを追加しています。


Merge pull request #24034 from kamipo/remove_outdated_comment

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

columnsメソッドに現在の実装と異なる古いコメントが残ってしまっていたのを、削除しています。


Remove extra 'the' and unwanted comma [ci skip]

rails guideのAction Cable Overviewの修正です。

Example 1: User appearancesの項のグラマーの修正を行っています。


Execute default_scope defined by abstract class within the scope of subclass

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

abstract classで定義されているdefault_scopeが子クラスで実行されないバグがあったのを修正しています。


Drop the explicit version requirements for web-console

railties/lib/rails/generators/rails/app/templates/Gemfileの修正です。

デフォルトで生成されるGemfileで、使用するweb-consoleのバージョンを3系に固定するようにしていたのを、バージョンを固定しないよう修正しています。

バージョンを固定してしまうと、メジャーバージョンをアップデートした際に、bundle updateで最新のバージョンが取得されず(バージョンロックをとかないと駄目)、それにより最新のRailsで動かない等の問題が発生しまう事がある為、バージョンを固定しないようにしたようです。


Fix the tests after e594000

railties/test/generators/app_generator_test.rbの修正です。

先のweb-consoleのバージョンを固定しないよう修正した対応で、テストの修正が漏れていたので対応しています。


- Freeze strings in frequent used private method

actionview/lib/action_view/helpers/url_helper.rbの修正です。

内部で使用している各文字列にfreezeを追加しています。


Advertise the console web-console feature

railties/lib/rails/generators/rails/app/templates/Gemfileのdocの修正です。

デフォルトで生成されるGemfileに、web-consoleはviewで使える旨説明が記載されているのですが、実際はview以外でも使用できるので、コードのどこでも使用出来る旨説明を修正しています。