なるようになるブログ

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

rails commit log流し読み(2016/02/29)

2016/02/29分のコミットです。

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


Fix formatting in Action Cable guide [ci skip]

rails guideのAction Cable Overviewの修正です。

Standaloneの項に改行を追加しています。


Merge pull request #23929 from prathamesh-sonpatki/update-deprecation-message-for-app-namespace

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

The tasks in the rails task namespace is deprecated in favor of app namespace. (e.g. rails:update and rails:template tasks is renamed to app:update and app:template.)でdeprecateになったrails namespaceのタスクを実行した場合に出力するdeprecateメッセージの改善を行っています。

# Before
DEPRECATION WARNING: Running update with the rails: namespace is deprecated in favor of app. Run e.g. bin/rails app:update instead.".

# After
DEPRECATION WARNING: Running update with the rails: namespace is deprecated in favor of app: namespace. Run bin/rails app:update instead.

add constraint_to option to SSL middleware

actionpack/lib/action_dispatch/middleware/ssl.rbの修正です。

ssl_optionsに、redirectのルールを指定する為のconstrain_toオプションを指定出来る用修正しています。

元々は、force_sslオプションを指定した場合、強制的に全ページhttpsにリダイレクトされるようになっていたのですが、constrain_toオプションでリダイレクトしない条件を定義する事ができます。

config.ssl_options = { redirect: { constrain_to: -> request { request.path !~ /healthcheck/ } } }

Address ruby warnings

railties/test/application/integration_test_case_test.rbrailties/test/generators/channel_generator_test.rbの修正です。

railtiesのテストでRubyのwarning(Ambiguous first argumentMismatched indentation)が出ていたのを修正しています。


Add documentation for #13897 [skip ci]

actionpack/lib/action_dispatch/http/filter_parameters.rbのdocの修正です。

Http::FilterParameters moduleのdocに、親のkeyをベースにしたfilterの方法について説明及びexampleを追加しています。


Fix value of CSS background-color property in Rails guide

guides/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.cssの修正です。

Rails guideのbackground-color property にtransparentを使用するよう修正しています。

.syntaxhighlighter .script {
   color: #222 !important;
-  background-color: none !important;
+  background-color: transparent !important;
}

CSS validator of W3Cを実行した結果、transparentの方が正しいという指摘が出た為、との事です。


Fix typos in Action View Overview guide

rails guideのAction View Overviewの修正です。

url -> URLに修正しています。


- Made changes to have test cases in actions_test more readable.

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

railsコマンドを使用したテストのテスト名がtest_rake_xxxになっていたのを、test_rails_xxxに修正しています。


- Made changes to have test cases in actions_test more readable.

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

テストの定義にtestメソッドを使用するよう統一しています。


Drop Action Controller require in ActionDispatch::ExceptionWrapper

actionpack/lib/action_dispatch/middleware/exception_wrapper.rbの修正です。

不要なaction_controller/metal/exceptionsのrequireを削除しています。