mailhandler 1.0.37 → 1.0.38
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa5320fb5d5625deccf6cdcf0376f5b7e2ec5adb
|
4
|
+
data.tar.gz: 46b58bc289f75deda7e8deb31e1baa9770fa4807
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b8b6c4594b2a8c797e70d647a92e34f18d261a1b6e35904d8058506d296300664f506e16bd40bf0f36e8923f3ab7af1bac9416b90a83120d7fff23593c3e47d
|
7
|
+
data.tar.gz: 63e2a18ba075c7203d8b92371646f67d14e67b53fcb2fccb35c07852dc6602f92b7abf6c84798ab20cd6b6ce3bb99b3f462e9661dcfd394c10b53bc842ef58f2
|
@@ -61,7 +61,7 @@ module MailHandler
|
|
61
61
|
def validate_option_values(options)
|
62
62
|
if options[:since]
|
63
63
|
|
64
|
-
raise MailHandler::Error, "Incorrect option options[:since]=#{options[:since]}." unless options[:since].is_a?
|
64
|
+
raise MailHandler::Error, "Incorrect option options[:since]=#{options[:since]}." unless options[:since].is_a?(Time)
|
65
65
|
|
66
66
|
end
|
67
67
|
|
@@ -115,7 +115,7 @@ module MailHandler
|
|
115
115
|
|
116
116
|
def imap_search(retry_count, options)
|
117
117
|
result = mailer.find_emails(what: :last, count: search_options[:count], order: :desc, keys: imap_filter_keys(options), delete_after_find: options[:archive])
|
118
|
-
result.is_a?
|
118
|
+
result.is_a?(Array)? result : [result]
|
119
119
|
|
120
120
|
# Silently ignore IMAP search errors, [RETRY_ON_ERROR_COUNT] times
|
121
121
|
rescue Net::IMAP::ResponseError, EOFError, NoMethodError => e
|
@@ -12,7 +12,7 @@ module MailHandler
|
|
12
12
|
protected
|
13
13
|
|
14
14
|
def verify_email(email)
|
15
|
-
raise MailHandler::TypeError, "Invalid type error, only #{allowed_email_type} object type for sending allowed." unless email.is_a?
|
15
|
+
raise MailHandler::TypeError, "Invalid type error, only #{allowed_email_type} object type for sending allowed." unless email.is_a?(allowed_email_type)
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
data/lib/mailhandler/version.rb
CHANGED