2017/11/09分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Consolidate redundant if
and unless
with the same condition
activerecord/test/cases/transaction_isolation_test.rb
の修正です。
同じ条件でunless
とif
がそれぞれ使われていたのを、if
/ else
にマージしています。
Mysql2Adapter
should pass ConcurrentTransactionTest
activerecord/test/cases/transactions_test.rb
の修正です。
ConcurrentTransactionTest
がMysql2Adapterでも実行されるよう修正しています。
Remove redundant passing --skip-active-storage in test cases
railtiesのテストの修正です。
Do not run active_storage:install
when bundle install is skippedの対応により不要になった、テスト内で--skip-active-storage
を指定したのを削除しています。
Change output log about skipping instalation of Active Storage
railties/lib/rails/generators/app_base.rb
の修正です。
Active Storageのインストール処理をスキップした場合(bundle installが実行されなかった場合)のメッセージ内のコマンド表示のエスケープに"'"を使用していたのを、"`"を使用するよう修正しています。
Run ConcurrentTransactionTest
if supports_transaction_isolation?
activerecord/test/cases/transactions_test.rb
の修正です。
ConcurrentTransactionTest
を実行するかどうかの判定を、supports_transaction_isolation?
メソッドを使用して行うよう修正しています。
Oracle enhanced adapterでも上記テストを実行出来るようにする為。
Correctly kill the server started with ujs test
actionview/Rakefile
の修正です。
rails-ujsのテストで、テストで起動したserverを正しくkill出来ていなかったのを修正しています。
Merge pull request #31078 from aeroastro/feature/fix-typo
actionpack/lib/action_dispatch/http/filter_parameters.rb
のdocの修正です。
ActionDispatch::HTTP::FilterParameters
moduleのdocのグラマーの修正を行っています。
Merge pull request #31077 from gsamokovarov/assert-changes-nil
activesupport/lib/active_support/testing/assertions.rb
の修正です。
assert_changes
、assert_no_changes
メソッドでassertionにassert_equal
、assert_nil
を使用していたのを、assert
を使用するよう修正しています。
- if before.nil? - assert_nil after, error - else - assert_equal before, after, error - end + assert before == after, error
Minitest 5.10からassert_equal
のexpected引数にnilを指定するのがdeprecateになった為、それを避ける為に、resolve minitest 6 deprecation in assert_no_changesでassert_nil
を使用するようにしたのですが、他にも同様の問題が発生する可能性があるため、単純にassert
を使うように変更したようです。
Should pass test_no_locks_no_wait
not only on PostgreSQLAdapter
and OracleAdapter
activerecord/test/cases/locking_test.rb
の修正です。
test_no_locks_no_wait
のテストをPostgreSQLAdapter、OracleAdapterでのみ実行されるようになっていたのを、すべてのadapterで実行されるよう修正しています。
Do not show credentials in generators help
railties/lib/rails/generators.rb
の修正です。
rails generators
のhelpにcredentials
が表示されないよう修正しています。
credentials
generatorはcredentials
コマンド(credentials:edit
)経由で実行される事を想定しており、generatorを直接実行する事は無い為。
Merge pull request #31081 from rails/allow-include-time-with-zone-range
Active Supportの修正です。
Range#include?
にActiveSupport::TimeWithZone
のインスタンスを指定出来るよう修正しています。
# before (1.hour.ago..1.hour.from_now).include?(Time.current) # => TypeError: can't iterate from ActiveSupport::TimeWithZone # after (1.hour.ago..1.hour.from_now).include?(Time.current) # => true
Ruby 2.3から、Rangeの始点/終点ににTime
オブジェクトを指定出来るようになっており、それならばTimeWithZone
も指定出来ても良いだろう、という事で対応されたようです。
参考:Bug #11113: Time ranges cannot be used in case statements in 1.9+ but they could in 1.8.7