1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-17 13:39:46 +00:00

style(rubocop): fix all safe auto correctable offenses

هذا الالتزام موجود في:
Charlie Smurthwaite
2023-03-16 15:50:53 +00:00
الأصل 02c93a4850
التزام fd289c46fd
204 ملفات معدلة مع 2611 إضافات و2486 حذوفات

عرض الملف

@@ -2,65 +2,65 @@ structure :message do
basic :id
basic :token
expansion(:status) {
expansion(:status) do
{
:status => o.status,
:last_delivery_attempt => o.last_delivery_attempt ? o.last_delivery_attempt.to_f : nil,
:held => o.held == 1 ? true : false,
:hold_expiry => o.hold_expiry ? o.hold_expiry.to_f : nil
status: o.status,
last_delivery_attempt: o.last_delivery_attempt ? o.last_delivery_attempt.to_f : nil,
held: o.held == 1,
hold_expiry: o.hold_expiry ? o.hold_expiry.to_f : nil
}
}
end
expansion(:details) {
expansion(:details) do
{
:rcpt_to => o.rcpt_to,
:mail_from => o.mail_from,
:subject => o.subject,
:message_id => o.message_id,
:timestamp => o.timestamp.to_f,
:direction => o.scope,
:size => o.size,
:bounce => o.bounce,
:bounce_for_id => o.bounce_for_id,
:tag => o.tag,
:received_with_ssl => o.received_with_ssl
rcpt_to: o.rcpt_to,
mail_from: o.mail_from,
subject: o.subject,
message_id: o.message_id,
timestamp: o.timestamp.to_f,
direction: o.scope,
size: o.size,
bounce: o.bounce,
bounce_for_id: o.bounce_for_id,
tag: o.tag,
received_with_ssl: o.received_with_ssl
}
}
end
expansion(:inspection) {
expansion(:inspection) do
{
:inspected => o.inspected == 1 ? true : false,
:spam => o.spam == 1 ? true : false,
:spam_score => o.spam_score.to_f,
:threat => o.threat == 1 ? true : false,
:threat_details => o.threat_details
inspected: o.inspected == 1,
spam: o.spam == 1,
spam_score: o.spam_score.to_f,
threat: o.threat == 1,
threat_details: o.threat_details
}
}
end
expansion(:plain_body) { o.plain_body }
expansion(:html_body) { o.html_body }
expansion(:attachments) {
expansion(:attachments) do
o.attachments.map do |attachment|
{
:filename => attachment.filename.to_s,
:content_type => attachment.mime_type,
:data => Base64.encode64(attachment.body.to_s),
:size => attachment.body.to_s.bytesize,
:hash => Digest::SHA1.hexdigest(attachment.body.to_s)
filename: attachment.filename.to_s,
content_type: attachment.mime_type,
data: Base64.encode64(attachment.body.to_s),
size: attachment.body.to_s.bytesize,
hash: Digest::SHA1.hexdigest(attachment.body.to_s)
}
end
}
end
expansion(:headers) { o.headers }
expansion(:raw_message) { Base64.encode64(o.raw_message) }
expansion(:activity_entries) {
expansion(:activity_entries) do
{
:loads => o.loads,
:clicks => o.clicks
loads: o.loads,
clicks: o.clicks
}
}
end
end