なるようになるブログ

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

rails commit log流し読み(2017/11/01)

2017/11/01分のコミットです。

CHANGELOGへの追加はありませんでした。


Fix grammar issue [ci skip]

RELEASING_RAILS.mdの修正です。

Send Rails release announcementsの項のグラマーの修正(カンマの追加)を行っています。


Address incorrect number of queries executed at Oracle enhanced adapter

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

DBにOracleを使用した場合に、SQLCounterで無視するqueryにall_sequencesからのselectを追加しています。

-    oracle_ignored     = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO/, /^\s*select .* from all_triggers/im, /^\s*select .* from all_constraints/im, /^\s*select .* from all_tab_cols/im]
+    oracle_ignored     = [/^select .*nextval/i, /^SAVEPOINT/, /^ROLLBACK TO/, /^\s*select .* from all_triggers/im, /^\s*select .* from all_constraints/im, /^\s*select .* from all_tab_cols/im, /^\s*select .* from all_sequences/im]

Oracle enhanced adapter側で、独自のschema cachingを使用していたのをRailsが生成したscehema cacheを使用するよう最近変更したのですが、その影響で不要なSQLがカウントされるようになり、結果テストが失敗するようになってしまった為、上記対応を行ったとの事です。


Enable Style/RedundantReturn rubocop rule, and fixed a couple more

.rubocop.ymlStyle/RedundantReturn copを追加、及び書くファイルにルールを適用しています。


Fix failing bundle install on CI

Gemfile.lockの修正です。

バグレポートテンプレートについてのテストがCI上でエラーになってしまっていて、その対策としてbundle installを実行しています。

が、これだとまだ駄目で、対応が続きます。


Avoid bundler 1.16.0 for now

.travis.ymlの修正です。

CIで使用するbundlerを1.15.4に固定しています。

バグレポートテンプレートではinline gemfileを使用しているのですが、bundler 1.1.6.0でinline gemfileを使用した際にエラーになる事がある為。

参考:Problem with inline gemfiles in 1.16.0.pre2


Remove bundler 1.16.0

.travis.ymlの修正です。

bundler 1.15.4をインストールする前に、既にインストール済みのbundlerを削除するようにしています。

デフォルトでbundler 1.16.0がインストールされてしまい、そのままだとbundler 1.15.4をインストールしても1.16.0の方が使用されてしまうため。


Workaround for ActionMailer failures by not installing mail 2.7

Gemfileの修正です。

mail gemのバージョンを2.7未満に固定しています。

mail gem 2.7.0でAction Mailerのテストがコケてしまうため。


Fix tests on Mail 2.7

Gemfile、及び、Action Mailerのテストの修正です。

Gemfilemail gemのバージョンロックを削除、及び、Action Maiterのテストをmail 2.7.0で通るよう修正しています。


updates autoloading guide for Ruby 2.5 [ci skip]

rails guideのAutoloading and Reloading Constantsの修正です。

定数探索についての説明に、Ruby 2.5の場合の挙動について説明を追加しています。トップレベルの定数探索のルールが変更になった件等。