なるようになるブログ

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

rails commit log流し読み(2018/01/04)

2018/01/04分のコミットです。

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

activesupport/CHANGELOG.md


Move config.action_view.cache_template_loading to proper section in configuring.md [ci skip]

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

config.action_view.cache_template_loadingについての説明がRails General Configurationの項に定義されていたのを、Configuring Action Viewの項に移動しています。


Correctly handle infinity value in PostgreSQL range type

activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rbactiverecord/lib/active_record/connection_adapters/postgresql/quoting.rbの修正です。

PostgreSQLのRange typにFloat::INFINITYを指定した場合にエラーになってしまうバグがあったのを修正しています。


Configure previewer/analyzer command paths centrally

Active Storageの修正です。

各クラスで保持していたコマンド(ffprobeffmpegmutool)のパスをActiveStorage moduleでまとめて保持するよう修正しています。

他のconfig(previewersanalyzers)と合わせる為、のようです。


Deprecate valid_alter_table_type? in sqlite3 adapter

activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rbの修正です。

sqlite3 adapterのvalid_alter_table_type?メソッドをdeprecatにしています。

元々内部でだけ使用する想定のメソッドだったのですが、誤ってpublic APIになてしまっていたので、まずはdeprecateするようにしています。


Merge pull request #31594 from yuki24/refactor-request-test

actionpack/test/dispatch/request_test.rbの修正です。

requestのtestで結果を検証するのにモックを使用していたのを、実際にqueryやpath_infoをrequestに指定して検証を行うよう修正しています。


Fix newly added reflection order when redefining association

activerecord/lib/active_record/reflection.rbの修正です。

associationを再定義した際に、reflection orderも再定義するよう修正しています。

reflectionも再定義をしないと、順序がずれてしまいエラーになってしまう事がある為。


Merge pull request #31011 from danielma/dma/assert-changes-with-to-should-still-assert-change

activesupport/lib/active_support/testing/assertions.rbの修正です。

assert_changesメソッドが、expressionオプションの値を評価後、tofromオプションの値に関わらず必ずassertを実行するよう修正しています。


Merge pull request #31049 from gwincr11/cg-blank

activesupport/lib/active_support/core_ext/object/blank.rbの修正です。

String#blank?メソッドをUTF-8以外のエンコードのStringで呼び出すとエラーになっていたのを、エラーにならないよう修正しています。

# before
" ".encode("UTF-16LE").blank?
#=> Encoding::CompatibilityError (incompatible encoding regexp match (US-ASCII regexp with UTF-16LE string))


# after
" ".encode("UTF-16LE").blank?
#=> true