なるようになるブログ

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

rails commit log流し読み(2020/06/30)

2020/06/30分のコミットです。

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

activesupport/CHANGELOG.md


Remove unnecessary rescue from safe_constantize

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

safe_constantizeからArgumentErrorのrescueを削除しています。[better error message for constants autoloaded from anonymous modules f…の対応により不要になった為。


Modified the note to include [ci skip] in pull request title instead of commit message.

rails guideのContributing to Ruby on Railsの修正です。

Contributing to the Rails Documentationの項にあるCIをスキップする方法の説明に、コミットメッセージに[ci skip]を入れる旨説明が記載されていたのを、PRのタイトルに[ci skip]を入れるよう説明を修正しています。

BuildkiteだとPRのタイトルに入れる必要がある為。


Use URI::DEFAULT_PARSER rather than instantiate a new one

Active Supportの修正です。

Railsで独自に定義しているURI.parserをdeprecatedにしています。今後は、URI::DEFAULT_PARSERを使用する必要がある。

URI.parserだと、毎回新しいインスタンスを生成してしまう、かつ、そもそもRails内部のURI.parserは古いRubyへの互換性の為に追加されたメソッドで、独自に定義する必要はもう無いため。


Merge pull request #39671 from hahmed/railties/speed-up-test-skip-webpack-install

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

test_skip_webpack_installbundleの実行をstubするよう修正、及び、グローバルのRailsコマンドを使用しないよう修正しています。


Remove redundant Exclude in .rubocop.yml

.rubocop.ymlの修正です。

.rubocop.ymlでExcludeの指定が重複している箇所があったのを削除しています。


Add tests for loaded pluck and pick with alias

activerecord/test/cases/calculations_test.rbの修正です。

load済みのrelationに対して、aliasをpluckとpickに指定した場合のテストを追加しています。


Fix yaml_compatibility_fixtures/rails_v1_mysql.yml's structure

activerecord/test/support/yaml_compatibility_fixtures/rails_v1_mysql.ymlの修正です。

v1 YAMLのテスト用ファイルに、v1のときには存在しないattributeが含まれていたのを削除しています。