なるようになるブログ

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

rails commit log流し読み(2014/08/21)

2014/08/21分のコミットです。

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

actionpack/CHANGELOG.md


Require ActiveJob in case a skip_xxx option is given

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

require "active_job/railtie"の読み込み位置を修正しています。


Fix typo in rdoc [ci skip]

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

サンプルのソースの引数が誤っていたのを修正しています。


[Rdoc] Make clear that we are sending an AR object [ci skip]

もう一回actionmailer/lib/action_mailer/base.rbactionmailer/lib/action_mailer/message_delivery.rbのdocの修正です。

mailerのサンプルで引数にStringを指定していたのを、ActiveRecordのオブジェクトを渡すよう修正しています。


Point release notes to stable branch for list of commits. [ci skip]

各release noteの修正です。

githubのリンク先を各verのブランチを指定するよう修正しています。


Same as f39cb2b except backport friendly

guides/source/4_1_release_notes.mdの修正です。

直ぐ上のコミットと同じ内容の対応を4.1のrelease noteに行っています。


Same as f39cb2b except backport friendly

guides/source/4_0_release_notes.mdの修正です。

直ぐ上のコミットと同じ内容の対応を4.0のrelease noteに行っています。


[ci skip] Added documentation for has_many scope parameter

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

has_many scopeにパラメータを渡すサンプルを追加しています。

has_many :comments, -> { where(author_id: 1) }
has_many :employees, -> { joins(:address) }
has_many :posts, ->(post) { where("max_post_length > ?", post.length) }

Fix a few typos/some grammar in Active Job Basics

guides/source/active_job_basics.mdの修正です。

グラマーの修正です。


[ci skip] correct docs about the migration generation

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

マイグレーションファイルのサンプルでup/downメソッドを使用していたのをchangeメソッドを使うよう修正しています。


[ci skip] add doc for STEP in migration

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

STEP optionについての説明を追加しています。


[ci skip] Fix Active Job grammar in api docs

activejob/README.mdactivejob/lib/active_job/callbacks.rbの修正です。

グラマーの修正です。


Remove timestamp type from generator usage

railties/lib/rails/generators/rails/model/USAGEの修正です。

ActiveRecordに指定出来る型からtimestampを削除しています。


Make the explicit the Active Job dependency of Action Mailer

actionmailer/actionmailer.gemspecの修正です。

add_dependencyactivejobを追加しています。


Update configuring.md [ci skip]

guides/source/configuring.mdの修正です。

attribute_types_cached_by_defaultについての説明を削除しています。


Fix SyntaxError

actionmailer/test/message_delivery_test.rbの修正です。

testメソッドを使用して行っていたテストを普通にdefメソッドを定義するよう修正しています。

メソッド全体を覆うensureを使用する場合、testメソッドだと書けないので修正したんですね。

-  test 'should enqueue and run correctly in activejob' do
+  def test_should_enqueue_and_run_correctly_in_activejob
     @mail.deliver_later!
     assert_equal 1, ActionMailer::Base.deliveries.size
   ensure
    ActionMailer::Base.deliveries.clear
  end

これがあるので、testメソッド使いづらいんですよねえ…。


"warning: assigned but unused variable"

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

使用していない変数を削除しています。


[ci skip] Fixing spelling typo in testing guide.

guides/source/testing.mdの修正です。

typoの修正。


Enable gzip compression by default

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

ActionDispatch::Staticに一致するリクエストについて、デフォルトでgzip圧縮を有効にするよう修正しています。


Change 'does' to 'do'

guides/source/4_2_release_notes.mdの修正です。

doesdoに修正。typo


Upgrade guide pass. [CI SKIP]

guides/source/upgrading_ruby_on_rails.mdの修正です。

こちらもグラマーの修正です。


Avoid duplicating routes for HEAD requests.

ActionDispatchの修正です。

HEAD requestの際に、routesをduplicate行わないようリファクタリングしています。性能改善の為ですね。


Improve router test.

actionpack/test/journey/router_test.rbの修正です。

Router#recognizeメソッドについてのテストを追加しています。


Fix some issues in 4.2 release notes.

guides/source/4_2_release_notes.mdの修正です。

重複していた行を削除しています。