2014/04/10日分です。ここ数日、コミット数が割と多くて少し大変なので、フォーマット作成用のアプリの作成を急がねば…。
depend_on_asset is not required anymore on sprockets-rails 2.1.2
sprockets-rails 2.1.2ではdepend_on_asset
が不要になったので、テストコードからdepend_on_asset
の記述を削除しています。
rails4.1から、cssファイルでhelperメソッド(image-url
等)を呼び出す際、depend_on_asset
を呼び出さないと動かなくなってしまっていたのを修正。
影響範囲大きめ。
Add missing require so requiring active_support/cache
works again.
active_support/per_thread_registry'
のrequire
が消されてしまったらしく、再度require
を追加しています。
redirect_to_https
の処理の中で、request.uri
の値をパースして、飛び先のlocationを組み立てていたのですが、元々request
オブジェクトに入っている値でlocationの組み立てが可能だった為、request.uri
のパース処理が削除しています。
The source
option for has_many => through
should accept String values.
has_many => through
のsource
オプションが元々Symbolしか受け付けて無かったのを、Stringも受け付けるよう修正しています。
add services: memcache to travis
travis.ymlの修正。services
にmemcacheを追加しています。
Make the reflections cache work with strings as its keys
ActiveRecord::Reflection
にはcache
機能があって、そのcache
のkeyにStringを指定するよう修正。
ActiveRecord
にReflection
機能があるの自体初めて知りました。どういうユースケースで使うんだろう。
No need to call to_sym
on reflection name, since the cache now works with strings with string keys.
上記コミットにより、cache
のkey
をStringで扱うにようになったので、不要になったto_sym
している箇所を削除しています。
Make the aggregate_reflections cache work with strings as its keys.
まだReflection
関係の修正。上記同様、keyにStringを使うよう修正
Make sure the reflection test is passing a String to the reflection cache.
まだまだReflection
関係の修正。上記修正に伴うテストの修正。
まだまだまだReflection
関係の修正。不要なcollect
処理削除。
Only call uniq on the conditional that actually needs it
まだまだまだまだReflection
関係の修正。
- (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).uniq + options[:source] ? [options[:source]] : [name.to_s.singularize, name].uniq
演算結果にuniq
を行うのではなう、uniq
処理が必要な部分にだけ処理を行うように修正。
クラスメソッドをprivate化するために、private_class_method
メソッドを使用するよう修正しています。
元々は、private
を定義していたのですが、これはインスタンスメソッドの場合はprivate
になるのですが、クラスメソッドはprivate
ならないので、private
になってなかったバグの修正ですね。
割とありがちなバグなんですが、気付きづらいですね、これ。
不要な改行コードの削除。End Of Lineの略ですな。
Correct factual error for page not found
rails guideの修正。参考URLのアドレスが間違えてたのを修正しています。
Add a failing test for a URL helper that was broken by a6b9ea2.
testコードの追加。Add a failing test
と書いてあるのですが、普通に通るテストのような…。どういうニュアンスなのか、ちょっと分からなかったです。このテストを見て、resources
にshallow
オプションがあるのを思い出しました。shallow
についてはこちら参考。
debugger
に関係するコード(テスト含む)を分離させて、関係ある処理でまとめています。こういうリファクタリング良いですね。あとで読むときに分り易くなりそうです。
Prevent generation of extra whitespace in templates
<%- ~ %>
を使うようにして、generateで生成されるGemfile
から余計な空白を取り除いくようにしています。
ci skip Update code snippets to latest master (initialization.md)
rails guideの修正。 Mongrel
を使うように書かれていたexampleがPuma
を使うように修正されています。