Skip to content

Commit

Permalink
small rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibalosh committed Jul 9, 2018
1 parent 565d244 commit e7fd977
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/mailhandler/receiving/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def verify_and_set_search_options(options)
def validate_option_values(options)
if options[:since]

raise MailHandler::Error, "Incorrect option options[:since]=#{options[:since]}." unless options[:since].is_a? Time
raise MailHandler::Error, "Incorrect option options[:since]=#{options[:since]}." unless options[:since].is_a?(Time)

end

Expand Down
2 changes: 1 addition & 1 deletion lib/mailhandler/receiving/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def find_emails(options)

def imap_search(retry_count, options)
result = mailer.find_emails(what: :last, count: search_options[:count], order: :desc, keys: imap_filter_keys(options), delete_after_find: options[:archive])
result.is_a? Array ? result : [result]
result.is_a?(Array)? result : [result]

# Silently ignore IMAP search errors, [RETRY_ON_ERROR_COUNT] times
rescue Net::IMAP::ResponseError, EOFError, NoMethodError => e
Expand Down
2 changes: 1 addition & 1 deletion lib/mailhandler/sending/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def send(_email)
protected

def verify_email(email)
raise MailHandler::TypeError, "Invalid type error, only #{allowed_email_type} object type for sending allowed." unless email.is_a? allowed_email_type
raise MailHandler::TypeError, "Invalid type error, only #{allowed_email_type} object type for sending allowed." unless email.is_a?(allowed_email_type)
end

private
Expand Down
2 changes: 1 addition & 1 deletion lib/mailhandler/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MailHandler
VERSION = '1.0.37'.freeze
VERSION = '1.0.38'.freeze
end

0 comments on commit e7fd977

Please sign in to comment.