なるようになるブログ

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

rails commit log流し読み(2014/12/18)

2014/12/18分のコミットです。

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


Merge pull request #18068 from kamipo/remove_unused_line

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

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


use thread_safe gem version greater or equal to 0.3.4

activesupport/activesupport.gemspecの修正です。

thread_safeのバージョン指定を0.1から0.3.4以上に修正しています。

activerecord/lib/active_record/type/type_map.rbThreadSafe::Cache#fetch_or_storeというメソッドを使っているのですが、これがthread_safeの0.3.4で追加されたメソッドの為、使用するバージョンもあげたようです。


simpler example for the non-missing constants gotcha [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

Constants が見つからなかった時についての説明について、サンプルコードを修正しています。


Merge pull request #18063 from claudiob/remove-as-time-with-zone-since

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

ActiveSuppport::TimeWithZone#sinceメソッドを削除し、ActiveSuppport::TimeWithZone#+メソッドのaliasとしてsinceを定義しています。

処理的に、ほぼほぼ一緒だった為、aliasにしてしまったようです。


Fix name on changelog [ci skip]

guides/CHANGELOG.mdの修正です。 対応者の名前を修正しています。


Fix typo in nodoc should be :nodoc: for RDoc to parse correctly

actionpack/lib/action_controller/metal/params_wrapper.rbの修正です。

nodoc -> :nodoc:に修正しています。


[ci skip] Fix HTML format on comment

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

captureメソッドの実行結果のexampleに誤りがあったのを修正しています。


Relax the UUID regex

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

UUIDのチェック用正規表現を修正しています。

UUIDは、RFC4122でフォーマットが定められており、Railsもその正規表現に則りチェックをしていたのですが、 そもそもPostgreSQL自体が厳密にそのフォーマットを守っていないようで、フォーマット外のデータが入る可能性もあるようなので、Railsもチェック処理をゆるめています。

-          RFC_4122 = %r{\A\{?[a-fA-F0-9]{4}-?
-                             [a-fA-F0-9]{4}-?
-                             [a-fA-F0-9]{4}-?
-                             [1-5][a-fA-F0-9]{3}-?
-                             [8-Bab][a-fA-F0-9]{3}-?
-                             [a-fA-F0-9]{4}-?
-                             [a-fA-F0-9]{4}-?
-                             [a-fA-F0-9]{4}-?\}?\z}x
+          ACCEPTABLE_UUID = %r{\A\{?([a-fA-F0-9]{4}-?){8}\}?\z}x

adds another examle to the constants not missing gotcha [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

constantが見つからなかった場合についての説明で、exampleを追加しています。


passed a spell checker, not bad [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

overriden -> overriddenに修正しています。


Spelling fix [ci skip]

rails guideのA Guide for Upgrading Ruby on Railsの修正です。

タイポの修正を行っています。