なるようになるブログ

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

rails commit log流し読み(2016/11/20)

2016/11/20分のコミットです。

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


Fix tests for prepared_statements: false and queries hitting #select_all

activerecord/test/cases/adapters/postgresql/prepared_statements_test.rbの修正です。

prepared statementsをdisabledにした場合のテストで、ActiveRecord::Base.connectionprepared_statementsの値を操作してテストを行っていたのを、prepared_statements: falseを指定したconfigを準備し、そちらを使用するよう修正しています。


Fix typo s/with/without/

activerecord/test/cases/adapters/postgresql/prepared_statements_test.rbの修正です。

先程コミットされたprepared statementsのテストで接続先名をタイポしていた(arunit_with_prepared_statements -> arunit_without_prepared_statements)のを修正しています。


fix typo in match doc [ci skip]

actionpack/lib/action_dispatch/routing/mapper.rbのdocの修正です。

ActionDispatch::Routing::Mapper::Base#matchメソッドのdocで、ConstraintsConstrainsにタイポしていたのを修正しています。

が、ここは文脈的にConstrainsで正しかった為、後ほどrevertされています。


Revert "fix typo in match doc [ci skip]"

先ほどコミットされた、ActionDispatch::Routing::Mapper::Base#matchメソッドのdoc内のConstraintsConstrainsに修正した対応をrevertしています。理由は上記参照。


Change html-scanner to rails-html-sanitizer

Rails guideのAction View Overviewの修正です。

strip_tags(html)の項の説明で、strip_tagsメソッドを提供しているgemの名前が誤っていたのを修正しています。


Do not rely on Ruby implementation in AM test

activemodel/test/cases/validations/numericality_validation_test.rbの修正です。

numericality validation のテストで、Floatの"97.18"がBigDecimalの"97.18"より大きい事が前提となっているテストがあるのですが、MRI以外のJRuby等ではこれらの値は同値として判断される為、テストがエラーになってしまていた為、テストに使用する値を調整しています。


Use existing --skip-turbolinks option for conditionals instead of checking if turbolinks is present in gemfile list

railties/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.ttrailties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.ttの修正です。

turbolinks をrequireするかどうかの判定にgemfile_entriesの内容を確認していたのを、skip_turbolinksオプションの値を参照するよう修正しています。


Fix prepared statements disabled test again

activerecord/test/cases/adapters/postgresql/prepared_statements_disabled_test.rbの修正です。

prepared statementsをdisabledにした場合のテストで、query methodを呼び出してエラーがraiseしない事だけを確認していたのを、値が正しく取れる事も確認するよう修正しています。