2017/12/01分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Move system test dependencies to test group
railties/lib/rails/generators/rails/app/templates/Gemfile.tt
の修正です。
system test用のgem(capybara
、selenium-webdriver
等)がdevelopment
、test
group両方にいたのを、test
groupだけにいるよう修正しています。
Add changelog entry for 9d6e28
actionpack/CHANGELOG.md
の修正です。
System Testで取得するscreenshotsのデフォルトをsimple
からinline
に変更した対応(Make screenshots default to "simple" format)についてCHANGELOGにエントリーを追記しています。
Merge pull request #31292 from noahd1/patch-1
.codeclimate.yml
の修正です。
Code Climate's の新しいチェックが実行されないよう、各チェック項目にfalseを指定しています。
+checks: + argument-count: + enabled: false + complex-logic: + enabled: false + file-lines: + enabled: false + method-complexity: + enabled: false + method-count: + enabled: false + method-lines: + enabled: false + nested-control-flow: + enabled: false + return-statements: + enabled: false + similar-code: + enabled: false + identical-code: + enabled: false +
Code Climateの仕様変更として、元々のチェックとは別に独自のチェックを行うようになるらしく、それらのチェックを実行されないようにする為(今まで通りRubocopのチェックだけ実行されるようにする)に、上記設定を追加しています。
各項目個別に指定しなきゃならないのちょっと辛いそうですが、今の所これは仕様との事です。PRはCode Climateの中の人からでした。
参考:
Merge pull request #31296 from dixitp012/configuration_update_links
rails guideのConfiguring Rails Applications
の修正です。
Unicornについてのリンクを http://unicorn.bogomips.org/からhttps://bogomips.org/unicorn に修正、及び、NGINXのdocへのリンクのプロトコルをhttpsに修正しています。
Merge pull request #31293 from ydakuka/fix-gemfile-guides
各doc内の"Gemfile"をバッククォートで囲むよう修正しています。
Maintain raising RecordNotFound
for class level update
anddestroy
activerecord/lib/active_record/persistence.rb
の修正です。
Ensure returning affected objects for class level update
and destroy
で、class levelのupdate
、destroy
が更新・削除されたオブジェクトのみ返すよう修正、及び、左記対応の為にRecordNotFound
を抑止するようにしました。
が、それだと、update
やdestroy
に不正な値(params[:id]
をそのまま渡したような場合)を指定した場合にRecordNotFound
がraiseされず、非互換になってしまう(通常不正なidの値をdestroy
しようとした場合、404ページが表示されて欲しいか、RecordNotFound
がraiseされないと使う側が明示的に404用の対応を行う必要がある)為、RecordNotFound
は抑止せずそのままraiseするよう修正しています。
Add ActiveStorage::Previewer#logger to match ActiveStorage::Analyzer#logger
activestorage/lib/active_storage/previewer.rb
の修正です。
ActiveStorage::Previewer#logger
メソッドを追加しています。中身はActiveStorage.logger
を返すだけ。
Class level update
and destroy
checks all the records exist before making changes (#31306)
activerecord/lib/active_record/persistence.rb
の修正です。
class levelのupdate
、destroy
に不正なidが渡された場合にそのidが無視されていたのを、不正なidがあった場合はエラー(ActiveRecord::RecordNotFound
)をraiseするよう修正しています。
activerecord/test/cases/persistence_test.rb
の修正です。
class levelのupdate
に不正なidを指定した場合のテストから、不要なscoping
メソッドの呼び出しを削除しています。
Merge pull request #31241 from matthewd/no-after-fork
railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt
の修正です。
デフォルトのPuma用のconfigファイルから、before_fork
時のActiveRecord::Base.connection_pool.disconnect!
の呼び出し、及び、on_worker_boot
時のActiveRecord::Base.establish_connection
の呼び出しをそれぞれ削除しています。
Flush idle database connections及びImprove AR connection fork safetyの対応によりconnectionの破棄等をRails側で自動で行うよになり、Puma側で明示的に対応する必要が無くなった為。
Merge pull request #19090 from gregnavis/support-postgresql-operator-classes-in-indexes
Active Recordの修正です。
add_index
メソッドでPostgreSQLのoperator classを指定出来るよう修正しています。
operator classはopclass
keyで指定出来るようになっています。
add_index :users, :name, using: :gist, opclass: { name: :gist_trgm_ops }
actionview/CHANGELOG.md
、activerecord/CHANGELOG.md
の修正です。
メソッド名のエスケープ及びexampleコードに中括弧が不足している箇所があったのを修正しています。
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
の修正です。
add_index
メソッドにopclass
を指定するexampleに余計な閉じ括弧があったのを削除しています。