なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2016/03/04)

2016/03/04分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activerecord/CHANGELOG.md


don't treat all associations with extensions as instance dependent.

activerecord/lib/active_record/associations/builder/collection_association.rbの修正です。

extensionを定義したassociationをpreloadした際にエラーになってしまうバグがあったのを修正しています。


Merge pull request #23992 from matthewd/em-option

Action Cableの修正です。

connectionにfaye-websocket + EventMachine の組み合わせを使用出来るよう修正しています。


[ci skip] Make collection caching explicit in guides.

rails guideのCaching with Rails: An Overviewの修正です。

collection cachingについて説明している箇所を、Make collection caching explicit.の変更内容に合わせて書きなおしています。


Rename constrain_to to exclude.

actionpack/lib/action_dispatch/middleware/ssl.rbの修正です。

add constraint_to option to SSL middlewareで追加された、ssl_optionsにredirectのルールを指定する為のオプションの名前をconstrain_toからexcludeに変更しています。

実際に行っている処理を考えると、excludeの方が適切な名前だと思われる為との事です。


[ci skip] Fix constrain_to documentation.

actionpack/lib/action_dispatch/middleware/ssl.rbのdocの修正です。

先のconstrain_to -> excludeへの変更対応で、docの修正漏れがあったのを修正しています。


Establish WebSocket connection when first subscription is created. Fixes #24026

Action Cableの修正です。

最初のsubscriptionが作成された際にWebSocketのconnectionを接続するよう修正しています。

元々は最初のデータが送信された際にconnectionを接続するようになっていたのですが、それだとデータ送信前にデータの受信が出来ない為、修正したとの事です。


add scaffold_stylesheet method to guide [ci skip]

rails guideのConfiguring Rails Applicationsの修正です。

Configuring Generatorsの項に、scaffold_stylesheetメソッドについての説明を追加しています。


Defer starting connection monitor until a connection is opened

Action Cableの修正です。

connectionが開いてから、connection monitorの処理を開始するよう修正しています。


Fix location of default mount path value

actioncable/app/assets/javascripts/action_cable.coffee.erbの修正です。

Action Cableのデフォルトのmount pathを設定するメソッドが誤っていたのを修正しています。


Share default mount path with client side .js

Action Cableの修正です。

デフォルトのmount pathの情報をハードコーディングしていたのを、Ruby側で定数化し、その値を利用するよう修正してます。


Implicity add Subscription instance to subscriptions collection

actioncable/app/assets/javascripts/action_cable/subscription.coffeeactioncable/app/assets/javascripts/action_cable/subscriptions.coffeeの修正です。

Subscriptionの引数をsubscriptions -> consumerに変更し、Subscription内ではconsumerを経由でsubscriptionsを操作するよう修正しています。


Store reference to Subscriptions instance for convenience

actioncable/app/assets/javascripts/action_cable/connection.coffeeの修正です。

Connection内でSubscriptionsインスタンスを保持するよう修正しています。 これは何でだろうなあ…。


Update Gemfile

Gemfileのdocの修正です。

mochaについてのコメントのグラマーの修正を行っています。


Update base.rb

actionmailer/lib/action_mailer/base.rbのdocの修正です。


Merge pull request #24045 from Sarah-Alsinan/patch-4

actionmailer/lib/action_mailer/base.rbのdocの修正です。

ActionMailer module doc内のover written -> overwrittenに修正しています。


[ci skip] using correcting test case names specifying rails routes instead of rake routes

railties/test/application/rake_test.rbの修正です。

routes inspectorについてのテストのテスト名を、test_rake_routes_xxxからtest_rails_routes_xxxにまとめて修正しています。


[ci skip] correcting sentence in description of application.rb

railties/lib/rails/application.rbのdocの修正です。

Applicationクラスのdocのグラマーの修正を行っています。


Fix partial rendering with dot in filename

actionview/lib/action_view/renderer/partial_renderer.rbの修正です。

.が入っているファイルをpartial render出来ないバグ(?)があったのを修正しています。そもそも.が入っているファイル名は良いのか…。


making a test definition more clear.

railties/test/application/rake_test.rbの修正です。

デフォルトでproduction envではDBを破壊する系のtaskが実行されない事を確認するテストのテスト名にrake_taskという言葉が入っていたのをtaskに置き換えています。


- using rails dev:cache instead of rake dev:cache in test case

railties/test/application/rake/dev_test.rbの修正です。

dev:cacheのテストでrakeコマンドを使用していたのを、railsコマンドを使用するよう修正しています。