Merge remote-tracking branch 'parent/main' into upstream-20240109

This commit is contained in:
KMY 2025-01-09 13:20:56 +09:00
commit d35fa72842
333 changed files with 4444 additions and 2541 deletions

View file

@ -6,5 +6,5 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
]

View file

@ -0,0 +1,18 @@
# frozen_string_literal: true
Rails.application.config.to_prepare do
custom_css = begin
Setting.custom_css
rescue ActiveRecord::AdapterError # Running without a database, not migrated, no connection, etc
nil
end
if custom_css.present?
Rails
.cache
.write(
:setting_digest_custom_css,
Digest::SHA256.hexdigest(custom_css)
)
end
end

View file

@ -0,0 +1,15 @@
# frozen_string_literal: true
return unless defined?(Rails::Command::StatsCommand)
[
%w(AppLibs app/lib),
%w(Policies app/policies),
%w(Presenters app/presenters),
%w(Serializers app/serializers),
%w(Services app/services),
%w(Validators app/validators),
%w(Workers app/workers),
].each do |name, directory|
Rails::CodeStatistics.register_directory(name.titleize, directory)
end