なるようになるブログ

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

rails commit log流し読み(2018/01/17)

2018/01/17分のコミットです。

CHANGELOGへの追加はありませんでした。


Provide a sensible default host

Active Storageの修正です。

blobからcontent typeを取得するよう対応した、Extract content types from blob dataで、URLを生成する都合上disk serviceでhostの指定が必須になったのですが、disk serviceでhostの指定が必須なのは違和感があるのでは、という指摘が入り、hostの指定は任意になりました。指定されてない場合のデフォルトはhttp://localhost:3000


Test against the pure-Ruby Redis driver

activesupport/Rakefileactivesupport/test/cache/stores/redis_cache_store_test.rbの修正です。

CIで、ActiveSupport::Cache::RedisCacheStoreTestsのテストがpure-Ruby Redis driverを使用して実行されるよう修正しています。

元々はhiredis driverを使用してのテストだけが実行されていたのですが、pure-Ruby Redis driverを使用した場合のみおきるエラーが発生してしまった為、対応したようです。


Convert keys to binary in the Redis cache store

activesupport/lib/active_support/cache/redis_cache_store.rbの修正です。

RedisCacheStore#normalize_keyメソッドでkeyをノーマライズする際に、binaryに変換してからノーマライズ処理を行うよう修正しています。

pure-Ruby Redis Driverを使用している場合に、keyの値によってはencoding errorsが発生しまう事がある為。


Update "Layouts and Rendering in Rails" guide [ci skip]

rails guideのLayouts and Rendering in Railsの修正です。

Rendering by Default: Convention Over Configuration in Actionの項で、実際にrender処理を行うmodule名を誤っていたのを修正、既に存在しないBuilderについて言及していたのを削除、等を行っています。