2015/10/13分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actionmailer/CHANGELOG.md
Move the methods for schema dumping into {mysql,postgresql}/schema_dumper.rb
Active RecordのConnectionAdapterの修正です。
各adapterクラス内に定義されていたschema dumpingに関する処理を、adapter毎に新規にdumper moduleを作成し、そこで処理を行うよう修正しています。
Merge pull request #17388 from akampjes/master
actionmailer/lib/action_mailer/railtie.rb
の修正です。
config.force_ssl
にtrueが設定されていた場合、自動でconfig.action_mailer.default_url_options
に{ protocol: 'https' }
を設定するよう対応しています。
Merge pull request #21288 from yahonda/mysql_requires_password
activerecord/Rakefile
、activerecord/test/cases/adapters/mysql/connection_test.rb
の修正です。
Active RecordでMySQLを使用したテストで、mysqlのコマンドを実行する際、configに指定したpasswordを使用するよう修正しています。
config = ARTest.config['connections']['mysql'] - %x( mysql --user=#{config['arunit']['username']} -e "create DATABASE #{config['arunit']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ") - %x( mysql --user=#{config['arunit2']['username']} -e "create DATABASE #{config['arunit2']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ") + %x( mysql --user=#{config['arunit']['username']} --password=#{config['arunit']['password']} -e "create DATABASE #{config['arunit']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ") + %x( mysql --user=#{config['arunit2']['username']} --password=#{config['arunit2']['password']} -e "create DATABASE #{config['arunit2']['database']} DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci ") end desc 'Drop the MySQL test databases' task :drop do config = ARTest.config['connections']['mysql'] - %x( mysqladmin --user=#{config['arunit']['username']} -f drop #{config['arunit']['database']} ) - %x( mysqladmin --user=#{config['arunit2']['username']} -f drop #{config['arunit2']['database']} ) + %x( mysqladmin --user=#{config['arunit']['username']} --password=#{config['arunit']['password']} -f drop #{config['arunit']['database']} ) + %x( mysqladmin --user=#{config['arunit2']['username']} --password=#{config['arunit2']['password']} -f drop #{config['arunit2']['database']} ) end
:to_table
when adding a fk through add_reference
.
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
の修正です。
add_reference
メソッドに、table名を明示的にする為のto_table
オプションを追加しています。
add_reference(:products, :supplier, foreign_key: {to_table: :firms})
または、
create_table :testings do |t| t.references :parent, foreign_key: { to_table: :testing_parents } end
という形で使用出来ます。
docs, fix highlighting for code examples in calculations.rb [ci skip]
activerecord/lib/active_record/relation/calculations.rb
のdocの修正です。
calculate
メソッド内のexample codeが正しくハイライトされるよう、インデントを修正しています。
docs, nodoc internal Active Record DelegateCache
. [ci skip]
activerecord/lib/active_record/relation/delegation.rb
の修正です。
Rails 内部でのみ使用する想定のDelegateCache
moduleに:nodoc:
を設定しています。
docs, recognize code examples as Ruby in Relation::QueryMethods
[ci skip]
activerecord/lib/active_record/relation/query_methods.rb
のdocの修正です。
各メソッドのdoc内のexamplesで、実行結果ではなくコメントを記載している箇所の先頭を=>
から #
に修正しています。
例。
# User.preload(:posts) - # => SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2, 3) + # # SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2, 3)
nodoc ActiveRecord::Attribute::UserProvidedDefault
. [ci skip]
activerecord/lib/active_record/attribute/user_provided_default.rb
のdocの修正です。
Rails 内部でのみ使用する想定のUserProvidedDefault
classに:nodoc:
を設定しています。
document EagerLoadPolymorphicError
. [ci skip]
activerecord/lib/active_record/associations.rb
のdocの修正です。
EagerLoadPolymorphicError
クラスにdocを追加しています。
nodoc ActiveRecord::ForeignAssociation
. [ci skip]
activerecord/lib/active_record/associations/foreign_association.rb
のdocの修正です。
Rails 内部でのみ使用する想定のForeignAssociation
moduleに:nodoc:
を設定しています。
docs, add missing :nodoc: for
Associations::Builder`. [ci skip]
Active Recordの修正です。
Rails 内部でのみ使用する想定のActiveRecord::Associations::Builder
moduleに:nodoc:
を設定しています。
docs, :nodoc: FromClause
, QueryAttribute
and WhereClauseFactory
.
Active Recordの修正です。
FromClause
, QueryAttribute
, WhereClauseFactory
クラスに:nodoc:
を設定しています。
private def
breaks RDoc. Move meathod to preserve the docs.
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
structurally_compatible_for_or?
メソッドをprivte配下に移動しています。
元々は、publicメソッドの定義の中で、private def structurally_compatible_for_or?
というふうにstructurally_compatible_for_or?
メソッドのみ個別にprivateを定義していたのですが、このやり方だとRDocのパース処理が上手くいかない、という問題がある為、一旦移動した、という事のようです。