なるようになるブログ

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

rails commit log流し読み(2017/03/30)

2017/03/30分のコミットです。

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

activerecord/CHANGELOG.md


CI against Ruby 2.2.7

.travis.ymlの修正です。

CIで使用するRubyのバージョンを2.2.6から2.2.7に更新しています。


Fix link to rails-ujs

rails-ujsリポジトリへのリンクをhttps://github.com/rails/rails-ujsからhttps://github.com/rails/rails/blob/master/actionview/app/assets/javascriptsにまとめて修正しています。

rails/rails-ujsはprivateリポジトリになり、今後はrails配下のファイルが管理されていく為。多分。2回位ブレてる気がする。


Fix the example code for Rails.groups [ci skip]

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

Rails.groupsメソッドのexampleにある実行例で、Rails.envがSymbolで表示されていたのですが、実際はStringが返るようになっていたので、実行例もStringで表示するよう修正しています。


Configure the days until close a stale issue

.github/stale.ymlの修正です。

probot-stateの設定を変更しています。

# Number of days of inactivity before an issue becomes stale
-days: 90
+daysUntilStale: 90
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7

staleラベルをつけるまでが90日で、そのstaleラベルをつけたissueをcloseするまでが7日、というふうに設定を変更したようです。


Add test to make sure subclasses also get helpers

actionpack/test/controller/api/with_helpers_test.rbの修正です。

ActionController::APIを継承したクラスのサブクラスでもhelperメソッドが使える事を確認するテストを追加しています。


Merge pull request #28592 from htanata/ar_relation_inspect_should_not_load_all_records

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

ActiveRecord::Relation#inspectメソッドが毎回必ずrecordsのload処理を行っていたのを、既にrecordsをload済みの場合、load済みの値を使用するよう修正しています。


Small grammar fix

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

After Filters and Around Filtersの項のグラマーの修正を行っています。


Add aliases for reverse_merge to with_defaults

actionpack/lib/action_controller/metal/strong_parameters.rbactivesupport/lib/active_support/core_ext/hash/reverse_merge.rbactivesupport/lib/active_support/hash_with_indifferent_access.rbの修正です。

ActionController::ParametersHashWithIndifferentAccessHashreverse_mergereverse_merge!メソッドのaliasとしてwith_defaultswith_defaults!メソッドを追加しています。


Merge pull request #28417 from schneems/schneems/symlink-failures

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

Path#existentメソッドで指定されたファイルが存在しない、かつ、そのファイルがシンボリックリンクだった場合、Exceptionをraiseするよう修正しています。


Merge pull request #28609 from rossta/patch-2

actionview/test/template/sanitize_helper_test.rbのdocの修正です。

テストについてのdocで、網羅的なテストはtest/controller/html/sanitizer_test.rbでテストが行われている旨説明が記載されていたのですが、今はrails-html-sanitizer gemを使うようになっており、テストはgemの方で行うようになっている為、その旨コメントを修正しています。


Merge pull request #28606 from maclover7/jm-fix-25820

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

ActionController::Metalを継承したcontrollerのresponseのheaderにActionDispatch::Response.default_headersが含まれていたのを、Rails 4系まで同様含まれないよう修正しています。