なるようになるブログ

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

rails commit log流し読み(2015/12/04)

2015/12/04分のコミットです。

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


Remove warnings

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

テストでRubyのワーニング(ambiguous first argument; put parentheses or a space even after/' operator)が出ていたので、()`を追加して対応しています。


Remove test_files check from plugin checks

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

plugin generatorが生成するgemspecからtest_filesを削除した対応によりコケていたテストがあったので、該当のテストを削除し対応しています。


Mac OS X use /private as directory to temp file

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

rails pluginのtest runnerのテストで、mktmpdirで作成したディレクトリにrails pluginを作成し、テスト再実行用のスニペットの表示の確認するテストを行っているのですが、 Mac OS Xだとtemp dirに/privateというパスがついてしまい、そのパスの影響でMac OSでのみテストが失敗しまっていたので、/privateがあっても無くても大丈夫なようテストを修正しています。


Disable FileEventedUpdateChecker for now

railties/lib/rails/application/configuration.rbの修正です。

listenを使用した新しいファイル更新チェックのクラス(ActiveSupport::FileEventedUpdateChecker)だとrailtieのテストがコケてしまう為、一時的に古いクラス(ActiveSupport::FileUpdateChecker)を使用するよう修正しています。


Merge pull request #22482 from ridiculous/master

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

メソッドが定義されているかどうかのチェックをrespond_to?メソッドで行っていたのを、respond_to_missing?メソッドで行うようリファクタリングしています。

-      def respond_to?(method, include_private = false) #:nodoc:
-        super || action_methods.include?(method.to_s)
-      end
-

+
+    private
+
+      def respond_to_missing?(method, include_all = false) #:nodoc:
+        action_methods.include?(method.to_s)
+      end
     end