From 4674e63b5ff84307f5b772e870e88109af2daf52 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Sat, 10 Feb 2024 23:20:30 +0000 Subject: [PATCH] style(rubocop): Lint/MissingSuper --- app/models/concerns/has_authentication.rb | 1 + config/initializers/mail_extensions.rb | 2 ++ lib/postal/http_sender.rb | 1 + lib/postal/smtp_sender.rb | 5 +++-- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/models/concerns/has_authentication.rb b/app/models/concerns/has_authentication.rb index 26a9f98d..264e43bf 100644 --- a/app/models/concerns/has_authentication.rb +++ b/app/models/concerns/has_authentication.rb @@ -49,6 +49,7 @@ class Postal::Errors::AuthenticationError < Postal::Error attr_reader :error def initialize(error) + super() @error = error end diff --git a/config/initializers/mail_extensions.rb b/config/initializers/mail_extensions.rb index 0d37a1c4..d4891766 100644 --- a/config/initializers/mail_extensions.rb +++ b/config/initializers/mail_extensions.rb @@ -111,6 +111,7 @@ def decode_body_as_text # Handle attached emails as attachments class AttachmentsList < Array + # rubocop:disable Lint/MissingSuper def initialize(parts_list) @parts_list = parts_list @content_disposition_type = "attachment" @@ -119,6 +120,7 @@ def initialize(parts_list) end.flatten.compact.each { |a| self << a } self end + # rubocop:enable Lint/MissingSuper end diff --git a/lib/postal/http_sender.rb b/lib/postal/http_sender.rb index 3bd7cc5d..c65823c0 100644 --- a/lib/postal/http_sender.rb +++ b/lib/postal/http_sender.rb @@ -4,6 +4,7 @@ module Postal class HTTPSender < Sender def initialize(endpoint, options = {}) + super() @endpoint = endpoint @options = options @log_id = Nifty::Utils::RandomString.generate(length: 8).upcase diff --git a/lib/postal/smtp_sender.rb b/lib/postal/smtp_sender.rb index 3dfdf2fd..c72cb1a8 100644 --- a/lib/postal/smtp_sender.rb +++ b/lib/postal/smtp_sender.rb @@ -6,6 +6,7 @@ module Postal class SMTPSender < Sender def initialize(domain, source_ip_address, options = {}) + super() @domain = domain @source_ip_address = source_ip_address @options = options @@ -143,9 +144,9 @@ def send_message(message, force_rcpt_to = nil) mail_from = "#{message.server.token}@#{Postal.config.dns.return_path}" end if Postal.config.general.use_resent_sender_header - raw_message = "Resent-Sender: #{mail_from}\r\n" + message.raw_message + raw_message = "Resent-Sender: #{mail_from}\r\n" + message.raw_message else - raw_message = message.raw_message + raw_message = message.raw_message end tries = 0 begin