2015/03/02分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
[ci skip] Fix fenced code block lang
rails guideのRuby on Rails 4.0 Release Notes
の修正です。
String#to_date
のexampleコードの箇所のmarkdownに、言語の設定が無かったのを修正しています。
Indexing a polymorphic assoc adds index on type and id [ci skip]
rails guideのActive Record Associations
の修正です。
polymorphic ssociationを使用している場合に生成されるmigrationファイルのexampleに誤りがあったのを修正しています。
が、この修正内容もmasterとは異なっている箇所があり、後ほど再度修正が行われています。
Removing unused mailer templates
ActionMailerのテストの修正です。使用していないテスト用のファイルを削除しています。
move _generate_paths_by_default to where it is used
actionpack/lib/action_dispatch/routing/url_for.rb
、actionview/lib/action_view/routing_url_for.rb
の修正です。
ActionDispatch::Routing::UrlFor#_generate_paths_by_default
メソッドを ActionView#RoutingUrlFor
配下に移動しています。UrlFor
の方で定義されていたものの、UrlFor
の方では使用しておらず、RoutingUrlFor
の方でしか使用していなかった為とのことです。
Bump rack-test to fix nil values being sent to parse_nested_query
Gemfile.lock
、actionpack/actionpack.gemspec`の修正です。
rack-test
gemのバージョンを0.6.2
-> 0.6.3
に更新しています。
rackのparse_nested_query
メソッドにnil
が渡される事があるので、rack側でnilチェックを追加していたのですが、
rack-test
側でnil
を渡さないよう修正済みだったので、その対応が含まれているバージョンまでバージョンアップしたようです。
drop string allocations per model url_for call in views
actionpack/lib/action_dispatch/http/url.rb
の修正です。
path_for
メソッドで引数のoptionのscript_name
から/
を除去する処理があるのですが、その際に指定する/
をfreezeで凍結するよう修正しています。
- path = options[:script_name].to_s.chomp("/") + path = options[:script_name].to_s.chomp("/".freeze)
不要なStringオブジェクトの生成を削減する為との事です。
Merge pull request #19152 from tchandy/removing_unused_mailer_templates
drop allocations for string and class polymorphic routes
actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
の修正です。
Stringの連結処理を行っていた箇所を、式展開を使用するよう修正しています。
- prefix + "#{str}_#{suffix}" + "#{prefix}#{str}_#{suffix}"
不要なStringオブジェクトの生成を削減する為。
refactor handle_model
to use private helper methods for generation
actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
の修正です。
handle_model
メソッドで、named_route
を生成する際、クラス内で定義されているヘルパーメソッドを使用するよう修正しています。
activerecord/lib/active_record/core.rb
の修正です。
update_attributes_from_transaction_state
メソッドから不要なコンディションチェックを削除しています。
Composite index is [:imageable_type, :imageable_id] [ci skip]
rails guideのActive Record Associations
の修正です。
polymorphic ssociationを使用している場合に生成されるmigrationファイルのexampleに誤りがあったのを修正しています。
- add_index :pictures, [:imageable_id, :imageable_type] + add_index :pictures, [:imageable_type, :imageable_id]
activesupport/lib/active_support/core_ext/array/grouping.rb
、
activesupport/lib/active_support/core_ext/enumerable.rb
の修正です。
指定した要素を削除した値を返すEnumerable#without
、Array#without
メソッドを追加しています。
people = ["David", "Rafael", "Aaron", "Todd"] people.without "Aaron", "Todd" # => ["David", "Rafael"] {foo: 1, bar: 2, baz: 3}.without :bar # => {:foo=>1, :baz=>3}
Include object inclusion for enumerable test.
activesupport/test/core_ext/enumerable_test.rb
の修正です。
先に追加されたEnumerable#without
でin?
メソッドを使用している影響で、 without
メソッドのテストに
active_support/core_ext/object/inclusion
のrequireを追加しています。
テストではなく、Enumerable#without
の方でrequire
追加するのは正しそうな気がしたのですが、これは後ほど再度修正されています。
Remove parent transaction state
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
、
activerecord/lib/active_record/core.rb
の修正です。
ConnectionAdapters::TransactionState
クラスから、親トランザクションの状態を保持していたparent
変数を削除しています。
変数自体はあったものの、実際は何処からも値が設定されていない為、削除ようです。
Use include? instead of in? for Enumerable#without.
activesupport/lib/active_support/core_ext/enumerable.rb
の修正です。
Enumerable#without
メソッドで、rails拡張のin?
メソッドではなく、Ruby標準のinclude?
メソッドを使用するよう修正しています。
Move transaction code to transaction module
activerecord/lib/active_record/core.rb
、
activerecord/lib/active_record/transactions.rb
の修正です。
トランザクションに関するメソッドをActiveRecord::Core
から、Transaction
クラスに移動しています。
Fixing incorrect class name used in an example.
rails guideのRails Routing from the Outside In
の修正です。
Controller Namespaces and Routing
の項のexampleのコントローラ名が誤っていたのを修正しています。
Web Console documentation for the upcoming 2.1 release [ci skip]
rails guideのDebugging Rails Applications
の修正です。
"Debugging with the web-console
gem"の項の内容を、2.1 リリースの内容に修正しています。
config.web_console.whitelisted_ips
のデフォルト値の変更等が含まれているようです。
[ci skip] Add code example for MailHelper#block_format documentation
actionmailer/lib/action_mailer/mail_helper.rb
の修正です。
MailHelper#block_format
メソッドのdocに、exampleを追加しています。
Nit pick the byebug settings guide for default values [ci skip]
rails guideのDebugging Rails Applications
の修正です。
byebug
について説明している箇所で、default
-> defaults
に表記を修正しています。
Avoid parallelizing Action Pack's tests on Rubinius
actionpack/test/abstract_unit.rb
の修正です。
Rubiniusの場合に、ActionPackのテストのパラレル実行を行わないよう修正しています。
Minitest::Test.parallelize_me!
メソッドを呼び出してパラレルで実行するようになっているのですが、parallelize_me!
メソッドで呼び出しいるForkingExecutor
クラスの処理が少々遅いため、処理が行わないようにしたとの事です。
Avoid accurate assertions on error messages
actionpack/test/dispatch/debug_exceptions_test.rb
、
actionview/test/activerecord/polymorphic_routes_test.rb
の修正です。
出力されるエラーメッセージをチェックしているテストで、実行環境により出力内容が異なる部分までチェックしていたのを、チェックするエラーメッセージの内容を緩めるよう修正しています。
Add the platform-specific skip helpers to ActiveModel
activemodel/test/cases/helper.rb
の修正です。
実行環境がRubinus、JRubyそれぞれの場合にテストをスキップする為のヘルパーメソッドを追加しています。
Modify guides for a better sounding sentence
rails guideのGetting Started with Rails
の修正です。
Deleting Articles
の項のグラマーの修正を行っています。