2016/01/24分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Document scoping issue with Time.use_zone
activesupport/lib/active_support/core_ext/time/zones.rb
のdocの修正です。
Time::use_zone
メソッドのdocにexampleを追加、及び既に作成済みのインスタンスには設定したtimezoneは影響が無い旨noteを追加しています。
Use the database type to deserialize enum
activerecord/lib/active_record/enum.rb
の修正です。
enumを使用している場合に、DBのデフォルトに設定した値がインスタンスの初期化時に反映されないバグがあったのを修正しています。
Merge pull request #23102 from yui-knk/foreign_type_to_singular_association
Active Recordの修正です。
ActiveRecord::Associations::Builder::BelongsTo.valid_options
、ActiveRecord::Associations::Builder::HasOne.valid_options
それぞれでoptionに:foreign_type
が定義されていたのを、
両方の親クラスであるActiveRecord::Associations::Builder::SingularAssociation
のvalid_options
メソッドをで:foreign_type
を定義してしまうよう修正しています。
Add environment back to db:structure:load
activerecord/lib/active_record/railties/databases.rake
の修正です。
db:structure:load
タスク実行時に、environment
を実行するよう修正しています。
元々は不要だったのですが、Prevent destructive action on production database by schneems · Pull Request #22967 · rails/railsの対応によりenvironmentの情報が必要になった為、修正したとの事です。
Split internal subscriber tracking from Postgres adapter
Action Cableの修正です。
ActionCable::SubscriptionAdapter::PostgreSQL
クラスで行っていたsubscriberの処理を、別クラスActionCable::SubscriptionAdapter::SubscriberMap
に切り出しています。
Normalize on no arguments for the success callback
actioncable/lib/action_cable/channel/streams.rb
、
actioncable/lib/action_cable/subscription_adapter/redis.rb
の修正です。
success callbackの呼び出し処理の引数を統一するよう修正しています。
actioncable/lib/action_cable/subscription_adapter/async.rb
、
actioncable/lib/action_cable/subscription_adapter/inline.rb
の修正です。
Action Cableのadaptersに、Action Job同様にActionCable::SubscriptionAdapter::Async
及びActionCable::SubscriptionAdapter::Inline
adapterを追加しています。developmentで使うようですかねえ。
Rails::Generators::Actions#gem should work even if frozen string is passed as argument
railties/lib/rails/generators/actions.rb
の修正です。
Rails::Generators::Actions#gem
の引数にfrozen stringを渡した場合に、RuntimeError
(can't modify frozen String
)が発生してしまっていたのを対応しています。
Allow subscription adapters to be shut down
Action Cableの修正です。
Action Cableの各adapterにshutdown
メソッドを追加しています。名前の通りで、処理終了時に必要な処理が定義しています。
Add tests for the ActionCable adapters
Action Cableの修正です。
Action Cableの各adapterに対するテストを追加しています。
Using a hacked faye-websocket, drop EventMachine
Action Cableの修正です。
EventMachineを使用していた箇所を、concurrent-rubyを使用するよう修正しています。
また、faye-websocket gem自体がEventMachineに依存していたので、concurrent-rubyを使用するよう改造した独自版のfaye-websocketを使用するようにしています。
Import the relevant portions of faye-websocket
Action Cableの修正です。
先で追加した独自版のfaye-websocketを使用するのを、止めてcelluloid/nio4r: New IO for Rubyを使用するよう全体的に修正しています。
元々faye-websocket gemに頼っていた箇所は、Action Cable内にfaye-websocketで行っていたのと同様の処理を行うクラスを追加し、対応しているようです。
Ditch the EM error logging helper
Action Cableの修正です。
EventMachineでエラーになった際にログを出力するよう設定していた処理を削除しています。
Pare back default index
option for the migration generator
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
、
activerecord/lib/active_record/migration/compatibility.rb
の修正です。
migrationファイルでreferences
、belongs_to
メソッドを使用した場合、自動でindex: true
が設定されるよう対応しています。
indexを設定したく無い場合は、index: false
オプションを明示的に指定する必要があります。
Bump mail gem constraint from [~> 2.5, >= 2.5.4] to ~> 2.6
actionmailer/actionmailer.gemspec
の修正です。
mail
gemのバージョンを2.6系を使用するよう修正しています。
mail
gem 2.6.4でmime-types
3.0.0への対応が行われており、そちらを使用出来るようにする為、のようです。
が、mail
gem 2.5系を使えなくする必要性は無いだろう、という事で、後ほどrevertされています。
railtiesのテストの修正です。
テストの中で、bin/rake
を使用していた箇所をまとめてbin/rails
コマンドを使用するよう修正しています。
Test files has to be named *_test.rb
Active Supportのテストの修正です。
テストの中に、ファイル名が*_test.rb
になっていないファイルがあったので、*_test.rb
にファイル名を修正しています。
:warning: mismatched indentations at 'end' with 'unless'
activesupport/test/multibyte_grapheme_break_conformance_test.rb
、
activesupport/test/multibyte_normalization_conformance_test.rb
の修正です。
end
のインデントがおかしくなっている箇所があったのを修正しています。
Put test-case dependent helper Class inside the test case
Active Supprtの修正です。
テスト無いで使用するhelper classがグローバルに定義されていたのを、各テストケースの中で定義するよう修正しています。
同じ名前のhelper class / methodで各テストファイルに定義されており、グローバルのままだと、既に定義である旨Rubyのワーニングが出てしまう為、のようです。
Merge pull request #23213 from Ferdy89/docs_format_contraints_with_glob
rails guideのRails Routing from the Outside In
の修正です。
Request-Based Constraints
の項に、format
constraintを使用する場合のexample、及び注意事項を追記しています。