Skip to content

Business intelligence made simple

Made Action Mailer optional - fixes #345 and closes #346

Andrew Kane2958af502bab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b698ea2..d258e066 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.4.7 (unreleased)
+
+- Made Action Mailer optional
+
## 2.4.6 (2021-09-20)
- Added support for workgroup with Amazon Athena
diff --git a/lib/blazer.rb b/lib/blazer.rb
index 9928c9a1..65337de9 100644
--- a/lib/blazer.rb
+++ b/lib/blazer.rb
@@ -38,6 +38,11 @@ module Blazer
class UploadError < Error; end
class TimeoutNotSupported < Error; end
+ # actionmailer optional
+ autoload :CheckMailer, "blazer/check_mailer"
+ # net/http optional
+ autoload :SlackNotifier, "blazer/slack_notifier"
+
class << self
attr_accessor :audit
attr_reader :time_zone
diff --git a/app/mailers/blazer/check_mailer.rb b/lib/blazer/check_mailer.rb
similarity index 100%
rename from app/mailers/blazer/check_mailer.rb
rename to lib/blazer/check_mailer.rb
diff --git a/app/mailers/blazer/slack_notifier.rb b/lib/blazer/slack_notifier.rb
similarity index 100%
rename from app/mailers/blazer/slack_notifier.rb
rename to lib/blazer/slack_notifier.rb