なるようになるブログ

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

rails commit log流し読み(2015/03/06)

2015/03/06分のコミットです。

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

actionview/CHANGELOG.md


Revert work arounds for upstream Ruby 2.2.0 kwargs bug

Ruby 2.2.0 kwargs bug(https://bugs.ruby-lang.org/issues/10685)のコミットを全てrevertしています。

Ruby 2.2.1がリリースされ、上記バグが対応されているため、との事です。これに伴い、Rails 5.0は"Ruby 2.2.1"が必須になります。


Run ActionPack test cases in random order.

actionpack/test/abstract_unit.rbの修正です。

AcitionPackのテストがランダムに実行されるよう、設定を変更しています。

gsoc2014 にRailsのテストをランダムに実行出来るようにする、というのがあり、 ActionPackについては実際に対応が完了し、ローカル環境で問題無い事も確認出来たので、設定を変更したとの事です。


nodoc filtered_location [ci skip]

actionpack/lib/action_dispatch/http/filter_redirect.rbの修正です。

filtered_locationメソッド:nodoc:を追加しています。


[ci skip] Add information about sanitize option in TextHelper#highlight

actionview/lib/action_view/helpers/text_helper.rbのdocの修正です。

highlightメソッドのdocに、sanitizeオプションの説明の追加、及びexampleの追加を行っています。


Use ruby 2.2.1 on Travis

.travis.ymlの修正です。

TravisRuby 2.2.1でテストを行うよう修正しています。


Revert "Allow failures with Active Job"

.travis.ymlの修正です。

allow_failuresのリストからActiveJobのテストを削除しています。

依存しているgemの問題でActiveJobのテストがコケてしまうのでallow_failuresのリストに追加していたのですが、現状問題無いようなので、エラー検知するよう戻したようです。


[ci skip] Delete excess white in documentation

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

_conditional_layout?メソッドのdocにあった不要なスペースを削除しています。


pass a config to the route set

ActionDispatchの修正です。

ActionDispatch::Routing::RouteSet.new_with_configメソッドを追加し、RouteSetインスタンス生成時にconfigの情報を外から渡せるよう対応しています。


[ci skip] Update documentation for Time#seconds_since_midnight

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

seconds_since_midnightメソッドにdocを追加しています。


Fixed ActiveJob integration tests

activejob/test/support/integration/adapters/qu.rbactivejob/test/support/integration/adapters/queue_classic.rbの修正です。

ququeue_classicの仕様が変わった事によりコケていたテストがあったのを修正しています。


remove unnecessary rescue

activerecord/test/cases/mixin_test.rbの修正です。

test_create_turned_offから不要なrescue処理を削除しています。


:cut: remove unnecessary rescue Exceptions

activerecord/Rakefileactiverecord/test/cases/associations/callbacks_test.rbactiverecord/test/cases/query_cache_test.rbの修正です。

rescue Exception -> rescueExceptionクラスの指定を削除しています。

不要と判断して削除したようだったのですが、この影響で一部テストがコケてしまったので、後ほどrevertされています。


don't need to rescue Exception in this case

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

debugメソッド内の rescue Exception -> rescueに修正しています。


Change *args to arg in CallbackSequence#call

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

CallbackSequence#callメソッドの引数を*arg -> argに修正しています。

引数はひとつしか渡される事はなく、Arrayで受け取る必要は無い為、との事です。


number_to_percentage and precision: 0 work with NAN and INFINITY.

activesupport/ActionViewの修正です。

number_to_percentageメソッドFloat::NAN又はFloat::INFINITYprecisionオプションを一緒に渡した場合にエラーになっていたのを修正しています。


put the changelog entry in the right file :sweat: [ci skip]

actionview/CHANGELOG.mdの修正です。

number_to_percentage and precision: 0 work with NAN and INFINITY.の対応を追加しています。


tests, remove side effects on Joke during base_test.rb.

activerecord/test/cases/base_test.rbの修正です。

テスト用に一時的に必要なクラスをClass.newで作成するよう修正しています。元々Jokeという名前のクラスで処理を行っていたのですが、他のテストに影響があったようで、修正したようです。


Remove a duplicated changelog entry [ci skip]

activesupport/CHANGELOG.mdの修正です。

number_to_percentage and precision: 0 work with NAN and INFINITY.の対応を削除しています。

ActionViewの方の対応は為、ActiveSupportCHANGELOGからは削除しています。


replace repair_validations with a disposable subclass.

activerecord/test/cases/validations/length_validation_test.rbの修正です。

repair_validationsメソッドを使用していたのを、setupでテスト用クラスを作成するように修正しています。ランダムにテスト実行時にエラーになってしまうからですかねえ…。


Revert ":cut: remove unnecessary rescue Exceptions"

:cut: remove unnecessary rescue Exceptions をrevrtしています。テストがfailureしてしまった為。


tests, sequences are derived from the base class.

activerecord/test/cases/base_test.rbの修正です。

tests, remove side effects on Joke during base_test.rb. の対応で一部テストがコケるようになってしまったので、subclassではなく、base classを使用するよう再度テストを修正しています。


Merge pull request #19221 from matthewd/random-tests

先の対応では、ActiveSupportだけでしたが、それ以外のコンポーネント(ActionMailer / ActionView / ActiveModel / ActiveRecord / ActiveSupport / railties)でもテストがランダムに実行されるよう修正しています。


Fix documentation of url_for module [ci skip]

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

UrlFor moduleのdocに記載してあったrequestに必要なメソッドの説明が誤っていたのを修正しています。