Skip to content

Commit

Permalink
style(rubocop): Style/StringLiterals
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 10, 2024
1 parent 0e4ed5c commit b4cc812
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/zeitwerk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions script/send-html-email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -19,7 +19,7 @@
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.
Expand All @@ -32,7 +32,7 @@
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>
Expand All @@ -43,7 +43,7 @@

#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

Expand Down
10 changes: 5 additions & 5 deletions spec/lib/postal/message_db/connection_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

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
Expand All @@ -16,7 +16,7 @@
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
Expand All @@ -25,7 +25,7 @@
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
Expand All @@ -34,7 +34,7 @@
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"
Expand Down

0 comments on commit b4cc812

Please sign in to comment.