なるようになるブログ

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

rails commit log流し読み(2019/01/29)

2019/01/29分のコミットです。

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

activerecord/CHANGELOG.md


Merge pull request #35030 from alkesh26/actionpack-long-string-indentation-and-typo-fix

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

諸々タイポを修正しています。


Apply t.timestamps changes in Action Text and Action Mailbox

actionmailbox/db/migrate/20180917164000_create_action_mailbox_tables.rbactiontext/db/migrate/201805281641_create_action_text_tables.rbの修正です。

action_mailbox_inbound_emails tableでprecisionをサポートしている場合のにtimestampsにprecisionオプションを指定するようになっていたのですが、precisionオプションはActive Record側で自動で行うようになった(Make t.timestamps with precision by default.)為、migration fileからはチェックを削除しています。合わせて、action_text_rich_texts table作成用のmigration fileでtimestampsを使うよう修正しています。

が、後ほどRevertしています。恐らくテストが壊れたから?

[追記]

「後ほどRevertしたのはdummy app内のmigration versionの桁数がおかしかったり日にちが違ったりしてたのをついでにそろえたときにdb:migrateし直すのをさぼってschema.rb内のversionが更新されてなくてpending migrationでテストが落ちたからです。」 との事でした。kamipoさんご指摘ありがとうございました。

[/追記]


Merge pull request #35062 from larskanis/native-timestamps

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

PostgreSQL adapterでtimestampのdecode処理、pg gemが提供しているdecoder(PG::TextDecoder::TimestampUtcPG::TextDecoder::TimestampWithoutTimeZone)を使用するよう修正しています。


Merge pull request #35074 from rails/ro-lookup-context

actionview/lib/action_view/lookup_context.rbactionview/lib/action_view/testing/resolvers.rbの修正です。

LookupContext classからview_pathsメソッドを削除しています。

Action Viewのcache処理とobject間の関連性の管理の改善を行っており、その一環として、view pathが動的に変わる事がなくなるようにする為に、上記対応を行っています。


Revert "Apply t.timestamps changes in Action Text and Action Mailbox"

migration fileからprecisionをサポートしているかチェックしないよう修正した、Apply t.timestamps changes in Action Text and Action Mailbox をRevertしています。


Merge pull request #35076 from rails/more-ro-objects

actiontext/lib/templates/installer.rbの修正です。

action_text:installapp/javascript/packs/application.jsに必要なrequireを追加する際に、追加する行の前に改行を入れるよう修正しています。ファイルの末尾に改行が無い場合に、最終行と追加する行が1行になってのを避ける為。


Merge pull request #35067 from vnbrs/patch-1

Action Viewの修正です。

Make the lookup context more "read-only"(Merge pull request #35074 from rails/ro-lookup-context)の続きで、renderer処理のcache処理とobject間の関連性の管理の改善を行っています。

具体的には、instance variablesをlocal variablesに変更、不要なdelegate処理を削除、digest pathをcacheするよう修正、等を行っています。


Fix usage documentation in VideoAnalyzer

activestorage/lib/active_storage/analyzer/video_analyzer.rbのdocの修正です。

Analyzer::VideoAnalyzer classのdoc内にあるexampleコードで、namespaceが間違えていた(ActiveStorage::VideoAnalyzerになっていたが正しくはActiveStorage::Analyzer::VideoAnalyzer)のを修正しています。


Merge pull request #35071 from kamipo/text_without_limit

MySQL adapterで、migrationのtext / blob typeに:sizeオプションを指定出来るよう対応しています。

指定出来る値は、tinymediumlongで、オプションを指定した場合、指定したsizeの型(e.g. t.text size: :longを指定したLONGTEXT型)が使用されるようになっています。