Skip to content

Commit

Permalink
style(rubocop): Style/MultilineBlockChain
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 12, 2024
1 parent 013b3ea commit c6326a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/initializers/mail_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ class AttachmentsList < Array
def initialize(parts_list)
@parts_list = parts_list
@content_disposition_type = "attachment"
parts_list.map do |p|
parts = parts_list.map do |p|
p.parts.empty? && p.attachment? ? p : p.attachments
end.flatten.compact.each { |a| self << a }
self
end.flatten.compact
parts.each { |a| self << a }
end
# rubocop:enable Lint/MissingSuper

Expand Down
5 changes: 3 additions & 2 deletions lib/postal/dkim_header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ def header_names

def normalized_headers
[].tap do |new_headers|
headers.select { |h|
dkim_headers = headers.select { |h|
h.match(%r{
^(
from|sender|reply-to|subject|date|message-id|to|cc|mime-version|content-type|content-transfer-encoding|
resent-to|resent-cc|resent-from|resent-sender|resent-message-id|in-reply-to|references|list-id|list-help|
list-owner|list-unsubscribe|list-subscribe|list-post
):}ix)
}.each do |h|
}
dkim_headers.each do |h|
new_headers << normalize_header(h)
end
end
Expand Down

0 comments on commit c6326a6

Please sign in to comment.