مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
refactor: remove explicit autoload
هذا الالتزام موجود في:
@@ -27,7 +27,7 @@ module Postal
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Include from lib
|
# Include from lib
|
||||||
config.eager_load_namespaces << Postal
|
config.eager_load_paths << Rails.root.join("lib")
|
||||||
|
|
||||||
# Disable field_with_errors
|
# Disable field_with_errors
|
||||||
config.action_view.field_error_proc = proc { |t, i| t }
|
config.action_view.field_error_proc = proc { |t, i| t }
|
||||||
|
|||||||
@@ -12,13 +12,17 @@
|
|||||||
|
|
||||||
# These inflection rules are supported but not enabled by default:
|
# These inflection rules are supported but not enabled by default:
|
||||||
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
||||||
inflect.acronym "API"
|
|
||||||
inflect.acronym "SMTP"
|
|
||||||
inflect.acronym "IP"
|
|
||||||
inflect.acronym "DNS"
|
|
||||||
inflect.acronym "UUID"
|
|
||||||
inflect.acronym "HTTP"
|
|
||||||
inflect.acronym "DB"
|
|
||||||
inflect.acronym "MX"
|
|
||||||
inflect.acronym "DKIM"
|
inflect.acronym "DKIM"
|
||||||
|
inflect.acronym "HTTP"
|
||||||
|
inflect.acronym "SMTP"
|
||||||
|
inflect.acronym "UUID"
|
||||||
|
|
||||||
|
inflect.acronym "API"
|
||||||
|
inflect.acronym "DNS"
|
||||||
|
|
||||||
|
inflect.acronym "DB"
|
||||||
|
inflect.acronym "IP"
|
||||||
|
inflect.acronym "MQ"
|
||||||
|
inflect.acronym "MX"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,45 +1,2 @@
|
|||||||
module Postal
|
module Postal
|
||||||
|
|
||||||
extend ActiveSupport::Autoload
|
|
||||||
|
|
||||||
eager_autoload do
|
|
||||||
autoload :AppLogger
|
|
||||||
autoload :BounceMessage
|
|
||||||
autoload :Config
|
|
||||||
autoload :Countries
|
|
||||||
autoload :DKIMHeader
|
|
||||||
autoload :Error
|
|
||||||
autoload :Helpers
|
|
||||||
autoload :HTTP
|
|
||||||
autoload :HTTPSender
|
|
||||||
autoload :Job
|
|
||||||
autoload :MessageDB
|
|
||||||
autoload :MessageInspection
|
|
||||||
autoload :MessageInspector
|
|
||||||
autoload :MessageInspectors
|
|
||||||
autoload :MessageParser
|
|
||||||
autoload :MessageRequeuer
|
|
||||||
autoload :MXLookup
|
|
||||||
autoload :QueryString
|
|
||||||
autoload :RabbitMQ
|
|
||||||
autoload :ReplySeparator
|
|
||||||
autoload :RspecHelpers
|
|
||||||
autoload :Sender
|
|
||||||
autoload :SendResult
|
|
||||||
autoload :SMTPSender
|
|
||||||
autoload :SMTPServer
|
|
||||||
autoload :SpamCheck
|
|
||||||
autoload :TrackingMiddleware
|
|
||||||
autoload :UserCreator
|
|
||||||
autoload :Version
|
|
||||||
autoload :Worker
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.eager_load!
|
|
||||||
super
|
|
||||||
Postal::MessageDB.eager_load!
|
|
||||||
Postal::SMTPServer.eager_load!
|
|
||||||
Postal::MessageInspectors.eager_load!
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,20 +1,4 @@
|
|||||||
module Postal
|
module Postal
|
||||||
module MessageDB
|
module MessageDB
|
||||||
|
|
||||||
extend ActiveSupport::Autoload
|
|
||||||
eager_autoload do
|
|
||||||
autoload :Click
|
|
||||||
autoload :Database
|
|
||||||
autoload :Delivery
|
|
||||||
autoload :LiveStats
|
|
||||||
autoload :Load
|
|
||||||
autoload :Message
|
|
||||||
autoload :Migration
|
|
||||||
autoload :Provisioner
|
|
||||||
autoload :Statistics
|
|
||||||
autoload :SuppressionList
|
|
||||||
autoload :Webhooks
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
module Postal
|
module Postal
|
||||||
module MessageInspectors
|
module MessageInspectors
|
||||||
|
|
||||||
extend ActiveSupport::Autoload
|
|
||||||
eager_autoload do
|
|
||||||
autoload :Clamav
|
|
||||||
autoload :Rspamd
|
|
||||||
autoload :SpamAssassin
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
module Postal
|
module Postal
|
||||||
module SMTPServer
|
module SMTPServer
|
||||||
|
|
||||||
extend ActiveSupport::Autoload
|
|
||||||
eager_autoload do
|
|
||||||
autoload :Client
|
|
||||||
autoload :Server
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم