なるようになるブログ

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

rails commit log流し読み(2016/01/16)

2016/01/16分のコミットです。

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

activerecord/CHANGELOG.md

actionview/CHANGELOG.md


[ci skip] Fix typo in docs

actioncable/lib/action_cable/connection/identification.rbのdocの修正です。

ActionCable::Connection::Identification#identified_byメソッドのdoc内グラマーの修正を行っています。


Merge pull request #22278 from poporul/master

activesupport/lib/active_support/cache/file_store.rbの修正です。

ActiveSupport::Cache::FileStore#clearメソッドで、cache directoryに.keepファイルがあっても削除しない(無視する)よう修正しています。


Merge pull request #23060 from schneems/schneems/revert-revert-migration-set-environment

activerecord/lib/active_record/migration.rbの修正です。

revertのrevert、という事で、Merge pull request #23017 from schneems/schneems/migration-sets-environment-value(実行するmigrationが無い場合でもactive_record_internal_metadatasテーブルに現在のenvironmentを保存するよう対応したコミット)を再度コミットしています。


remove unnecessary ENV[] from log:clear example [ci skip]

railties/CHANGELOG.mdの修正です。

rake log:clearタスクのデフォルトの挙動を修正した対応(rake log:clear task updated refs[#22544])のentry内のexampleにタイポしている箇所があったのを修正しています。


Merge pull request #23067 from kamipo/sql_for_insert_returns_values_for_passing_to_exec_insert

Active Recordの修正です。

sql_for_insertメソッドの戻り値をそのままexec_insertに渡せるよう、sql_for_insertの戻り値の修正を行っています。


Merge pull request #22985 from akshay-vishnoi/fix-typo

actionpack/test/controller/parameters/parameters_permit_test.rbの修正です。

テスト名でinclude?included?にタイポしている箇所があったのを修正しています。


Merge pull request #20005 from kamipo/default_expression_support

Active Recordの修正です。

schemadefaultオプションに式を指定出来るよう対応しています。

CHANGELOGより。

create_table :posts do |t|
  t.datetime :published_at, default: -> { 'NOW()' }
end

Merge pull request #20046 from yoongkang/ladida

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

content_forをflushした際に、ActiveSupport::SafeBufferインスタンスを作成するよう修正しています。

    # Called by each renderer object to set the layout contents.
     def set(key, value)
-      @content[key] = value
+      @content[key] = ActiveSupport::SafeBuffer.new(value)
     end

複数回content_forを使用、かつ2回目以降のcontent_forcontent_tag等のhtmlを生成するメソッドを使用した場合に、生成されるhtmlがエスケープされた状態になってない問題があった為、対応されたようです。


Revert "Merge pull request #22977 from rails/revert-22934-master"

Action Cableの非同期処理にcelluloidを使用していたのをconcurrent-rubyを使用するよう修正した対応をrevertしたコミットをrevertしています。

という訳で、Action Cableの非同期処理にcelluloidではなくconcurrent-rubyが使われるようになっています。


Fix the updated API (this sorts the concurrent-ruby switch with Basecamp)

actioncable/lib/action_cable/server/base.rbの修正です。

worker_poolメソッドでのActionCable::Server::Workerの生成処理を修正しています。

      def worker_pool
-        @worker_pool ||= ActionCable::Server::Worker.pool(size: config.worker_pool_size)
+        @worker_pool ||= ActionCable::Server::Worker.new(max_size: config.worker_pool_size)
       end

concurrent-rubyを使用する事による変更対との事です。