なるようになるブログ

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

rails commit log流し読み(2015/05/30)

2015/05/30分のコミットです。

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

railties/CHANGELOG.md


not require mail file

actionmailer/test/abstract_unit.rbの修正です。

使用していないmailのrequireを削除しています。


Revert "Replace use of alias chains with prepend at core_ext/date and core_ext/time"

先日マージされた、 Dateクラス、Timeクラスで既存のメソッドの書き換えを行うのにalias_methodを使って行っていたのをModule#prependを使用しるよう対応した Merge pull request #19878 from pabloh/replace_alias_chains_with_prepend をrevertしています。

Time#<=>メソッド内での処理に誤りがあり、Railsのテストを実行するとSystemStackError: stack level too deepで落ちてしまうようになっていたので、一旦revertしたとの事です。


Update inline_preview_interceptor.rb

actionmailer/lib/action_mailer/inline_preview_interceptor.rbのdocの修正です。

InlinePreviewInterceptorクラスのdoc内、InlinePreviewInterceptorクラスを使用したく無い場合について説明している箇所の言い回しを修正しています。


minor text change

actionmailer/lib/action_mailer/log_subscriber.rbのdocの修正です。

LogSubscriberクラスのdocにタイポがあったのを修正しています。


Make the wording less confusing

actionmailer/lib/action_mailer/inline_preview_interceptor.rbのdocの修正です。

先にコミットされた、Update inline_preview_interceptor.rb だと説明が不足していると思われるので、再度InlinePreviewInterceptorクラスを使用したく無い場合について説明している箇所の言い回しを修正しています。


formatting changes

activemodel/lib/active_model/attribute_methods.rbactivemodel/lib/active_model/errors.rbのdocの修正です。

doc内でRDocのフォーマットを使用するよう修正しています。


Require yaml for isolation test

activemodel/test/cases/serializers/xml_serialization_test.rbの修正です。

テスト内で使用しているyamlクラスのrequireを追加しています。元々require処理はあったのですが、Remove use of mocha from Active Model の対応の際に、誤って削除されてしまっていたようです。


rake restart should work without a tmp folder

railties/lib/rails/tasks/restart.rakeの修正です。

restartタスクで、tmpディレクトリが無い場合に、tmpディレクトリを作成するよう対応しています。

restartタスクはtmp/restart.txt'をtouchしているだけなのですが、tmpディレクトリ自体が無いとtouch`メソッドがエラーになってしまうので、エラーにならないよう、最初にディレクトリだけは作成するようにしたとの事です。


Generate a .keep file in tmp folder

railties/lib/rails/generators/rails/app/app_generator.rbrailties/lib/rails/generators/rails/app/templates/gitignoreの修正です。

tmpディレクトリ配下に.keepファイルを作成するよう修正しています。

restartタスクもそうだったのですが、tmpディレクトリがある事を前提としているスクリプトが幾つかあり、それらが正常に動作するようにする為に、tmpディレクトリ自体はバージョン管理に入るよう対応したようです。gitignoreの方も修正されており、そちらには/tmp/*が追加されています。


Add test to ensure tmp:clear works when tmp is missing

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

tmpディレクトリが存在しない場合にtmp:clearタスクを実行した場合に、エラーにならない事を確認する為のテストを追加しています。


Merge pull request #20375 from yoongkang/docfix

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

controllerメソッドのexampleで、deprecateになっているviaオプション無しのmatchメソッドを使用している箇所があったので、viaオプションを追加しています。


match method doc fix [ci skip]

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

matchメソッドのexampleで、deprecateになっているviaオプション無しのmatchメソッドを使用している箇所があったので、viaオプションを追加しています。