Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use explicit autoloads rather than from paths
- Loading branch information
Showing
9 changed files
with
87 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
web: bundle exec puma -C config/puma.rb | ||
fast: bundle exec rake postal:fast_server | ||
worker: bundle exec rake postal:worker | ||
worker: bundle exec ruby script/worker.rb | ||
cron: bundle exec rake postal:cron | ||
smtp: bundle exec rake postal:smtp_server | ||
requeuer: bundle exec rake postal:requeuer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
require 'postal/error' | ||
require 'postal' | ||
require 'postal/message_db/mysql' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module Postal | ||
|
||
extend ActiveSupport::Autoload | ||
|
||
eager_autoload do | ||
autoload :AppLogger | ||
autoload :BounceMessage | ||
autoload :Config | ||
autoload :Countries | ||
autoload :DKIMHeader | ||
autoload :Error | ||
autoload :FastServer | ||
autoload :Helpers | ||
autoload :HTTP | ||
autoload :HTTPSender | ||
autoload :Job | ||
autoload :LetsEncrypt | ||
autoload :MessageDB | ||
autoload :MessageInspection | ||
autoload :MessageParser | ||
autoload :MessageRequeuer | ||
autoload :QueryString | ||
autoload :RabbitMQ | ||
autoload :ReplySeparator | ||
autoload :RspecHelpers | ||
autoload :SendResult | ||
autoload :Sender | ||
autoload :SMTPServer | ||
autoload :SpamCheck | ||
autoload :UserCreator | ||
autoload :Version | ||
autoload :Worker | ||
end | ||
|
||
def self.eager_load! | ||
super | ||
Postal::MessageDB.eager_load! | ||
Postal::FastServer.eager_load! | ||
Postal::SMTPServer.eager_load! | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Postal | ||
module FastServer | ||
extend ActiveSupport::Autoload | ||
eager_autoload do | ||
autoload :Client | ||
autoload :HTTPHeader | ||
autoload :HTTPHeaderSet | ||
autoload :Interface | ||
autoload :Server | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module Postal | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module Postal | ||
module SMTPServer | ||
extend ActiveSupport::Autoload | ||
eager_autoload do | ||
autoload :Client | ||
autoload :Server | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env ruby | ||
require_relative '../config/environment' | ||
Postal::Worker.new([:main]).work |