なるようになるブログ

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

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

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

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

activejob/CHANGELOG.md


- app generate option --skip-sprockets leaves jquery-rails gem, which relies on sprockets environment

railties/lib/rails/generators/app_base.rbの修正です。

--skip-sprocketsオプションを指定してrails newした際に、Gemfileにjquery-railscoffee-railsを記載しないよう修正しています。


Test with Turbolinks 5

GemfileGemfile.lockの修正です。

テストの際、Turbolinks 5.0.0.beta1を使用するよう修正しています。


hotlink to the source and results for AWDwR tests

RELEASING_RAILS.mdの修正です。

Agile Web Development with Railsのテストコードへのリンク(https://github.com/rubys/awdwr)、及び左記テストコードの実際のテスト結果ページへのリンク(http://intertwingly.net/projects/dashboard.html)を追加しています。


Add documentation about method to describe how it works [ci skip]

activemodel/lib/active_model/errors.rbのdocの修正です。

ActiveModel::Errors#[]メソッドのdocに、エラーが発生してない場合でも、[]に指定したattributeがkeysメソッドの戻り値に含まれてしまう旨説明を追加しています。

person.errors.keys    # => []
person.errors[:name]  # => []
person.errors.keys    # => [:name]

Merge pull request #23472 from jhubert/patch-2

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

ActiveRecord::ConnectionAdapters::ConnectionSpecification::ConnectionUrlResolver.newメソッドで、引数のURIが正しいURIのフォーマットだった場合のみschemeの文字列の変換処理を行うよう修正しています。

           @uri     = uri_parser.parse(url)
-          @adapter = @uri.scheme.tr('-', '_')
+          @adapter = @uri.scheme && @uri.scheme.tr('-', '_')

DATABASE_URLに変な値を設定してしまった場合に、NoMethodErrorが起きてしまうのをを防ぐ為。


add missing include to engine test example [ci skip]

rails guideのGetting Started with Enginesの修正です。

Functional Testsの項のexampleコードで、Engine.routes.url_helpersのincludeが不足していたのを追加しています。


move CHANGELOG entry to the appropriate position [ci skip]

railties/CHANGELOG.mdの修正です。

Rails 5.0.0.beta2リリース後に追加された機能がRails 5.0.0.beta2 (February 01, 2016)の下にentryが記載されていたのを、Rails 5.0.0.beta2 (February 01, 2016)の上に移動しています。


docs, link Rails specific assertions to the API. [ci skip]

rails guideのA Guide to Testing Rails Applicationsの修正です。

Rails Specific Assertionsの項、Rails独自のassertionについて説明している表で、メソッド名にAPI docへのリンクを設定しています。


docs, remove trailing whitespace from testing guide. [ci skip]

rails guideのA Guide to Testing Rails Applicationsの修正です。

不要なスペースをまとめて削除しています。


Check off some todos for the Testing guide with @senny [ci skip]

rails guideのA Guide to Testing Rails Applicationsの修正です。

Rails独自のテストクラスについて説明している箇所にAPI docへのリンクを追加、Fixtureについての注記を追加等を行っています。


Update turbolinks-rails for passing railties test

Gemfileの修正です。

最新のturbolinksを使用するよう修正しています。

リリース済みのturbolinks 5.0.0.beta1だとrailtiesのテストがコケてしまう、という問題がある為、対応済みである最新のコードを使用するようにしています。

参考:Only call before_action when the method exists by rafaelfranca · Pull Request #3 · turbolinks/turbolinks-rails


don’t explicitly mention EventMachine [ci skip]

actioncable/lib/rails/generators/channel/templates/channel.rbのdocの修正です。

doc内にEventMachineに依存している旨説明が残ってしまっている箇所があったので、削除しています。


Cant run on an out-of-the-box OSX installation without running out of TOO MANY FILES OPEN

actioncable/test/client_test.rbの修正です。

大量のクライアントを使用してAction Cableのテストを行う際のクライアント数を200から100に変更しています。

Too many open filesのエラーが出てしまう事がある為のようです。


Change the default adapter from inline to async

activejob/lib/active_job/queue_adapter.rbの修正です。

Active Jobのデフォルトのadapterをinline adapterからasync adapterに変更しています。

inline adapterだと処理が同期的に行われてしまう為、本来使用する状態と合わせる為にはテストの時も非同期で処理を行った方が良いだろう、という事で変更したようです。