2017/05/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #29232 from koic/ci_against_jruby_9_1_10_0
.travis.yml
の修正です。
CIで使用するJRubyのバージョンを9.1.10.0
に更新しています。
Remove a redundant test assertion
activerecord/test/cases/finder_test.rb
の修正です。
find
メソッドのテストで重複したassertionがあったのを削除しています。
ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton (#29180)
スレッド毎に独立したattibutesを管理するためのActiveSupport::CurrentAttributes
クラスを追加しています。リクエスト毎のattribute(リクエストIDやUA等)をシステム全体で使用可能にする、のが主なユースケースとの事です。リクエストの前後で自動でattributeのresetが行われるよう対応されています。
具体的な使い方はDoc(ActiveSupport::CurrentAttributes)参照。
Doc updates for ActiveRecord::Batches
activerecord/lib/active_record/relation/batches.rb
のdocの修正です。
ActiveRecord::Batches
moduleのdoc内のexampleコードが動作しないコードになっていたのを修正、及び、doc内のフォーマットの修正を行っています。
Merge pull request #25037 from mohitnatoo/adapter-inquirer
activejob/lib/active_job/queue_adapter.rb
の修正です。
QueueAdapter
moduleにqueue_adapter_name
メソッドを追加しています。
class Job1 < ApplicationJob self.queue_adapter = :resque end > Job1.queue_adapter_name #=> "resque"
activemodel/lib/active_model/validator.rb
のdocの修正です。
ActiveModel::Validator
クラスのdocでoptions[:class]
がタイプライター体で表示されるよう、ttタグで囲むよう修正しています。
Update to rails-ujs documentation for yarn install
actionview/app/assets/javascripts/README.md
の修正です。
rails-ujis
をnpm経由でインストールした場合の使い方についての説明を追加しています。
Gemfile
の修正です。
rb-inotify
gemを使用するのにforkしたリポジトリを使用していたのを、rb-inotify
のmasterリポジトリを指定するよう修正しています。forkしたブランチのPRがmasterにマージされた為。
[ci skip]fix wrong variable name in docs
rails guideのActive Record Query Interface
の修正です。
Array
を格納する変数の変数名が単数形になっていたのを複数形に修正しています。
[ci skip]fix wrong variable name in docs
rails guideのActive Record Query Interface
の修正です。
Array
を格納する変数の変数名が単数形になっていたのを複数形に修正しています。
railties/test/application/current_attributes_integration_test.rb
の修正です。
ActiveSupport::CurrentAttributes
のテストで、テスト用クラスを定義するファイルをapp/services/current.rb
からapp/models/current.rb
に修正しています。docに記載されているexampleコードと合わせる為。
[ci skip] Fix spelling that’s a bit of an overreach.
activesupport/lib/active_support/current_attributes.rb
のdocの修正です。
ActiveSupport::CurrentAttributes
の docのグラマーの修正を行っています
ActiveSupport::CurrentAttributes
の doc内のexampleコードで、userの取得にfind
を使用していたのをfind_by
を使用するよう修正しています。
- # if authenticated_user = User.find(cookies.signed[:user_id]) + # if authenticated_user = User.find_by(id: cookies.signed[:user_id]) # Current.user = authenticated_user # else # redirect_to new_session_url
find
を使ってしまうと、userが見つからなかった場合にexceptionがraiseされてしまい、else
の処理が実行されない為。