2019/08/02分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
privateメソッドを定義するのに、
private def _back_url
という書き方(メソッド定義の前にprivate
を使用する)をしていたのを、
def _back_url # ... end private :_back_url
に修正しています。既存のRailsのコードではprivate def xx
という書き方をしておらず、一貫性の為に、との事です。
参考: These methods doesn't have to be protected
actionview/lib/action_view/layouts.rb
の修正です
_write_layout_method
メソッドのprivate指定の箇所に誤りがあったのを修正しています。
Add tests for selecting aggregates
activerecord/test/cases/calculations_test.rb
の修正です。
AVG
のような集計関数を使用した場合に、その結果がvirtual attributeとして参照出来る + 正しいcolumn typeになっている事を確認するテストを追加しています。
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
Preserve user supplied joins order as much as possibleでjoinの順序によって正しくjoinの重複排除が出来ないバグがあったのを修正しています。
MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now
ActiveSupport::TestCase
のクラス定義時にActiveSupport::Testing::MethodCallAssertions
をincludeするよう修正し、各ファイルで個別にincludeせずに使用出来るよう修正しています。
が、mock用の処理をアプリケーションに公開したくない、との事で後ほどRevertされています。
You give jruby_skip & rubinius_skip a good name
各コンポーネントのテストで独自に定義していたrubinius_skip
、jruby_skip
メソッドを実装したmodule(ActiveSupport::Testing::AlternativeRuntimeSkipper
)を追加 + ActiveSupport::TestCase
でincludeするようにして、各コンポーネントのテストからでrubinius_skip
、jruby_skip
メソッドを削除しています。
が、jruby_skip
とrubinius_skip
メソッドをアプリケーションに公開したくない、との事で後ほどRevertされています。
require only what each test concerns
Active Supportのテストでactive_support/core_ext/object
をrequireしていたのを、必要な機能のファイルのみをrequireするよう修正しています。
Missing require AS/core_ext/object/blank
activesupport/lib/active_support/inflector/methods.rb
の修正です。
不足していたactive_support/core_ext/object/blank
のrequireを追加しています。
Let's try not to depend too much on other core extensions in a core extension test
activesupport/test/core_ext/object/json_gem_encoding_test.rb
の修正です。
動的にテストを定義する際にString#underscore
を使用していたのを、使用しないよう修正しています。core extensionのテストでcore extensionの機能に依存するのを避ける為。
Missing require AS/core_ext/string/inflections
activesupport/lib/active_support/core_ext/marshal.rb
の修正です。
不足していたactive_support/core_ext/string/inflections
のrequireを追加しています。
No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29f
You give jruby_skip & rubinius_skip a good nameで削除したActiveModel::TestCase
を使用している箇所をActiveSupport::TestCase
を使用するよう修正しています。
Lazily evaluate FileUpdateCheckerSharedTests when being included
FileUpdateCheckerSharedTests
moduleの各処理を、include時に定義するよう修正しています。
Remove duplicate method definition
railties/lib/rails/generators.rb
の修正です。
Rails::Generators
からno_color!
メソッドを削除しています。Rails::Generators
がincludeしているRails::Command::Behavior
でまったく同じ内容のメソッドが定義されている為。
Add *_previously_was attribute methods when dirty tracking (#36836)
activemodel/lib/active_model/dirty.rb
の修正です。
dirty tackingに変更前の値を取得する_previously_was
メソッドを追加しています。
pirate.update(catchphrase: "Ahoy!") pirate.previous_changes["catchphrase"] # => ["Thar She Blows!", "Ahoy!"] pirate.catchphrase_previously_was # => "Thar She Blows!"
hash_conversion itself does not at all depend on time extensions
activesupport/lib/active_support/core_ext/hash/conversions.rb
の修正です。
不要なrequireを削除しています。
Missing require AS/core_ext/date/conversions
activesupport/test/core_ext/hash_ext_test.rb
、
activesupport/test/xml_mini_test.rb
の修正です。
不足していたactive_support/core_ext/date/conversions
のrequireを追加しています。
Revert "You give jruby_skip & rubinius_skip a good name"
rubinius_skip
、jruby_skip
メソッドを実装したmodule(ActiveSupport::Testing::AlternativeRuntimeSkipper
)を追加した、You give jruby_skip & rubinius_skip a good nameをRevertいしています。理由は先に記載した通り。
Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now"
ActiveSupport::TestCase
のクラス定義時にActiveSupport::Testing::MethodCallAssertions
をincludeするよう修正した、MethodCallAssertions is a regular player of the team ActiveSupport::TestCase nowをRevertしています。理由は先に記載した通り。
Revert "No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29f"
ActiveModel::TestCase
を使用している箇所をActiveSupport::TestCase
を使用するよう修正した、No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29fをRevertしています。 Revert "You give jruby_skip & rubinius_skip a good name"に伴いActiveModel::TestCase
が復活した為。
Require integer conversion for this test
actionview/test/template/date_helper_test.rb
の修正です。
不足していたactive_support/core_ext/integer/time
のrequireを追加しています。
Require time extensions in the job that depends on time
activejob/test/jobs/timezone_dependent_job.rb
の修正です。
不足していたactive_support/time
のrequireを追加しています。
ConditionalGet needs time core_ext
actionpack/lib/action_controller/metal/conditional_get.rb
の修正です。
不足していたactive_support/core_ext/integer/time
のrequireを追加しています。
This test needs integer core ext for time
actionview/test/template/date_helper_i18n_test.rb
の修正です。
不足していたactive_support/core_ext/integer/time
のrequireを追加しています。
Merge pull request #36814 from eileencodes/introduce-invalid-configuration-error
activerecord/lib/active_record/database_configurations.rb
の修正です。
database configurationsの内容が誤っている場合に使用する為のActiveRecord::DatabaseConfigurations::InvalidConfigurationError
を追加しています。