2015/02/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Privatize config_accessor as with attr_accessor
activesupport/lib/active_support/configurable.rb
の修正です。
ActiveSupport::Configurable.config_accessor
の可視性がprivate
に変更になっています。Rubyのattr_accessor
と合わせたとの事。
Partial template name does no more have to be a valid Ruby identifier
actionview/lib/action_view/renderer/partial_renderer.rb
の修正です。
部分テンプレートに使える文字が英数字とアンダースコアだけだったのを、Ruby の識別子であれば使用出来るよう修正しています。_a-in.html.erb
とかも使えます。
Merge pull request #18647 from mcls/placeholderable-to-model
ActionViewの修正です。
i18nの値を取得する処理で、Active Modelのインスタンスを取得する際、model_name
メソッドを使用していたのを、to_model
メソッドを使用するよう修正、
及びi18の値取得処理が、異なるメソッドでそれぞれ定義されていたのをHelpers::Tags::Translator
クラスを新規に作成、そちらに処理をまとめるよう対応しています。
placeholder doesn't exist inside this context
actionview/lib/action_view/helpers/tags/translator.rb
の修正です。
Translator#call
メソッドでplaceholder
の値が設定されてなければ、I18n.t
の値を設定するようになっていたのですが、
メソッドが呼ばれる時点でplaceholder
が設定されている事は無いので、値のチェック処理を削除しています(||=
-> `='に変更)。
Only check if object respond_to to_model once
actionview/lib/action_view/helpers/tags/translator.rb
の修正です。
コンストラクタの引数に指定されたobjectに、to_model
が定義されてるかどうかのチェック処理を、一度だけ行うよう修正しています。
Force generated route to be inserted
railties/lib/rails/generators/actions.rb
の修正です。
config/routes.rb
にルートを追加する際、同じ内容が定義されているかどうかに関わらず、強制的にルートを値を追加するよう修正しています。
値の追加はThor::Actions#inject_into_file
メソッドで行っているのですが、inject_into_file
メソッドではそんなに厳密に元々の値のチェックを行うわけではないらしく、追加されないよりは、
重複定義でエラーになる方が良いだろう、との事で対応したようです
Add tests to make sure label and placeholder respect to_model
actionview/test/template/form_helper_test.rb
の修正です。
placeholder
がto_model
の値を正しく参照するかどうかのテストを追加しています。
actionview/lib/action_view/helpers/tags/translator.rb
の修正です。
インスタンス変数のアクセサメソッドの可視性をprivate
に変更しています。
actionview/lib/action_view/helpers/tags/translator.rb
1.9以降の新しいHash記法を使用しています。
Use kwags to make the argument meaning explicit
actionview/lib/action_view/helpers/tags/translator.rb
の修正です。
initialize
メソッドの引数にキーワード引数を使用するよう修正しています。
Rename method to make explicit its intention
actionview/lib/action_view/helpers/tags/translator.rb
の修正です。
I18n
への変換処理を行うメソッドの名称をcall
からtranslate
に変更しています。
Remove special case for symbols at find
activerecord/lib/active_record/core.rb
の修正です。
activerecord-deprecated_finders
gemの為に残していたfind
メソッドにSymbolを渡した場合の処理を削除しています。 Rails 5ではactiverecord-deprecated_finders
はサポートされない為ですね。
activerecord/lib/active_record/core.rb
の修正です。
privateメソッド:nodoc:
を追加しています。
Do not run remove_connection in memory db test
activerecord/test/cases/multiple_db_test.rb
の修正です。
DBがsqlite3 のmemory dbの場合に、remove_connection
のテストを実行しないよう修正しています。
Merge pull request #18747 from vipulnsward/merge-skip-callback
activesupport/lib/active_support/callbacks.rb
の修正です。
ActiveSupport::Callback#merge
メソッドをmerge_conditional_options
に名前を変更しています。
activesupport/lib/active_support/callbacks.rb
の修正です。
merge_conditional_options
メソッドの引数にキーワード引数を使用するよう修正しています。
Merge pull request #18771 from kirs/deprecate-xhr
actionpack/lib/action_controller/test_case.rb
、
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
ActionController::TestCase
とActionDispatch::Integration
でのxhr
メソッド、xml_http_request
がdeprecateになりました。
代わりに、get
、post
メソッドにxhr
オプションが指定可能になったので、今後はそちらを使うように、との事です。
# before xhr :get, :create, params: { id: 1 } # after get :create, params: { id: 1 }, xhr: true
Merge pull request #18526 from vipulnsward/add-silence-stream
各テストの修正です。
stdout / stderrの値を取得したり、NULLに捨てる為の処理を(silence_stream
/ quietly
/ capture
)、各コンポーネントのテストクラスでそれぞれ定義していたのですが、
それらをActiveSupport::Testing::Stream
moduleにまとめて、各テストクラスではそのmoduleを使用するよう修正しています。
Merge pull request #18589 from kamipo/fix_test_types_line_up
activerecord/test/cases/schema_dumper_test.rb
の修正です。
test_types_line_up
でカラムの一覧にxml
が無かったので追加、及びカラムが無い場合にちゃんとテストが失敗するように、不要なnilデータの削除処理を追加しています。
Merge pull request #18399 from kommen/unify-structure-file-envvar-names
activerecord/lib/active_record/railties/databases.rake
の修正です。
db:structure
タスクで、structure fileを指定する際のenvのkeyがDB_STRUCTURE
からSCHEMA
に変更になりました。
# before bin/rake db:migrate db:structure:dump DB_STRUCTURE=db/my_structure.sql # after bin/rake db:migrate db:structure:dump SCHEMA=db/my_structure.sql
test:load_structure
タスクは既にSCHEMA
になっていて、それに合わせる形に修正したとの事です。
applies guidelines to dirty.rb [ci skip]
activemodel/lib/active_model/dirty.rb
のdocの修正です。
Dirty
moduleのrdocから、不要なスペースを削除しています。
use parentheses here, for the beard of the Prophet! [ci skip]
activemodel/lib/active_model/dirty.rb
のdocの修正です。
Dirty
moduleのexamleでメソッド呼び出しをしている箇所に括弧が無かったので、括弧を追加しています。
revises AM:Dirty example [Godfrey Chan & Xavier Noria]
Dirty
moduleのexamleを修正しています。
Merge pull request #18388 from claudiob/better-docs-for-active-model-lint-tests
activemodel/lib/active_model/lint.rb
のdocの修正です。
ActiveModel::Lint::Tests
moduleのrdocの改善です。全体的にメソッドの説明を直しています。