なるようになるブログ

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

rails commit log流し読み(2018/07/07)

2018/07/07分のコミットです。

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


Update has_secure_password info in the guide

rails guideのActive Model Basicsの修正です。

SecurePasswordの項に、has_secure_passwordに任意のattributeが指定出来る旨説明、及び、指定した場合のexampleを追加しています。


Improve SecurePasswordTest#test_authenticate

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

SecurePasswordTest#test_authenticateの改善として、authenticateauthenticate_XXXメソッドの戻り値が期待通りになっているかテストするよう修正、及び、authenticate_passwordメソッドのテストを追加しています。


Use only snake cased symbols in commands.

railties/lib/rails/commands/server/server_command.rbの修正です。

dev_cachingオプションを指定するのにスネークケースを使用するよう修正しています。

-      class_option "dev-caching", aliases: "-C", type: :boolean, default: nil,
+      class_option :dev_caching, aliases: "-C", type: :boolean, default: nil,

他のオプションは全てスネークケースで扱うようにしていたので、それらと合わせる為。なお、内部的にはスネークケースで扱われるのですが、実際にrails serverに指定する場合は、今までと変わらず--dev-cachingで指定出来ます。


Remove restart_command leftover from switching to Thor options.

railties/lib/rails/commands/server/server_command.rbの修正です。

Rails::Server#restart_commandメソッドを削除しています。

名前の通りrestart時に実行するコマンドを定義していたのですが、ServerCommandクラスにもrestart_commandコマンドがあり、そちらを使用するようにする為、Rails::Serverクラスのrestart_commandメソッドは削除しています。


Don't show unneeded deprecation warning on server restart.

railties/lib/rails/commands/server/server_command.rbの修正です。

rails serverコマンドにRack server nameをオプションなしで指定した際に表示されるdeprecateメッセージが、serverのrestartの際には表示されないよう修正しています。


Don't balloon @original_options with --restart on restart.

railties/lib/rails/commands/server/server_command.rbの修正です。

rails serverを複数回restartした際に、--restartオプションが複数回指定されてしまっていたのを、一度だけ指定されるよう修正しています。