2015/08/24分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
actionpack/lib/action_dispatch/middleware/flash.rb
の修正です。
envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正しています。
convert more @env
access to get / set header
actionpack/lib/action_controller/test_case.rb
、
actionpack/lib/action_dispatch/middleware/cookies.rb
の修正です。
引き続き、envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正しています。
actionpack/lib/action_controller/test_case.rb
の修正です。
引き続き、envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正しています。
actionpack/lib/action_controller/test_case.rb
の修正です。
引き続き、envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正しています。
actionpack/lib/action_controller/test_case.rb
の修正です。
引き続き、envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正しています。
remove env access from debug_exceptions
actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
の修正です。
引き続き、envの値を取得/設定する際、env hashを直接操作するのではなく、getter /setter メソッド経由で値を操作するよう修正、及び、
DebugExceptions#render_exception
メソッド、DebugExceptions#log_error
メソッドの引数をenv hashからrequest objectに修正しています。一度作成したrequest objectを使いまわせせるようにするため、との事。
use Request#path_info
instead of direct ENV access
actionpack/lib/action_dispatch/middleware/public_exceptions.rb
の修正です。
PublicExceptions#call
メソッドでenvの値をする際、env hashを直接操作するのではなく、requestオブジェクト経由で値を取得するよう修正しています。
use methods on the request object instead of accessing env
actionpack/lib/action_dispatch/middleware/show_exceptions.rb
の修正です。
ShowExceptions#render_exception
メソッドの引数をenv hashからrequestオブジェクトに変更し、必要な値を取得する際、env hashから直接値を取得するのではなく、requestオブジェクト経由で値を取得するよう修正しています。
Removed Mocha from ActionView part 1
ActionViewのテストの修正です。
mock処理に、mochaではなく、rails内部のヘルパーメソッドを使用するよう修正しています。 part 1とコミットログにある通り、まだ作業中のようです。
Fix docs for debugging [ci skip]:
rails guideのDebugging Rails Applications
の修正です。
- threadのコマンドリストの、タイトル説明の間に区切りのコロンを追加
The Shell
の項にタイポがあったのを修正continue
とfinish
コマンドについて説明している箇所のエスケープ箇所の調整
をまとめて行っています。
rails guideのAPI Documentation Guidelines
の修正です。
Comma
の項のグラマーの修正を行っています。
add commas removed earlier [ci skip]
rails guideのRuby on Rails Security Guide
の修正です。
Countermeasures
の項、カンマのフォーマットを、oxford comma形式に修正しています。
Revert "[ci skip] Fix to a, b or c
format"
rails guideのActive Support Core Extensions
の修正です。
Changing Components
の項、カンマのフォーマットを、oxford comma形式に戻しています。
actionpack/test/controller/live_stream_test.rb
の修正です。
test_abort_with_full_buffer
から、使用していない変数を削除しています。
Only nullify persisted has_one target associations
activerecord/lib/active_record/associations/has_one_association.rb
の修正です。
has_one association + dependent nullifyを使用している場合に、データが保存済みのレコードについてのみnullifyを行うよう修正しています。
dependentの書き方によって、削除済みのレコードに対してnullifyをしようとしてしまいエラーになってしまう問題があった為修正しています。PRより。
class Car < ActiveRecord::Base has_one :engine, dependent: :nullify end class Engine < ActiveRecord::Base belongs_to :car, dependent: :destroy end
car = Car.create! engine = Engine.create!(car: car) engine.destroy! # => ActiveRecord::ActiveRecordError: cannot update a destroyed record
最後のdestroy!
処理で、engineをdestroy -> engineのdependentの設定で、carをdestroy -> carのdependentの設定で、engineをnullify -> エラー、となってしまっていました。中々に特殊なケースな感ありますが…。
guides, move incomplete example to corresponding option. #21349
rails guideのActive Record Query Interface
の修正です。
Options for find_each
の項、begin_at
オプションの箇所で説明しているexampleが、end_at
オプションを使用するする前提のexampleになっていた為、exampleをend_at
オプションの箇所に移動しています。
Get rid of mocha tests - part 1
ActionPackのテストの修正です。
mock処理に、mochaではなく、rails内部のヘルパーメソッドを使用するよう修正しています。 part 1とコミットログにある通り、こちらもまだ作業中のようです。
Merge pull request #21091 from y-yagi/add_activejob_section_to_instrumentation_guide
rails guideのActive Support Instrumentation
の修正です。
Active Job
セクションを追加し、Active Jobのhooksについての説明を追加しています。
[ci skip] Fix migration file's timestamp
activerecord/lib/active_record/migration.rb
、
guides/source/active_record_migrations.md
のdocの修正です。
migrationのrevertメソッドのexampleで、exampleに使用するmigrationファイルのフォーマットが、実際のフォーマットと(YYYYMMDDHHMMSS
フォーマット)異なっていたのを、修正しています。
Fix failing tests caused by #21350
activerecord/test/cases/persistence_test.rb
の修正です。
Only nullify persisted has_one target associationsの対応で追加したテストファイルで、requireが不足していたのを追加しています。
Further fix failing tests caused by #21350
activerecord/test/cases/readonly_test.rb
の修正です。
先のコミットと同様、Only nullify persisted has_one target associationsの対応で追加したテストファイルで、requireが不足していたのを追加しています。