2014/05/15分のコミットです。
namespaceを使用しているクラスでhas_and_belongs_to_manyを使用した場合にエラーとなるバグの修正、RFC4791対応等が行われています。
このスペースに何書こうか割と迷うので、明日からはCHANGLOGにのった修正まとめてみようと思います。多分。
Merge remote-tracking branch 'apotonick/simplify-prefixes'
actionview/lib/action_view/view_paths.rb
の修正です。
AbstractController::Base::parent_prefixes
がDeprecateになりました。view検索の処理を変更したい場合は、AbstractController::Base::local_prefixes
をオーバーライドする必要があります。
テストコードから抜粋。
class OverridingLocalPrefixes < AbstractController::Base include AbstractController::Rendering include ActionView::Rendering append_view_path File.expand_path(File.join(File.dirname(__FILE__), "views")) def index render end def self.local_prefixes # this would usually return "abstract_controller/testing/overriding_local_prefixes" super + ["abstract_controller/testing/me3"] end class Inheriting < self end end
あまりviewのpathを変更したい、というケースは無かったのですが、そういう場合は使えそうですね。
因みに、このPRはcellsの作者の方が送られています。cellsだと確かに使いそう。
CHANGELOGの修正です。スペースの追加。
._prefix is private API so we should not recommend to override it
上記actionview/lib/action_view/view_paths.rb
の修正の続きです。
privateメッセージをオーバーライドするようメッセージに出力してしまっていたので、削除しています。
こちらもactionview/lib/action_view/view_paths.rb
の修正です。
privateメソッドに:nodoc:
を追加しています。
Follow the documentation guideline
こちらもactionview/lib/action_view/view_paths.rb
の修正です。
::_prefixes
を._prefixes
に修正しています。
railsのguidelineに則った形ですね。
Refactoring the code to make consitional return explicit
こちらもactionview/lib/action_view/view_paths.rb
の修正です。
戻り値が少し解りづらかったのでリファクタリングしています。
Following documentation guideline
actionview/test/actionpack/abstract/abstract_controller_test.rb
の修正です。
::
を.
に修正しています。二つ上の修正と同じく、railsのguidelineに則った形ですね。
こちらもactionview/lib/action_view/view_paths.rb
の修正です。
early return しているのを修正しています。
値がメモ化されるのを避けるため、early returnはしないようにしている、との事です。
訳があってるか不安…。
gemfileの修正です。
Redcarpetのバージョンを3.1.2にあげています。
[ci skip]add updated information, ref[#522c0fd]
ActiveRecord::AttributeMethods::[]
メソッドのdocの修正です。
:id
はいつも空白である旨追加されています。
remove warning ambiguous first argument; put parentheses or even spaces
activerecord/test/cases/adapters/postgresql/datatype_test.rb
の修正です。
複数引数のメソッド呼び出しで()が無かったのを追加しています。 warningが出てたのの対応です。
rake, remove frontbase related tasks from Active Record Rakefile.
activerecord/Rakefile
の修正です。
frontbaseに関するtaskを削除しています。
frontbaseってなんだろうと思ったんですが、これか。こんなRDBMSあったのか。
Merge pull request #15070 from ayamomiji/sse-patch
ActionController::Live::SSE#perform_write
メソッドの修正です。
Server-Sent Eventsで複数のdata:
行に対応出来るよう修正しています。
Server-Sent Events についてはこちら参考。
Merge pull request #14137 from dasch/better-fragment-cache-instrumentation https://github.com/rails/rails/commit/f2bff250a017b6da76b7587a164643db31ffbf9b
ActionController::Caching::Fragments#instrument_fragment_cache
メソッドの修正です。
frament cacheではActiveSupport::Notifications.instrument
を使って計測を行っているのですが、計測時の情報にコントローラー名とアクション名が追加されています。
ActiveSupport::Notifications
、ちゃんと使うと性能測定にとても便利そうなんですよねえ。
Make filter_binds filter out symbols that are equal to strings
ActiveRecord::Relation::Merger#filter_binds
メソッドの修正です。
カラム名の比較をString
とSymbol
で行ってしまった為、値のマッチングが出来ずにエラーになってしまったバグの修正です。
has_many .. foreign_key
使用している際に駄目そうなので、割と起きそうに見えるなあ。
Merge pull request #14871 from kassio/kb-fixes-namespaced-habtm
activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
の修正です。
namespaceを使用しているクラスでhas_and_belongs_to_manyを使用した場合に、名前解決が出来ずエラーになってしまったバグの修正です。
Rails 4.0では動いていたので、4.1にあげる際に注意が必要そうです。
Don't use Active Support where it is not needed.
activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb
String#presense
メソッド使用している箇所を修正しています。
疎結合にする為ですかね。
Merge pull request #15088 from kares/shareable-modules
Postgresqlのadapter関連ファイルの修正です。
クラス名のリファクタリングが行われており、class PostgreSQLColumn < Column
をmodule PostgreSQL
に修正しています。
Methods of these modules are internal
Postgresqlのadapter関連ファイルの修正です。
private メソッドにnodoc
を付けています。
こちらもPostgresqlのadapter関連ファイルの修正です。
不要行の削除。
Add missing requires for require 'action_dispatch/routing'
actionpack/lib/action_dispatch/routing.rb
の修正です。
require 'active_support/dependencies/autoload'
を追加しています。
Only path requirements are relevant to optimized urls
ActionDispatch::Routing::RouteSet.optimize_helper?
メソッドの修正です。
Remove unused method in RouteSet test.
actionpack/test/dispatch/routing/route_set_test.rb
の修正です。
使用していないメソッドの削除。
update ruby-oci8 version specification. Closes #15109. [ci skip]
Gemfileの修正です。
ruby-oci8
のバージョンをあげています。
flexible ruby-oci8 version specification. [Gaurav Sharma]
Gemfileの修正です。
ruby-oci8
のバージョン指定を2.1.0
から2.1
に修正。
actionpack/lib/action_dispatch/http/request.rb
の修正です。
RFC4791のMKCALENDARメソッドを定数に追加しています。
カレンダーサーバの為の規格なんですね。へー。
詳しくはこちら。