なるようになるブログ

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

rails commit log流し読み(2015/08/17)

2015/08/17分のコミットです。

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

railties/CHANGELOG.md

actionview/CHANGELOG.md


Merge pull request #21253 from vincefrancesi/date-helper-use-hidden-documentation

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

date_selectメソッドのdocにuse_hiddenオプションについての説明を修正しています。


Plugins are generated with the version 0.1.0

railties/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rbの修正です。

rails pluginコマンドで生成するpluginのデフォルトバージョンを0.0.1から0.1.0に修正しています。

Semantic Versioning 2.0.0では開発の最初のバージョンを0.1.0にする事を推奨しており、それに合わせて修正したようです。


Fix typo on method name

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

ActiveJobのインスタンスを生成するようのヘルパーメソッドメソッド名をタイポしていたのを修正しています。


Updated tests for the generated version number change

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

Plugins are generated with the version 0.1.0の修正に合わせて、テストも修正しています。


Merge pull request #21135 from DropsOfSerenity/master

ActionViewの修正です。

submit_tagメソッドを使用した場合に、デフォルトでdisable_withにオプションが設定されるよう対応しています。

submit_tag
# => <input name="commit" data-disable-with="Save changes" type="submit" value="Save changes" />

これを、Rails 4.2までと同じように、デフォルトではdisable_withオプションを設定されないようにするには、config.action_view.automatically_disable_submit_tagfalseを設定すればOKです。


Fixed syslog example in production config template

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

production.rbに記載されている、ログをsyslogに出力する場合に使用するクラスのexampleが、古いクラスのままだったのを、正しいクラス名に修正しています。

-  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+  # require 'syslog/logger'
+  # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')

[skip ci] Fix minor typo

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

transfomration -> transformationにタイポを修正しています。


reorganize testing guide. [Zachary Scott & Yves Senn]

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

より読みやすくなるよう、test guide全体の構成を見なおしています。

ちなみにguideはまだWIPとの事です。


Replacing lambda with proc getting argument error because of it.

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

assert_calledメソッドの中で、不要なArgumentErrorを発生さないようにするために、lambdaを使用していたのをprocを使用するよう修正しています。

-          object.stub(method_name, -> { times_called += 1 }) { yield }
+          object.stub(method_name, proc { times_called += 1 }) { yield }