なるようになるブログ

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

rails commit log流し読み(2017/02/20)

2017/02/20分のコミットです。

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

activesupport/CHANGELOG.md


Unfreeze interpolated string because it’s useless. https://github.com/rails/rails/commit/c61488b4adf987979e229ebcfb3ed78814efd32a

actionpack/lib/abstract_controller/caching/fragments.rbactionview/lib/action_view/template.rbの修正です。

Action View及びfragment cacheで使用するinstrumentのkeyをfreezeしていたのを、freezeしないよう修正しています。

動的に文字列を生成しており、freezeする意味が無い為、との事です。


Merge pull request #28069 from st0012/change-back-frozen-string https://github.com/rails/rails/commit/978e097375c17bf694374792b5f33b5fc6c9f4b5


Merge pull request #28013 from iguchi1124/fix-missing-namespace-wrapper

railties/lib/rails/generators/test_unit/integration/templates/integration_test.rbの修正です。

generatorでIntegration Testを生成する際に、namespaceを設定するよう修正しています。


Add assertion to polymorphic_routes_test.rb

actionview/test/activerecord/polymorphic_routes_test.rbの修正です。

polymorphic routesについてのテストに、polymorphic_pathメソッドを使用した場合のテストを追加しています。


Set correct “routes” in tests cases

Action Pack及びAction Viewのテストの修正です。

routesを表すのに不適切な値(pathではなくただの文字列)を使用していた箇所があったのを、適切な値を使用するよう修正しています。


Merge pull request #28070 from kamipo/improve_create_table_force_true

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

create_tableメソッドにforceオプションを指定した場合に、data_source_exists?メソッドで対象のテーブルがあるかどうかチェックしてからdrop_tableしていたのを、data_source_exists?でチェックする代わりに、drop_tableメソッドにif_exists: trueオプションを渡すよう修正しています。


Merge pull request #28059 from y-yagi/do_not_run_git_init_inside_test_dummy

railties/lib/rails/generators/rails/plugin/plugin_generator.rbの修正です。

test用のdummy applicationではgit initを実行しないよう修正しています。


Import rails-ujs v0.1.0 from rails/rails-ujs

railsブランチの中のrails-ujsのコードを、最新の内容(https://github.com/rails/rails-ujs)に更新しています。この二重管理、続けるのかなあ。


Merge pull request #27925 from robin850/hwia-removal

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

top levelのHashWithIndifferentAccessがdeprecateになりました。今後は必ずActiveSupport::HashWithIndifferentAccessを使う必要があります。

元々top levelのHashWithIndifferentAccessは下位互換性の為に残してあった、かつ、Ruby 2.5からトップレベルの定数は参照されなくなりどっちにしろコードの修正は発生すると思われるので、このタイミングでdeprecateにしたようです。


[ci skip] Update Guides to use macOS instead of Mac OS X

rails guideの修正です。Mac OS XmacOSにまとめて修正しています。