なるようになるブログ

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

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

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

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

activerecord/CHANGELOG.md


Merge pull request #16011 from xjlu/token_and_options

actionpack/lib/action_controller/metal/http_authentication.rbの修正及びHttpAuthentication::Tokenのテストの追加です。

raw_paramsメソッドの引数分割用の正規表現を修正しています。

-        auth.sub(TOKEN_REGEX, '').split(/"\s*#{AUTHN_PAIR_DELIMITERS}\s*/)
+        auth.sub(TOKEN_REGEX, '').split(/\s*#{AUTHN_PAIR_DELIMITERS}\s*/)

PRのコメント見る限り、そもそもダブルクォートがあったの自体が誤りのようです。


Merge pull request #16028 from cade/fix_counter_cache_count_with_association_selects

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

selectscopeを使用している際に、reset_countersメソッドがエラーになっていたのを修正しています。

生成されるSQLがおかしくなってしまっていたとの事で、countメソッドの引数に:allを使用するよう修正しています。


Merge pull request #16003 from sgrif/sg-refactor-sqlite3-strings

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

String用のSQLite3Stringクラスを新設し、type cast処理をまとめています。 また、そのSQLite3Stringクラス生成用のFactoryも追加しています。


Merge pull request #16013 from tgxworld/remove_symbolized_path_parameters

actionpackの各クラスの修正です。symbolized_path_parametersを削除しています。代わりにpath_parametersを使用すべきとの事です。


Fix typo

activerecord/test/cases/adapters/postgresql/quoting_test.rbの修正です。

FORMFROMに修正しています。typo


Don't fail if unicode.org isn't talking to us

activesupport/test/multibyte_conformance_test.rbの修正です。

MultibyteConformanceTestでは、http://www.unicode.orgからファイルをダウンロードしてテストを行っているのですが、unicode.orgが応答無かった場合、テストをskipするよう修正しています。

unicode.orgから動的にファイルをダウンロードしてテストを実行していたんですね。なる程。


Revert "Use a type object for type casting behavior on SQLite3"

上にあるSQLite3Stringクラスの対応をrevertしています。Travis CIでテストがコケてしまった為のようです。


Add a required option to singular associations

ActiveRecordassociationsの修正です。singular associations用に requiredオプションが追加されました。

# before
belongs_to :account
validates_presence_of :account

# after
belongs_to :account, required: true

スッキリして非常に良いですね。使っていこう。


CHANGELOG and release notes entry for #16056

activerecord/CHANGELOG.mdの修正です。

上記requiredの対応について追記しています。


Add release notes entry for #15819 [ci skip]

guides/source/4_2_release_notes.mdの修正です。

Hash#transform_valuesHash#transform_values!の対応を追記しています。


Use the type object for quoting PG Ranges

PostgreSQLのConnectionAdapterの修正です。

Range型のクォート処理をtype objectに集約しています。


Time.today -> Date.today in guides. [ci skip]

rails guideのActive Support Core Extensionsの修正です。

日時比較処理についての説明が誤っていたのを修正しています。あれ、"Date.today may equal Date.yesterday"というのはおかしいきが。


Remove all references to Time.yesterday [ci skip]

こちらもrails guideのActive Support Core Extensionsの修正です。

Time.yesterdayTime.tomorrowをそれぞれDate.yesterdayDate.tomorrowに修正しています。


Only reference time specific methods in the time section [ci skip]

再度rails guideのActive Support Core Extensionsの修正です。

日時比較処理についての説明が誤っていたのを修正しています。 "Date.today may equal Date.yesterday"の件も修正されていました。