2017/10/10分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #30798 from bogdanvlviv/express-change_column_comment-as-public-api
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
のdocの修正です。
change_column_comment
メソッドをpublic APIにしています。通常ユーザが使用するメソッドの為。
Merge pull request #30832 from y-yagi/simplify_console_test
railties/test/commands/console_test.rb
の修正です。
ConsoleTest#parse_arguments
メソッドで引数のparse処理にConsoleCommand
クラスを使用するようリファクタしています。
Merge pull request #30836 from shioyama/generated_attribute_methods_include_mutex
activerecord/lib/active_record/attribute_methods.rb
の修正です。
GeneratedAttributeMethods
のインスタンスにMutex_m
をextendしていたのを、クラスに対してincludeするよう修正しています。
- class GeneratedAttributeMethods < Module; end # :nodoc: + class GeneratedAttributeMethods < Module #:nodoc: + include Mutex_m + end module ClassMethods def inherited(child_class) #:nodoc: @@ -42,7 +44,7 @@ def inherited(child_class) #:nodoc: end def initialize_generated_modules # :nodoc: - @generated_attribute_methods = GeneratedAttributeMethods.new { extend Mutex_m } + @generated_attribute_methods = GeneratedAttributeMethods.new
ancestors
メソッドの結果にGeneratedAttributeMethods
が正しく表示されるようにする為、との事です。
# before User.ancestors # => [User(id: integer, name: string, email: string, created_at: datetime, updated_at: datetime), User::GeneratedAssociationMethods, #<#<Class:0x00560456dc2f20>:0x00560456dc3100>, ApplicationRecord(abstract), ApplicationRecord::GeneratedAssociationMethods, #<#<Class:0x00560456df1190>:0x00560456df1348>, ActiveRecord::Base, GlobalID::Identification, ActiveRecord::Suppressor, ActiveRecord::SecureToken, ActiveRecord::Store, ActiveRecord::Serialization, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Reflection, ActiveRecord::NoTouching, ActiveRecord::TouchLater, ActiveRecord::Transactions, ActiveRecord::Aggregations, ActiveRecord::NestedAttributes, ActiveRecord::AutosaveAssociation, ActiveModel::SecurePassword, ActiveRecord::Associations, ActiveRecord::Timestamp, ActiveRecord::Callbacks, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, ActiveRecord::Base::GeneratedAssociationMethods, #<#<Class:0x00560455f92888>:0x00560455f92a18>, ActiveRecord::AttributeMethods, ActiveModel::AttributeMethods, ActiveModel::Validations::Callbacks, ActiveRecord::DefineCallbacks, ActiveRecord::Locking::Pessimistic, ActiveRecord::Locking::Optimistic, ActiveRecord::AttributeDecorators, ActiveRecord::Attributes, ActiveRecord::CounterCache, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveSupport::Callbacks, ActiveModel::Validations, ActiveRecord::Integration, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::AttributeAssignment, ActiveModel::ForbiddenAttributesProtection, #<Module:0x00560456dc0298>, ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, ActiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, ActiveRecord::Core, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, ActiveSupport::Dependencies::Loadable, Kernel, BasicObject]
# after User.ancestors # => [User(id: integer, name: string, email: string, created_at: datetime, updated_at: datetime), User::GeneratedAssociationMethods, #<ActiveRecord::AttributeMethods::GeneratedAttributeMethods:0x007f8c100b1348>, ApplicationRecord(abstract), ApplicationRecord::GeneratedAssociationMethods, #<ActiveRecord::AttributeMethods::GeneratedAttributeMethods:0x007f8c100b3120>, ActiveRecord::Base, GlobalID::Identification, ActiveRecord::Suppressor, ActiveRecord::SecureToken, ActiveRecord::Store, ActiveRecord::Serialization, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Reflection, ActiveRecord::NoTouching, ActiveRecord::TouchLater, ActiveRecord::Transactions, ActiveRecord::Aggregations, ActiveRecord::NestedAttributes, ActiveRecord::AutosaveAssociation, ActiveModel::SecurePassword, ActiveRecord::Associations, ActiveRecord::Timestamp, ActiveRecord::Callbacks, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, ActiveRecord::Base::GeneratedAssociationMethods, #<ActiveRecord::AttributeMethods::GeneratedAttributeMethods:0x005622995ceb00>, ActiveRecord::AttributeMethods, ActiveModel::AttributeMethods, ActiveModel::Validations::Callbacks, ActiveRecord::DefineCallbacks, ActiveRecord::Locking::Pessimistic, ActiveRecord::Locking::Optimistic, ActiveRecord::AttributeDecorators, ActiveRecord::Attributes, ActiveRecord::CounterCache, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveSupport::Callbacks, ActiveModel::Validations, ActiveRecord::Integration, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::AttributeAssignment, ActiveModel::ForbiddenAttributesProtection, #<Module:0x00562298182098>, ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, ActiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, ActiveRecord::Core, ActiveSupport::ToJsonWithActiveSupportEncoder, Object, PP::ObjectMixin, JSON::Ext::Generator::GeneratorMethods::Object, ActiveSupport::Tryable, ActiveSupport::Dependencies::Loadable, Kernel, BasicObject]
これで変わるんですねえ。
Merge pull request #30595 from bogdanvlviv/use-railties-rails-command
railtiesのテストの修正です。
- 不要な
Dir.chdir
を削除 db:test:prepare
のテストから不要なRAILS_ENV
の設定処理を削除- helperファイル生成のテストで、
rails
メソッドを使用するよう修正
等を行っています。
Update security guide for signed cookie rotations
actionpack/test/dispatch/cookies_test.rb
、及び、rails guideのRuby on Rails Security Guide
の修正です。
signed cookieのdigestをrotateする場合のテストを追加、及び、guideのRotating Encrypted and Signed Cookies Configurations
の項に説明を追加しています。
activesupport/lib/active_support/message_encryptor.rb
のdocの修正です。
ActiveSupport::MessageEncryptor
クラスのdoc内のexampleコードで、変数名が誤っていたのを修正しています。