2021/07/29分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activejob/CHANGELOG.md
activestorage/CHANGELOG.md
- Make
vips
the default variant processor for new apps. - Attachments can be deleted after their association is no longer defined.
actionmailbox/CHANGELOG.md
Merge pull request #42626 from Shopify/as-file-store-remove-local-cache
activesupport/lib/active_support/cache/file_store.rb
、
activesupport/test/cache/stores/file_store_test.rb
の修正です。
FileStore
からLocalCache
を削除しています。
LocalCache
はdeserialized valueをメモリに保持する為に使用されています。元々、LocalCache
は入力された値をそのまま使用していた(入力値を変更していた)のを、Rails 6.1でdupするよう修正しました。この影響により、LocalCache
の処理の性能がRails 6.0より悪くなってしまっていました。LocalCache
を使用していたFileStore
も性能悪化してしまっていたのですが、そもそもFileStore
はLocalCache
の処理が不要な筈、という事で、性能改善の為にLocalCache
を使用しないよう修正しています。
Remove "stupid" from active record
activerecord/lib/arel/visitors/mysql.rb
、
activerecord/test/cases/scoping/default_scoping_test.rb
の修正です。
使用しないで良い箇所でstupid
という単語を使っている箇所があったのを修正しています。
Fix incomplete :nodoc: directives [ci-skip]
docの修正です。
:nodoc:
を:nodoc
にタイポしていたのを修正しています。
Apply :nodoc: to all DatabaseStatements overrides [ci-skip]
docの修正です。
内部だけで使用する想定のmoduleに:nodoc:
を指定しています。
Add more detail about what hosts are allowed
actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.html.erb
、
actionpack/lib/action_dispatch/middleware/templates/rescues/blocked_host.text.erb
の修正です。
host blockによりエラーになった場合のエラーメッセージに、hostnameが有効なhostnameかどうかを確認してね、というメッセージを含むよう修正しています。
Merge pull request #42867 from sato11/rename-middleware-remove
Add Middleware#remove to delete middleware or raise if not found.のフォローアップとして、CHANGELOGの修正、docの修正等を行っています。
Move Active Storage JS to ESM and drop Babel transpiling (#42895)
Acitve Storageの修正です。
Active StorageのJSをES modulesに変更しています。互換性の為、activestorage.js
は元の通りUMDとなっており、別途ES modulesのactivestorage.esm
を追加しています。
Remove offensive wording from active record
activerecord/lib/active_record/reflection.rb
のdocの修正です。
攻撃な言葉(This shit is nasty
)をdocから削除しています。
Action Textの修正です。
Action TextのJSをaction_text.js
-> actiontext.js
に修正しています。Active StorageのJSと合わせる為。
Update resolve_link_as to include SVG (#42892)
actionview/lib/action_view/helpers/asset_tag_helper.rb
の修正です。
preload_link_tag
でSVGファイルのtype
がimage/svg+xml
になるよう修正しています。
Merge pull request #41442 from p8/improve-help-for-rake-tasks
railties/lib/rails/command.rb
の修正です。
rails commandのhelpを表示する際に、rake taskのdescriptionも表示するよう修正しています。
Add plugin to common command USAGE (#41457)
railties/lib/rails/commands/help/USAGE
の修正です。
command helpにplugin new
commandを含むよう修正しています。
retry_on
parameter attempts
now accepts :unlimited
(#41761)
activejob/lib/active_job/exceptions.rb
の修正です。
Active Jobの修正です。
retry_on
のattempts
を無制限に行えるよう修正しています。無制限にしたい場合、attempts
に:unlimited
を指定すればOKです。
class MyJob < ActiveJob::Base retry_on(AlwaysRetryException, attempts: :unlimited) end
Merge branch 'vips-as-default' into main
Active Storage、railtiesの修正です。
新規に作成したアプリの場合、Active Storageのvariant processorにvips
を使用するよう修正しています。合わせて、doc内のprocessのexampleをvipsを使った場合のexampleに修正しています。
Merge pull request #42819 from alexcwatt/docs-representable
activestorage/app/models/active_storage/blob/representable.rb
、
activestorage/lib/active_storage/transformers/image_processing_transformer.rb
の修正です。
transform処理について説明している箇所が、ImageMagickが使われる事を前提とした説明になっていたのを修正しています。
Merge pull request #42030 from diegotoral/configurable-default-option
activesupport/lib/active_support/configurable.rb
の修正です。
config_accessor
にdefault
値を指定出来るよう修正しています。
class User include ActiveSupport::Configurable config_accessor :allowed_access, default: false end User.allowed_access # => false
Merge pull request #41822 from benoittgt/better-error-message-InvalidAuthenticityToken
actionpack/lib/action_controller/metal/request_forgery_protection.rb
の修正です。
ActionController::InvalidAuthenticityToken
が発生した場合に、ActionController::InvalidAuthenticityToken
のmessageに何故CSRF tokenエラーが発生したかの情報を保持するよう修正しています。
activestorage/app/models/active_storage/attachment.rb
の修正です。
associationの定義が無いattachment(attachment保存後にmodelのassociationの指定を変更した場合)を削除しようとするとエラーになっていたのを、削除出来るよう修正しています。
Merge pull request #42358 from ghiculescu/credentials-backwards-compat
activesupport/lib/active_support/encrypted_configuration.rb
の修正です。
Allow access to nested secrets by method callsの影響で、ネストしたキーの値が別のHashの場合、値が正しく取得出来なくなってしまっていたのを修正しています。
Action Viewの修正です。
time_field
にsecondsを含むかどうかを指定する為のinclude_seconds
オプションを追加しています。デフォルトはtrueです(元と同じ挙動)。
<%= form.time_field :foo, include_seconds: false %> # => <input value="16:22" type="time" /> <%= form.time_field :foo %> # => <input value="16:22:01.440" type="time" />
Merge pull request #42395 from chexology/fix-file-upload-in-action_mailbox-conductor
actionmailbox/app/controllers/rails/conductor/action_mailbox/inbound_emails_controller.rb
の修正です。
inbound emails conductorでattachments
をpermitted parametersに含むよう修正しています。unpermitted parameterに関するwarningが出るのを避ける為。
Address bundle exec blade build
failure with ruby 3.1.0dev
Gemfile
の修正です。
digest
gemのバージョンを3.0.1.pre
に更新しています。Ruby 3.1.0devでバージョンが更新されており、ビルドが通るようにする為。
Fix MemCacheStore local cache duplication
activesupport/lib/active_support/cache/mem_cache_store.rb
の修正です。
MemCacheStore: Properly duplicate local cache values in 6.1 modeでlocal cache valuesを6系までと同様にdupした値を返すようにしたのですが、実際は期待通りの動作していなかった(左記で対応したメソッドは直接呼ばれるメソッドでは無かった)為、対応方法を変えて再度修正しています。
activesupport/lib/active_support/inflector/inflections.rb
のdocの修正です。
irregular
のexampleにoctopus
を使用していたのを、cactus
を使用するよう修正しています。octopus
の複数形が何か、というのは議論の余地がある為、との事です。参考: nouns - What is the correct plural of "octopus"? - English Language & Usage Stack Exchange