imap-backup 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/imap/backup/account/folder.rb +10 -0
- data/lib/imap/backup/version.rb +1 -1
- data/spec/unit/imap/backup/account/folder_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8906735c8b5c51afa006d3ee2148b117bce3e0a5b094c2b88d7cdbef171d7fde
|
4
|
+
data.tar.gz: '0619af030f4254e7e25c6d4eeebfd22e0b4cf0bd40d4bee0dba804c2b43d9caf'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ba2f2a24977da26b3bfe77c5840f7d6c9ff8f564956b8fe4ee430dca78ac4b03c15961c3ec152d359656ccfcc709e9a5ebc499504ce6e0678d841379b682cd
|
7
|
+
data.tar.gz: 6b7bc88c99139bd54b0c4c05ece78c8cb5e79fedeee89577037e76e84d7a4134312335543dd68d0f177e39e431314ff53e343dc3781305d7f02dc4f6d733c5d9
|
@@ -52,6 +52,16 @@ module Imap::Backup
|
|
52
52
|
imap.uid_search(["ALL"]).sort
|
53
53
|
rescue FolderNotFound
|
54
54
|
[]
|
55
|
+
rescue NoMethodError
|
56
|
+
message = <<~MESSAGE
|
57
|
+
Folder '#{name}' caused NoMethodError
|
58
|
+
probably
|
59
|
+
`undefined method `[]' for nil:NilClass (NoMethodError)`
|
60
|
+
in `search_internal` in stdlib net/imap.rb.
|
61
|
+
This is caused by `@responses["SEARCH"] being unset/undefined
|
62
|
+
MESSAGE
|
63
|
+
Imap::Backup.logger.warn message
|
64
|
+
[]
|
55
65
|
end
|
56
66
|
|
57
67
|
def fetch(uid)
|
data/lib/imap/backup/version.rb
CHANGED
@@ -43,6 +43,20 @@ describe Imap::Backup::Account::Folder do
|
|
43
43
|
expect(subject.uids).to eq([])
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
context "with no SEARCH response in Net::IMAP" do
|
48
|
+
let(:no_method_error) do
|
49
|
+
NoMethodError.new("Somethimes SEARCH responses come out undefined")
|
50
|
+
end
|
51
|
+
|
52
|
+
before do
|
53
|
+
allow(imap).to receive(:examine).and_raise(no_method_error)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "returns an empty array" do
|
57
|
+
expect(subject.uids).to eq([])
|
58
|
+
end
|
59
|
+
end
|
46
60
|
end
|
47
61
|
|
48
62
|
describe "#fetch" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imap-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Yates
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|