مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
style(rubocop): Style/StringLiterals
هذا الالتزام موجود في:
6
Gemfile
6
Gemfile
@@ -17,7 +17,7 @@ gem "gelf"
|
||||
gem "haml"
|
||||
gem "hashie"
|
||||
gem "highline", require: false
|
||||
gem "execjs", '~> 2.7', "< 2.8"
|
||||
gem "execjs", "~> 2.7", "< 2.8"
|
||||
gem "jwt"
|
||||
gem "kaminari"
|
||||
gem "mail"
|
||||
@@ -30,8 +30,8 @@ gem "puma"
|
||||
gem "rails", "= 6.1.7.6"
|
||||
gem "resolv", "~> 0.2.1"
|
||||
gem "secure_headers"
|
||||
gem 'sentry-rails'
|
||||
gem 'sentry-ruby'
|
||||
gem "sentry-rails"
|
||||
gem "sentry-ruby"
|
||||
gem "turbolinks", "~> 5"
|
||||
|
||||
group :development, :assets do
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
Rails.autoloaders.each do |autoloader|
|
||||
# Ignore the message DB migrations directory as it doesn't follow
|
||||
# Zeitwerk's conventions and is always loaded and executed in order.
|
||||
autoloader.ignore(Rails.root.join('lib/postal/message_db/migrations'))
|
||||
autoloader.ignore(Rails.root.join("lib/postal/message_db/migrations"))
|
||||
end
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# This script will automatically send an HTML email to the
|
||||
# SMTP server given.
|
||||
|
||||
require 'mail'
|
||||
require 'net/smtp'
|
||||
require "mail"
|
||||
require "net/smtp"
|
||||
|
||||
from = ARGV[0]
|
||||
to = ARGV[1]
|
||||
@@ -19,7 +19,7 @@ mail = Mail.new
|
||||
mail.to = to
|
||||
mail.from = from
|
||||
mail.subject = "A test email from #{Time.now.to_s}"
|
||||
mail['X-Postal-Tag'] = 'send-html-email-script'
|
||||
mail["X-Postal-Tag"] = "send-html-email-script"
|
||||
mail.text_part = Mail::Part.new do
|
||||
body <<~BODY
|
||||
Hello there.
|
||||
@@ -32,7 +32,7 @@ mail.text_part = Mail::Part.new do
|
||||
BODY
|
||||
end
|
||||
mail.html_part = Mail::Part.new do
|
||||
content_type 'text/html; charset=UTF-8'
|
||||
content_type "text/html; charset=UTF-8"
|
||||
body <<~BODY
|
||||
<p>Hello there</p>
|
||||
<p>This is an example email. It doesn't do all that much.</p>
|
||||
@@ -43,7 +43,7 @@ end
|
||||
|
||||
#puts mail.to_s
|
||||
|
||||
Net::SMTP.start('127.0.0.1', 2525) do |smtp|
|
||||
Net::SMTP.start("127.0.0.1", 2525) do |smtp|
|
||||
smtp.send_message mail.to_s, mail.from.first, mail.to.first
|
||||
end
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ describe Postal::MessageDB::ConnectionPool do
|
||||
|
||||
subject(:pool) { described_class.new }
|
||||
|
||||
describe '#use' do
|
||||
it 'yields a connection' do
|
||||
describe "#use" do
|
||||
it "yields a connection" do
|
||||
counter = 0
|
||||
pool.use do |connection|
|
||||
expect(connection).to be_a Mysql2::Client
|
||||
@@ -16,7 +16,7 @@ describe Postal::MessageDB::ConnectionPool do
|
||||
expect(counter).to eq 1
|
||||
end
|
||||
|
||||
it 'checks in a connection after the block has executed' do
|
||||
it "checks in a connection after the block has executed" do
|
||||
connection = nil
|
||||
pool.use do |c|
|
||||
expect(pool.connections).to be_empty
|
||||
@@ -25,7 +25,7 @@ describe Postal::MessageDB::ConnectionPool do
|
||||
expect(pool.connections).to eq [connection]
|
||||
end
|
||||
|
||||
it 'checks in a connection if theres an error in the block' do
|
||||
it "checks in a connection if theres an error in the block" do
|
||||
expect do
|
||||
pool.use do |c|
|
||||
raise StandardError
|
||||
@@ -34,7 +34,7 @@ describe Postal::MessageDB::ConnectionPool do
|
||||
expect(pool.connections).to match [kind_of(Mysql2::Client)]
|
||||
end
|
||||
|
||||
it 'does not check in connections when there is a connection error' do
|
||||
it "does not check in connections when there is a connection error" do
|
||||
expect do
|
||||
pool.use do
|
||||
raise Mysql2::Error, "lost connection to server"
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم