なるようになるブログ

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

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

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

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

activerecord/CHANGELOG.md


added example of hash#except, and removed extra whitespaces [ci skip]

activesupport/lib/active_support/core_ext/hash/except.rbのdocの修正です。

Hash#exceptHash#except!メソッドのdocにexampleを追加しています。


[Enh] Changed the visibility of the ActiveModel::Dirty#clear_attribute_changes method

activemodel/lib/active_model/dirty.rbの修正です。

clear_attribute_changesメソッド:doc:を設定し、public APIとしています。

ActiveRecordインスタンスを生成する際、初期値を与えてインスタンスを生成すると、初期値を設定したattributesには変更済みのフラグが設定されてしまうのですが、 インスタンス生成時に値を設定した場合は変更済みとはしたくない場合等に、clear_attribute_changesを使いたい事があるので、public APIとしたようです。


Print out a meaningful error when ActiveRecord::ReadOnlyRecord is raised

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

ActiveRecord::ReadOnlyRecordクラスに、適切なエラーメッセージを含むよう修正しています。

-      raise ReadOnlyRecord if readonly?
+      raise ReadOnlyRecord, "#{self.class} is marked as readonly" if readonly?

[ci skip] modify default host in command line guide

rails guideのThe Rails Command Lineの修正です。

rails serverのデフォルトホストをlocalhostに修正しています。


docs, the abstract data type :timestamp was removed. See #15184 [ci skip]

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rbのdocの修正です。

schemaに定義出来る型の一覧から:timestampを削除しています。


remove the last traces of OpenBase from our codebase. [ci skip]

activerecord/test/config.example.ymlの修正です。

DB用のconfigファイルのサンプルからOpenBaseを削除しています。

以前OpenBaseに関するテストを削除した事があったのですが、その対応の漏れですかね。


pg tests, only execute what's necessary.

activerecord/test/cases/adapters/postgresql/bytea_test.rbactiverecord/test/cases/adapters/postgresql/hstore_test.rbの修正です。

bytea data typeのテストで前処理でassertを行っていた箇所があったのをテスト内に移動、 hstoreのテストの先頭でActiveRecord::Base.connection.supports_extensions?を行うよう修正を行っています。


pg tests, get rid of sql_types_test.rb.

ActiveRecordのテストの修正です。

activerecord/test/cases/adapters/postgresql/sql_types_test.rbで行っていたbinary型、text型のサイズ上限に関するテストを、それぞれの型のテストファイルの中に移動しsql_types_test.rbは削除しています。


Guides: Corrected name for assigns key [ci skip]

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

Integration Testing のexampleで、テスト対象の変数名に誤りがあったのを修正しています。