2015/01/05分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
deprecateになっていたメソッド/クラスの削除、挙動の変更に関する対応、及び、Ruby 2.2未満用のパッチ・ワークアラウンド処理の削除対応が行われています。
- Remove deprecated
serve_static_assets
configuration - Remove deprecated
RAILS_CACHE
constant - Remove deprecated
Rails::Rack::LogTailer
- Remove deprecated
test:all
andtest:all:db
tasks
- Add has_secure_token to Active Record
- remove deprecation warning when modifying a Relation with cached arel.
- remove deprecated support for PG ranges with exclusive lower bounds.
- remove deprecated support to preload instance-dependent associaitons.
Remove deprecation warning when log_level is not explicit set on production
railties/lib/rails/application/bootstrap.rb
、
railties/lib/rails/application/configuration.rb
の修正です。
production envでlog_level
が未設定の場合に出力していたwarnメッセージを削除しています。
Remove deprecated serve_static_assets
configuration
railties/lib/rails/application/configuration.rb
の修正です。
deprecateになっていたconfig.serve_static_assets
を削除しています。
Remove deprecated RAILS_CACHE
constant
railties/lib/rails/deprecation.rb
の修正です。
deprecateになっていたRAILS_CACHE
定数を削除しています。
Remove deprecated Rails::Rack::LogTailer
railties/lib/rails/rack.rb
の修正です。
deprecateになっていたRails::Rack::LogTailer
クラスを削除しています。
Remove deprecated test:all
and test:all:db
tasks
railties/lib/rails/test_unit/testing.rake
の修正です。
deprecateになっていたtest:all
、test:all:db
タスクを削除しています。
各コンポーネントから、不要なrequires
を削除しています。
Merge pull request #18321 from mackshkatz/master
rails guideのActive Record Query Interface
の修正です。
Model.find(options)
を実行した際に呼び出されるcallbackの説明にafter_initialize
が漏れていたので、追加しています。
railties/CHANGELOG.md
の修正です。
CHANGELOGに名前を追加するのが漏れていたのを対応しています。
Remove unneeded require 'as/deprecation'
各ファイルから、'active_support/deprecation'
を削除しています。
Add has_secure_token to Active Record
ActiveRecordの修正です。ActiveRecordにhas_secure_token
メソッドを追加してます。
例。
# Schema: User(toke:string, auth_token:string) class User < ActiveRecord::Base has_secure_token has_secure_token :auth_token end user = User.new user.save user.token # => "44539a6a59835a4ee9d7b112" user.auth_token # => "e2426a93718d1817a43abbaa" user.regenerate_token # => true user.regenerate_auth_token # => true
Simplify boolean casting logic
activerecord/lib/active_record/type/boolean.rb
の修正です。
Boolean#cast_value
メソッドのリファクタリングです。booleanクラスへの変換処理を修正しています。
Use directly TZInfo::Timezone without proxy
activesupport/lib/active_support/values/time_zone.rb
の修正です。
find_tzinfo
メソッドでTZInfo::TimezoneProxy
のインスタンスではなく、TZInfo::Timezone
のインスタンスを作成するよう修正しています。
timezoneがロードされてない場合を考慮してTimezoneProxy
を使ってたようなのですが、create
メソッドの延長で必ずロードされるので、
TimezoneProxy
を使用するのは不要との事で削除したようです。
remove files which is dependent on ruby1.9 as we do not support Ruby1.9
activerecord/lib/active_record/attribute_methods/read.rb
、
activerecord/lib/active_record/attribute_methods/write.rb
activesupport/lib/active_support/core_ext/module/method_transplanting.rb
の修正です。
Ruby 1.9サポートの為に使用していたModule.methods_transplantable?
メソッドを削除しています。
Remove hack to support BigDecimal in Ruby 1.9
activesupport/lib/active_support/core_ext/object/duplicable.rb
、
activesupport/test/core_ext/object/duplicable_test.rb
の修正です。
Ruby 1.9サポートの為に行っていてBigDecimal
クラスのチェック処理を削除しています。
Remove Psych hack for Ruby 1.9
railties/lib/rails/application.rb
の修正です。
Ruby 1.9サポートの為に行っていたPsych
クラスへのy
メソッドの追加処理を削除しています。
Remove Thread hack for Ruby 1.9
activerecord/test/cases/transactions_test.rb
の修正です。
RUBY_VERSION
のチェック処理を削除しています。 Ruby 1.9だと動作しないテストがあり、そのテストを避ける為にチェック処理を入れていたようです。
Remove LoadError#path hack for Ruby 1.9
activesupport/test/dependencies_test.rb
の修正です。
RUBY_VERSION
のチェック処理を削除しています。 LoadError#path
メソッドが1.9系に存在しない為、スキップする必要があるテストがあった為チェックを入れていたようです。
Remove version conditional for find_template_paths
actionview/lib/action_view/template/resolver.rb
の修正です。
Rubyのバージョンにより処理を分けていたのを、古いバージョンの処理を削除しています。 File.fnmatch
メソッドが使えるかどうかでの違いでした。
Remove version conditional for calling GC.disable
activerecord/test/cases/finder_test.rb
の修正です。
Rubyのバージョンチェックを削除しています。
1.9系サポート終了に伴い、debugger
gemに関する処理をすべて削除しています。
No need to disable sidikiq tests with 1.9.3 anymore
activejob/test/helper.rb
の修正です。
Ruby 1.9.3の場合sidekiqのテストを行わないようにしていたのですが、そのチェック処理を削除しています。Ruby 1.9.3ではSidekiqは動かないとの事。
actionview/test/actionpack/abstract/abstract_controller_test.rb
の修正です。
誤ったTODOコメントがあったのを削除しています。
Remove some comments about Ruby 1.9 behaviors
1.9 - 2系で微妙に挙動が異なるケースがあり、その挙動についてコメントに記載されていたのを一通り削除しています。
Remove unneeded Time patch to support Ruby 1.9
activesupport/lib/active_support/core_ext/time/marshal.rb
の修正です。
Ruby 1.9.2の為に必要だったTime
クラスへのパッチを削除しています。
singleton_class? is already pressent at Ruby 2.2
activesupport/lib/active_support/core_ext/class/attribute.rb
の修正です。
singleton_class?
メソッドを削除しています。Ruby本体で提供済みの為。
String already respond_to scrub at Ruby 2.2
activesupport/lib/active_support/multibyte/unicode.rb
の修正です。
String
がscrub
メソッドを呼び出せるかどうかチェックしている処理を削除しています。
activesupport/lib/active_support/core_ext/struct.rb
の修正です。
Struct#to_h
メソッドを削除しています。これも、Ruby本体でサポート済みの為。
Remove workaround to a Ruby 2.0.0 bug
activesupport/lib/active_support/duration.rb
の修正です。
Duration#===
メソッドを削除しています。
Ruby 2.0.0-p353にあったバグの為のワークアラウンドとの事。
Remove extra class_eval for Ruby 1.9
activesupport/lib/active_support/core_ext/module/attr_internal.rb
の修正です。
Ruby 1.9の為にあったclass_eval
メソッドの呼び出しを削除しています。
Remove respond_to/respond_with placeholder methods
actionpack/lib/action_controller/metal/mime_responds.rb
の修正です。
deprecateメッセージを出力する為に残していたrespond_to
/respond_with
メソッドを削除しています。
actionpack/lib/action_controller/metal/mime_responds.rb
の修正です。
不要なrequire
を削除しています。
Do not include Active Support on tests
activesupport/test/xml_mini/nokogiri_engine_test.rb
、
activesupport/test/xml_mini/nokogirisax_engine_test.rb
、
activesupport/test/xml_mini/rexml_engine_test.rb
の修正です。
各テストで行っていたjActiveSupport
のinclude
処理を削除しています。include
する必要は無いだろう、との事。
[guides] Added newer find_by syntax example in 4.2 release notes for Adequate Record [skip ci]
rails guideのRuby on Rails 4.2 Release Notes
の修正です。
Adequate Record
の項のexampleにfind_by
メソッドのexampleを追加しています。
Document all options for protect_from_forgery.
actionpack/lib/action_controller/metal/request_forgery_protection.rb
のdocの修正です。
protect_from_forgery
メソッドのdocで、:if/:unless
オプションについての説明が無かったのを追加しています。
activerecord/CHANGELOG.md
の修正です。
クラス名をバッククォートでくくるよう修正しています。
remove deprecation warning when modifying a Relation with cached arel.
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
cacheされてた@arel
とrelationが一緒に変更になった時に出力されてたdeprecateメッセージが削除され、ImmutableRelation
がraiseされるよう修正されています。
can't kill thread with in-memory db. fixes rake test:sqlite3_mem
.
activerecord/test/cases/transactions_test.rb
の修正です。
threadをkillした場合にrollbackされる事の確認の為のテストを、in memory dbの場合は行わないよう修正しています。
remove deprecated support for PG ranges with exclusive lower bounds.
activerecord/lib/active_record/connection_adapters/postgresql/oid/range.rb
の修正です。
deprecateになっていた、PostgreSQLのarrayに小括弧から始まる値を指定された場合の処理が削除されています。
(1, 10]
のような書き方が出来ていたとの事。知らなかった。
remove deprecated support to preload instance-dependent associaitons.
activerecord/lib/active_record/reflection.rb
の修正です。
deprecateになっていたinstance dependent associationsのpreloading / eager loading処理を削除しています。
Fix typo in changelog [ci skip]
activerecord/CHANGELOG.md
の修正です。タイポの修正。
remove unneeded check since /_one_time_conditions/ is removed
actionpack/lib/abstract_controller/base.rb
の修正です。
action_methods
メソッドでmethodの一覧を作成する際、_one_time_conditions
という名前のメソッドは除外しようとしているのですが、
そもそもどこにも_one_time_conditions
という名前のメソッドは無いので、除外処理を削除しています。
Reset template assertions without warnings
actionpack/lib/action_controller/test_case.rb
の修正です。
存在しない変数に対してinstance_variable_get
をしようとしてwarningが出てしまっていたので、instance_variable_defined?
で対象の変数が存在するかチェックするよう修正しています。
reflects changes in 34cd7e2 in the index [ci skip]
guides/source/documents.yaml
の修正です。
"Constant Autoloading and Reloading" guideを "Autoloading and Reloading Constants"に修正しています。
activerecord/test/cases/secure_token_test.rb
の修正です。
has_secure_token
メソッドに関するテストの、テスト名の整理を行っています。