なるようになるブログ

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

rails commit log流し読み(2016/02/15)

2016/02/15分のコミットです。

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

activesupport/CHANGELOG.md


[ci skip] line_statistics added to README

tools/README.mdの修正です。

Rails dev toolsのリストにline_statisticsを追加しています。


Inject Rails' channel paths in engine.

Action Cable / railtiesの修正です。

Action Cableのchannel pathsの値をRails::Engine::Configuration経由で設定するよう修正しています。

他のcomponent同様、Action Cableもrailtie経由でconfigを指定出来るようにする為の対応のようです。


Default connection class to ActionCable::Connection::Base.

Action Cableの修正です。

デフォルトのconnection classをApplicationCable::ConnectionからActionCable::Connection::Baseに変更しています。


Don't rely on the global server as a receiver.

Action Cableのテストの修正です。

WorkerTest::Receiver#loggerでAction Cableのserverのloggerを使用していたのを、独自にloggerのインスタンスを作成し、そちらを使用するよう修正しています。


Remove const_missing which fallback to deprecated NEVER_UNPERMITTED_PARAMS

actionpack/lib/action_controller/metal/strong_parameters.rbの修正です。

deprecatedになっていたActionController::Parameters::NEVER_UNPERMITTED_PARAMSを使用する為の対応(const_missingで値をひっかかける)を削除しています。


Merge pull request #23670 from yui-knk/update_dalli

Gemfile.lockの修正です。

delliのバージョンを2.7.6に更新しています。

2.7.6でRack 2.0対応(Rack::Abstract::IDがdeprecatedになった事に対する対応)が含まれており、Action Packのテストで不要なdeprecation warningが表示されるのを防止する為に、バージョンを更新したとの事です。


mark as #:nodoc: [ci skip]

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

Rails内部向けAPIにまとめて:nodoc:を設定しています。


Merge pull request #23667 from meinac/remove_override_method

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

使用していないfind_lastメソッドを削除しています。


Merge pull request #23664 from y-yagi/remove_test_order_from_environment_file

railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.ttの修正です。

デフォルトのenvironments/test.rbからconfig.active_support.test_order = :randomを削除しています。

Rails 5からデフォルトのtest_order:randomに変更になっており、configで指定する必要が無い為。


Corrected secret_key_base

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

secret_key_basesecret_key baseにタイポしている箇所があったのを修正しています。


Add #on_weekday? method to Date, Time, and DateTime.

activesupport/lib/active_support/core_ext/date_and_time/calculations.rbの修正です。

DateTimeDateTimeon_weekday?メソッドを追加しています。

名前の通りで、weekday(土日以外)の場合にtrueを返します。

Add #on_weekend?, #next_weekday, and #prev_weekday methods to Date, T… · rails/rails@adf5fc3on_weekend?が追加されたのですが、同様にon_weekday?があっても良いのでは、という事で追加されたようです。


generate mailer views in Rails API

railties/lib/rails/generators.rbrailties/lib/rails/generators/rails/app/app_generator.rbの修正です。

Rails APIでも、mailerのgeneratorはviewsファイルを生成するよう修正しています。

Rails APIは通常viewファイルを生成しないようになっているのですが、mailerはviewファイルが無いとメール送信が出来ないので、mailerについてはviewファイルを生成するようにしています。


Fix small typo in Rails guides [ci skip]

Rails Guideの修正です。

コンポーネント名がActiveRecordになっている箇所があったのを、まとめてActive Recordに修正しています。


Revert "Prefer Minitest's location for test failures."

test runnerで、テスト再実行用のコマンドを表示する際、テストが失敗したメソッドの行数ではなく実際にassertionが失敗した行数を表示するよう修正した、Prefer Minitest's location for test failures. · rails/rails@0db3105をrevertしています。

minitestのresult.locationの値から行数表示しようとしていたのですが、mochaを使用している場合にresult.locationからだと取得出来る値が実際実行したファイルではないファイル名が返ってきてしまう、という問題があった為、revertしたとの事です。


test runner, relay minitest information about the error location.

railties/lib/rails/test_unit/reporter.rbの修正です。

test runnerでfailure informationを出力する際、テストファイルのlocationを表示するよう修正しています。

元々は再実行用スニペットにテストファイルのlocationが表示されるので、failure informationには無くて良いだろう、という事で出してなかったのですが…。んー、なんでだろう。


fix build broken by 07e422f58d61da0.

railties/test/generators/plugin_test_runner_test.rbの修正です。

test runner, relay minitest information about the error location.の対応によりテストの修正が必要な箇所があり、その対応が漏れていたのを対応しています。