diff --git a/app/models/route.rb b/app/models/route.rb index 3ef415c74..362ff98c0 100644 --- a/app/models/route.rb +++ b/app/models/route.rb @@ -128,7 +128,7 @@ def save_additional_route_endpoints # # This message will create a suitable number of message objects for messages that - #  are destined for this route. It receives a block which can set the message content + # are destined for this route. It receives a block which can set the message content # but most information is specified already. # # Returns an array of created messages. diff --git a/lib/postal/http_sender.rb b/lib/postal/http_sender.rb index e07a637e5..69011dd66 100644 --- a/lib/postal/http_sender.rb +++ b/lib/postal/http_sender.rb @@ -35,7 +35,7 @@ def send_message(message) result.output = response[:body].to_s[0, 500].strip end if response[:code] >= 200 && response[:code] < 300 - #  This is considered a success + # This is considered a success result.type = "Sent" elsif response[:code] >= 500 && response[:code] < 600 # This is temporary. They might fix their server so it should soft fail. diff --git a/lib/postal/message_db/database.rb b/lib/postal/message_db/database.rb index 3455c8ad0..e84d761fe 100644 --- a/lib/postal/message_db/database.rb +++ b/lib/postal/message_db/database.rb @@ -59,8 +59,8 @@ def messages_with_pagination(*args) end # - #  Create a new message with the given attributes. This won't be saved to the database - #  until it has been 'save'd. + # Create a new message with the given attributes. This won't be saved to the database + # until it has been 'save'd. # def new_message(attributes = {}) Message.new(self, attributes) @@ -74,35 +74,35 @@ def total_size end # - #  Return the live stats instance + # Return the live stats instance # def live_stats @live_stats ||= LiveStats.new(self) end # - #  Return the statistics instance + # Return the statistics instance # def statistics @statistics ||= Statistics.new(self) end # - #  Return the provisioner instance + # Return the provisioner instance # def provisioner @provisioner ||= Provisioner.new(self) end # - #  Return the provisioner instance + # Return the provisioner instance # def suppression_list @suppression_list ||= SuppressionList.new(self) end # - #  Return the provisioner instance + # Return the provisioner instance # def webhooks @webhooks ||= Webhooks.new(self) @@ -183,7 +183,7 @@ def select(table, options = {}) end # - #  A paginated version of select + # A paginated version of select # def select_with_pagination(table, page, options = {}) page = page.to_i @@ -253,7 +253,7 @@ def insert_multi(table, keys, values) # # Deletes a in the database. Accepts a table name, and some options which - #  are shown below: + # are shown below: # # :where => The condition to apply to the query # @@ -269,7 +269,7 @@ def delete(table, options = {}) end # - #  Return the correct database name + # Return the correct database name # def database_name @database_name ||= "#{Postal.config.message_db.prefix}-server-#{@server_id}" diff --git a/lib/postal/message_db/message.rb b/lib/postal/message_db/message.rb index 1a50fa68b..b9934b1fc 100644 --- a/lib/postal/message_db/message.rb +++ b/lib/postal/message_db/message.rb @@ -103,7 +103,7 @@ def timestamp end # - #  Return the time that the last delivery was attempted + # Return the time that the last delivery was attempted # def last_delivery_attempt @last_delivery_attempt ||= @attributes["last_delivery_attempt"] ? Time.zone.at(@attributes["last_delivery_attempt"]) : nil @@ -172,14 +172,14 @@ def loads end # - #  Return all activity entries + # Return all activity entries # def activity_entries @activity_entries ||= (deliveries + clicks + loads).sort_by(&:timestamp) end # - #  Provide access to set and get acceptable attributes + # Provide access to set and get acceptable attributes # def method_missing(name, value = nil, &block) if @attributes.key?(name.to_s) @@ -202,7 +202,7 @@ def persisted? end # - #  Save this message + # Save this message # def save(queue_on_create: true) save_raw_message @@ -223,7 +223,7 @@ def update(attributes_to_change) end # - #  Delete the message from the database + # Delete the message from the database # def delete return unless persisted? @@ -232,7 +232,7 @@ def delete end # - #  Return the headers + # Return the headers # def raw_headers if raw_table @@ -243,7 +243,7 @@ def raw_headers end # - #  Return the full raw message body for this message. + # Return the full raw message body for this message. # def raw_body if raw_table @@ -303,7 +303,7 @@ def plain_body end # - #  Return the HTML body for this message + # Return the HTML body for this message # def html_body mail&.html_body @@ -484,7 +484,7 @@ def create_load(request) end # - #  Create a new link + # Create a new link # def create_link(url) hash = Digest::SHA1.hexdigest(url.to_s) @@ -494,7 +494,7 @@ def create_link(url) end # - #  Return a message object that this message is a reply to + # Return a message object that this message is a reply to # def original_messages return nil unless bounce @@ -531,7 +531,7 @@ def inspect_message end # - #  Return all spam checks for this message + # Return all spam checks for this message # def spam_checks @spam_checks ||= database.select(:spam_checks, where: { message_id: id }) @@ -552,7 +552,7 @@ def cancel_hold def parse_content parse_result = Postal::MessageParser.new(self) if parse_result.actioned? - #  Somethign was changed, update the raw message + # Somethign was changed, update the raw message @database.update(raw_table, { data: parse_result.new_body }, where: { id: raw_body_id }) @raw = parse_result.new_body @raw_message = nil diff --git a/lib/postal/message_db/provisioner.rb b/lib/postal/message_db/provisioner.rb index aa64d3f39..dca20547f 100644 --- a/lib/postal/message_db/provisioner.rb +++ b/lib/postal/message_db/provisioner.rb @@ -127,7 +127,7 @@ def remove_raw_table(table) end # - #  Remove messages from the messages table that are too old to retain + # Remove messages from the messages table that are too old to retain # def remove_messages(max_age = 60) time = (Time.now.utc.to_date - max_age.days).to_time.end_of_day