style(rubocop): Style/FrozenStringLiteralComment

This commit is contained in:
Adam Cooke
2024-02-10 17:18:22 +00:00
parent ba5bfbd6a0
commit 6ab36c09c9
217 changed files with 220 additions and 3 deletions
+1
View File
@@ -1,2 +1,3 @@
# frozen_string_literal: true
module Postal
end
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "logger"
module Postal
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class BounceMessage
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "erb"
require "yaml"
require "pathname"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module Countries
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class DKIMHeader
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module Errors
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module Helpers
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "net/https"
require "uri"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class HTTPSender < Sender
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "nifty/utils/random_string"
module Postal
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
end
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Click
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class ConnectionPool
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Database
@@ -144,7 +145,7 @@ module Postal
# :count => Return a count of the results instead of the actual data
#
def select(table, options = {})
sql_query = "SELECT"
sql_query = String.new("SELECT")
if options[:count]
sql_query << " COUNT(id) AS count"
elsif options[:fields]
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Delivery
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class LiveStats
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Load
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Message
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Migration
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
module Migrations
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Provisioner
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Statistics
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class SuppressionList
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageDB
class Webhooks
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class MessageInspection
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class MessageInspector
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageInspectors
end
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageInspectors
class Clamav < MessageInspector
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "net/http"
module Postal
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module MessageInspectors
class SpamAssassin < MessageInspector
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class MessageParser
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class MessageRequeuer
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class MXLookup
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class QueryString
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "postal/config"
require "bunny"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class ReceivedHeader
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class ReplySeparator
@@ -19,7 +20,7 @@ module Postal
return "" unless text.is_a?(String)
text = text.gsub("\r", "")
stripped = ""
stripped = String.new
RULES.each do |rule|
text.gsub!(rule) do
stripped = ::Regexp.last_match(0).to_s + "\n" + stripped
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module RspecHelpers
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class SendResult
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class Sender
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "resolv"
module Postal
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
module SMTPServer
end
+2 -1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "resolv"
require "nifty/utils/random_string"
@@ -360,7 +361,7 @@ module Postal
return "503 HELO/EHLO, MAIL FROM and RCPT TO before sending data"
end
@data = "".force_encoding("BINARY")
@data = String.new.force_encoding("BINARY")
@headers = {}
@receiving_headers = true
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "ipaddr"
require "nio"
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class SpamCheck
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class TrackingMiddleware
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
require "highline"
module Postal
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
VERSION_PATH = File.expand_path("../../VERSION", __dir__)
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
module Postal
class Worker
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
# NOTE: only doing this in development as some production environments (Heroku)
# NOTE: are sensitive to local FS writes, and besides -- it's just not proper
# NOTE: to have a dev-mode tool do its thing in production.
+1
View File
@@ -1,3 +1,4 @@
# frozen_string_literal: true
namespace :postal do
desc "Start the cron worker"
task cron: :environment do