2017/06/25分のコミットです。
CHANGELOGへの追加はありませんでした。
Add an option to silence puma in system tests.
actionpack/lib/action_dispatch/system_testing/server.rb
の修正です。
system testでテスト用にPumaを起動する際に、Pumaの起動メッセージを表示しないよう設定出来るよう修正しています。
2017/06/25分のコミットです。
CHANGELOGへの追加はありませんでした。
Add an option to silence puma in system tests.
actionpack/lib/action_dispatch/system_testing/server.rb
の修正です。
system testでテスト用にPumaを起動する際に、Pumaの起動メッセージを表示しないよう設定出来るよう修正しています。
2017/06/24分のコミットです。
CHANGELOGへの追加はありませんでした。
Removed reference to unexisting methods:
actionpack/lib/action_dispatch/testing/integration.rb
の修正です。
ActionDispatch::Integration::Runner
moduleで既に使用される事の無いxml_http_request
、xhr
、get_via_redirect
、post_via_redirect
メソッドの定義処理があったのを削除しています。
Don’t wrap parameters if key already exists
actionpack/lib/action_controller/metal/params_wrapper.rb
の修正です。
ActionController::ParamsWrapper
で、paramに既にkeyが存在している、かつ、値が nil / falseの場合に再度wrap処理を行ってしまうバグがあったのを修正しています。
{ "user" => nil }
という値があった場合に{ "user" => { "user" => nil } }
のようにwrapされてしまう、というバグでした(本来は{ "user" => nil }
がそのまま返ってくるべき)。parameterの存在チェックに#[]
で返ってきた値をそのまま使用していた為問題が発生していました。
Guides: Clarify partial local variable naming.
rails guideのLayouts and Rendering in Rails
の修正です。
Passing Local Variables
の項、partial templateのローカル変数について説明している箇所の説明を修正しています。
2017/06/23分のコミットです。
CHANGELOGへの追加はありませんでした。
Fix typo in AC::UnfilteredParameters
message [ci skip]
actionpack/lib/action_controller/metal/strong_parameters.rb
のdocの修正です。
ActionController::Parameters#to_h
、#to_hash
のdoc内で、ActionController::UnfilteredParameters
のエラーメッセージをタイポしていたのを修正しています。
2017/06/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Merge pull request #27063 from MaxLap/merge_keep_inner_join
activerecord/lib/active_record/associations/join_dependency.rb
の修正です。
ネストされた2つのrelationをマージする際、マージされたrelationのJOINがLEFT OUTER JOINになってしまっていたのを、INNER JOINのままになるよう修正しています。
# Before Author.joins(:posts).merge(Post.joins(:comments)) #=> SELECT ... FROM authors INNER JOIN posts ON ... LEFT OUTER JOIN comments ON... # After Author.joins(:posts).merge(Post.joins(:comments)) #=> SELECT ... FROM authors INNER JOIN posts ON ... INNER JOIN comments ON...
activerecord/test/cases/relation_test.rb
の修正です。
test_relation_merging_with_merged_symbol_joins_keeps_inner_joins
から使用していない変数を削除しています。
Fix hash conditions documentation [ci skip]
rails guideのActive Record Query Interface
の修正です。
Equality Conditions
の項、conditionの値にSymbolが使えない旨説明がされていたのですが、実際はSymbolを使用出来るので不要な説明を削除しています。
Merge pull request #29524 from y-yagi/do_not_use_private_api_in_bug_report_templates
guides/bug_report_templates/active_record_migrations_gem.rb
、
guides/bug_report_templates/active_record_migrations_master.rb
の修正です。
bug report templatesでprivate API(ActiveRecord::Migrator
)を使用していたのを、public API(ActiveRecord::Migration#migrate
)を使用するよう修正しています。
2017/06/21分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
locking column
is null in the database.ActiveRecord::Persistence#touch
does not work well when optimistic locking enabled and locking_column
, without default value, is null in the database.[ci skip] Fixed the attribute name for event.detail
rails guideのWorking with JavaScript in Rails
の修正です。
Rails-ujs event handlers
の項、attribute名をタイポしていたのを修正しています。
Merge pull request #28833 from bogdanvlviv/add-test-cases-for-optimistic-locking
activerecord/lib/active_record/locking/optimistic.rb
、
activerecord/test/cases/locking_test.rb
の修正です。
optimistic lockingに使用するカラムを任意の値に更新出来ない事を確認するテストを追加しています。
Merge pull request #29503 from savroff/fix_current_page_engine_issue
actionview/lib/action_view/helpers/url_helper.rb
の修正です。
scopeまたはrails engine配下のページでcurrent_page?
メソッドで正しく現在ページのチェックが出来ないバグがあったのを修正しています。
trailing slashのせいで正しく検知出来ていなかった為、request_uri
のtrailing slashを削除し対応しています。
Shrink image files in the guides using ImageOptim
rails guideの修正です。
guide内で使用している画像をImageOptimを使用して圧縮しています。
Use bulk INSERT to insert fixtures
Active Recordの修正です。
fixturesを作成する際に、bulk INSERTを使用するよう修正しています。
Adds missing minor doc about tools/test.rb [ci skip]
tools/README.md
、tools/test.rb
の修正です。
tool/test.rb
についての説明をREADMEに追記しています。
Fix destroy with locking_column value null
activerecord/lib/active_record/locking/optimistic.rb
の修正です。
optimistic lockingを使用している、かつ、locking_column
がnilの場合に、オブジェクトのdestryがエラーになってしまうバグがあったのを修正しています。
Fix ActiveRecord::Persistence#touch with locking
activerecord/lib/active_record/persistence.rb
の修正です。
optimistic lockingを使用している、かつ、locking_column
にdefaultの値が設定されておらずnilの場合に、touch
メソッドを呼び出した場合にエラーになってしまうバグがあったのを修正しています。
Fix call-seq typo s/==/<=>/ [ci skip]
activemodel/lib/active_model/naming.rb
のdocの修正です。
ActiveModel::Name#<=>
メソッドのdoc内でメソッド名をタイポしていたのを修正しています。
Avoid begin/rescue in fixture quoting
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
の修正です。
ConnectionAdapters::DatabaseStatements#with_yaml_fallback
メソッドで、YAML.dump
が必要かどうかを判定するのに、quote
メソッドを呼び出してTypeError
が出るかどうかで判定していたのを、dump処理が必要な型(Hash
、Array
)でのみ明示的にYAML.dump
の呼び出しを行うようにし、不要なquote
処理やエラーハンドリング処理を削除していまs.
2017/06/20分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Refactor #insert_fixtures to use Arel
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
の修正です。
fixtureのinsert処理でArelのメソッドを使用するようリファクタしています。
fixtureのinsert処理でbulk insertを使用するよう修正(生のSQLではなくArelのメソッドを使用)している対応があり(Use bulk SQL INSERT when bootstraping fixtures、その対応の一環との事です。
Merge pull request #29493 from y-yagi/deprecate_capify
railties/lib/rails/generators/actions.rb
の修正です。
generatorsとtemplatesで使用できるcapify!
メソッドがdeprecateになりました。
capify!
メソッドはcapistranoのcapify
コマンドを実行するだけのメソッドなのですが、capify
コマンドがcapistrano 3系で無くなった為、その変更に合わせてこちらのメソッドもdeprecateにしています。
Merge pull request #29494 from kamipo/prevent_extra_scope_construction
activerecord/lib/active_record/associations/association.rb
、
activerecord/lib/active_record/associations/collection_association.rb
、
activerecord/lib/active_record/associations/singular_association.rb
の修正です。
Assocationのfind_target
メソッドでscope
を使用する際、メソッド内でscope
の生成を行っていたのを、クラスで保持しているscope
を使い回すよう修正しています。
Merge pull request #29454 from kamipo/fix_exists_queries_with_cache
activerecord/lib/active_record/connection_adapters/mysql/database_statements.rb
、
activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
の修正です。
Relation#exists?
メソッドでquery cacheが使用されないバグがあったのを修正しています。
connection adapter でselect_*
メソッドをオーバーライドしているとquery cacheが正しく動作しないようになってしまていたらしく、左記メソッドを削除し対応しています。
Merge pull request #29485 from tjschuck/nodoc_ac_conn_websocket
actioncable/lib/action_cable/connection/web_socket.rb
のdocの修正です。
ActionCable::Connection::WebSocket
クラスに:nodoc:
を指定しています。
Merge pull request #27990 from leonelgalan/bug/filtered_parameters_class
actionpack/lib/action_dispatch/http/parameter_filter.rb
、
actionpack/lib/action_dispatch/http/filter_parameters.rb
の修正です。
ActionDispatch::Http::ParameterFilter
クラスのfilter
メソッドの戻り値を、引数で指定されたparams
と同じ型の値を返すよう修正しています(params
にHashWithIndifferentAccess
を指定した場合、戻り値もHashWithIndifferentAccess
になる)。
actionpack/test/controller/parameters/mutators_test.rb
、
activesupport/test/core_ext/duration_test.rb
の修正です。
assert_equal
メソッドのexpected引数にnilを指定していたテストを、assert_nil
を使用するよう修正しています。
Minitest 5.10から上記使い方がdeprecateになり、nilを期待する場合はassert_nil
が使用する必要がある為。
2017/06/19分のコミットです。
CHANGELOGへの追加はありませんでした。
.travis.yml
の修正です。
CIで使用するJRubyのバージョンを9.1.12に更新しています。
Fix examples for AC::Parameters#to_query
[ci skip]
actionpack/lib/action_controller/metal/strong_parameters.rb
のdocの修正です。
ActionController::Parameters#to_query
メソッドのdoc内のexampleコードで、permit
処理が不足していたのを追加しています。