なるようになるブログ

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

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

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

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

guides/CHANGELOG.md


Merge pull request #19703 from vizcay/fix_code_statics

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

ディレクトリ名の終端が".xxx"(ex: "/javascripts/lib.js/")になっている場合に、rake statsがEISDIRでエラーになってしまうバグがあったのを修正しています。

CodeStatistics#calculate_directory_statisticsメソッドの対象のpathがディレクトリかどうかチェックする処理にバグがあったようです。


Merge pull request #19682 from supercaracal/fix_force_ssl_redirection_flash_error

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

存在しないrespond_to?メソッドを呼びだそうとしていたのを、正しくrequestオブジェクトのrespond_to?メソッドを呼び出すよう修正しています。

session_storeをdisableにしている場合に、redirect_to_urlを呼び出すとforce_ssl_redirectionNoMethodErrorで落ちてしまっていたので修正したようです。


Add Active Job to Configuring Guide [ci skip]

rails guideのConfiguring Rails Applicationsの修正です。

ActiveJobについての説明を記載したConfiguring Active Job セクションを追加しています。


Gemfile: temporay pin "bcrypt" version and run "bundle update bcrypt" on Linux https://github.com/rails/rails/commit/7008dfba6660d71463d0b82b20ac70e652174325

GemfileGemfile.lockの修正です。

bcryptのバージョンを3.1.10に更新しています。 更新するの自体が目的なのではなく、mingw環境でbundle updateを実行後、再度Linux環境でbundle updateを実行した際に、Gemfile.lockからmingwに関する行が削除されない事を確認する為のコミットだったようです。

# Gemfile.lock
     bcrypt (3.1.10)
+    bcrypt (3.1.10-x64-mingw32)
+    bcrypt (3.1.10-x86-mingw32)

wrap "require 'drb/unix'" by bgin-end at test/abstract_unit.rb

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

drb/unixのrequire処理でLoadErrorが発生した場合に、エラーをrescueし、warningメッセージを表示するよう修正しています。

mingw ではdrb/unixが存在しない為との事です。


[Rails4 regression] prevent thin and puma cause error in Non ASCII URL on Windows

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

FileHandler#match?メソッドでパスの結合をする際、force_encoding('UTF-8')で強制的にUTF-8にするよう修正しています。

Windows環境でASCIIではないパスにアクセスしようとした際にエラーになってしまっていた為対応したとの事です。 Bitnami Redmineでトラブっていたようです。詳細はこちら


[ci skip] Downcases filter names

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

"filter"について説明している箇所で、フィルター名を小文字に修正しています。

-"Before" filters may halt the request cycle. A common "before" filter is one which requires that a user is logged in for an action to be run. You can define the filter method this way:
+"before" filters may halt the request cycle. A common "before" filter is one which requires that a user is

実際使用する際は小文字だからですかね。