なるようになるブログ

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

rails commit log流し読み(2015/05/20)

2015/05/20分のコミットです。

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

activesupport/CHANGELOG.md


updating the links, they were removed in cc30f5f9 [ci skip]

rails guideのRuby on Rails Security Guideの修正です。

以前削除したhttp://ha.ckers.orgの代わりにOWASPのCross-Site scripting Cheat Sheetへのリンクを追加しています。


Eliminate the duplication code of StatementPool

ActivieRecordのConnectionAdaptersの修正です。

各adapterで重複していたStatementPoolクラスに関する処理を削除しています。


spelling fix [ci skip]

actionview/lib/action_view/renderer/partial_renderer/collection_caching.rbのdocの修正です。

CollectionCaching module内のoverriden -> overriddenにタイポを修正しています。


Avoid the heredoc in one line queries and simple queries

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

表示が1行内で収まるシンプルなqueryの生成について、ヒアドキュメントを使用しないよう修正しています。


Remove require 'arel/visitors/bind_visitor'

各ファイルから不要なarel/visitors/bind_visitorのrequireを削除しています。


Merge pull request #20157 from tak1n/master

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

Testing Viewsの項に"route testはcontroller testsの中に含むのが一般的旨説明を追加しています。


doc changes for readability [ci skip]

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

doc内の強調したい箇所にに等幅フォント用の設定を追加しています。


Remove unused already require

ActiveRecordの修正です。

使用していないファイルのrequire処理を削除しています。


parent_reflection should store only a reflection object

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

parent reflectionを取得する際、reflectionクラスのインタンスと、親の名前の情報を別に持っていたのを止めて、親の名前についてreflectionクラスから取得するよう修正しています。


updated squash docs-section [ci skip]

rails guideのContributing to Ruby on Railsの修正です。

Squashing commitsの項で、upstreamに対してrebaseしてからコミットをsquashするような手順になっていたのを、まとめて行うよう修正しています。

-$ git rebase upstream/master
-$ git rebase -i
+$ git rebase -i upstream/master

Patch Delegator to work with #try

activesupport/lib/active_support/core_ext/object/try.rbの修正です。

class Decorator < SimpleDelegator
  def delegator_method
    'delegator method'
  end
end
Decorator.new(@string).try(:delegator_method) # => "delegator method"

元々tryメソッドObjectクラスに定義していたのですが、DelegatorクラスはBasicObjectクラスを継承しており、Objectは継承関係に無かったので、tryメソッドが使えなかったんですねえ。


Small stylistic tweaks for Delegator#try patch

activesupport/lib/active_support/core_ext/object/try.rbactivesupport/test/core_ext/object/try_test.rbの修正です。

module名の修正、インデントの整理をお粉ています。


Give respond_to? a Symbol

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

absolute_valueメソッドで引数のnumberabsメソッドを定義しているかどうかのチェック処理で、respond_toの引数にStringを指定していたのを、Symbolを指定するよう修正しています。


[ci skip] add to doc that acceptance validator allows nil by default

rails guideのActive Record Validationsの修正です。

validatesメソッドacceptanceオプションについての説明の箇所に、メソッドに指定した属性がnilじゃない場合のみ動作する旨説明を追加しています。


Fix docs markup for option_groups_from_collection_for_select [ci skip]

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

option_groups_from_collection_for_selectメソッドのdoc内、group_label_methodオプションの説明で、マークアップがおかしくなっていた(+が足りてなかった)のを修正しています。


Updated postgresql documentation link to use latest version [ci skip]

各docの修正です。

PostgreSQLのdocへのリンクを、バージョン指定から現在の最新のdocに修正しています。

-* [type definition](http://www.postgresql.org/docs/9.3/static/hstore.html)
+* [type definition](http://www.postgresql.org/docs/current/static/hstore.html)

Fix NetAddr link [ci skip]

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

NetAddrクラスのrubydocへのリンクが間違っていたのを修正しています。


add missing punctuation in changelog. [ci skip]

activesupport/CHANGELOG.mdの修正です。

行末にピリオドが無かった行があったのを追加しています。


typo fix [ci skip]

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

Callbacks moduleのdoc内、ActiveRecord::RecordInvalidクラスが強調されるようttタグで囲んでいます。


Rails 5.0 will target Ruby 2.2+, correct rails guide example [ci skip]

rails guideのDebugging Rails Applicationsの修正です。

Rails server 実行結果の出力例のRubyのバージョンを 2.2.2に修正しています。


[ci skip] update ruby doc links; for rails next version ruby 2.2+ will be supported only

各guideの修正です。

ruby docへのリンクに指定するRubyのバージョンを2.2.2に修正しています。

-This type is mapped to Ruby [`Range`](http://www.ruby-doc.org/core-2.1.1/Range.html) objects.
+This type is mapped to Ruby [`Range`](http://www.ruby-doc.org/core-2.2.2/Range.html) objects.

Fix broken link for minitest. [ci skip]

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

Minitestのdocへのリンクをruby-docからdocs.seattlerbに修正しています。


updated Inline format at activerecord rdoc

activerecord/README.rdocのdocの修正です。

Product#name=メソッドをバッククオートでエスケープしていたのをttタグ(RDoc記法)でエスケープするよう修正しています。