Skip to content

Commit

Permalink
DEV: fix rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tyb-talks committed Jul 18, 2024
1 parent e2bc86c commit 22a2078
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion discourse_mail_receiver.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
$LOAD_PATH.unshift(lib) if !$LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = 'discourse_mail_receiver'
Expand Down
1 change: 0 additions & 1 deletion lib/mail_receiver/fast_rejection.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# frozen_string_literal: true
require 'set'
require 'syslog'
require 'json'
require 'uri'
Expand Down
2 changes: 1 addition & 1 deletion lib/mail_receiver/mail_receiver_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ReceiverException < StandardError; end
attr_reader :env

def initialize(env_file)
unless File.exists?(env_file)
unless File.exist?(env_file)
fatal "Config file %s does not exist. Aborting.", env_file
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
expect(receiver.endpoint).to eq('https://localhost:8080/admin/email/smtp_should_reject.json')
end

context "process_single_request" do
describe "#process_single_request" do
let(:receiver) { described_class.new(file_for(:standard)) }

it "returns defer_if_permit if not smtpd_access_policy" do
Expand Down Expand Up @@ -145,5 +145,4 @@
expect(response).to eq("reject because I said so")
end
end

end
2 changes: 2 additions & 0 deletions spec/lib/mail_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true
require_relative '../../lib/mail_receiver/mail'

# rubocop:disable RSpec/DescribeClass
# mail.rb is not implemented as a class or module
RSpec.describe 'domain_from_addrspec' do

it "normalises domains to lowercase" do
Expand Down

0 comments on commit 22a2078

Please sign in to comment.