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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 119c39db4e00d91f68a482035050ec8c91606a120cc80f1c514f39d731a30e02
4
- data.tar.gz: 451761b7d17bcc664ff6890e6c86bd33628929bfdf665a91b322bcfd92c7d7f3
3
+ metadata.gz: 8906735c8b5c51afa006d3ee2148b117bce3e0a5b094c2b88d7cdbef171d7fde
4
+ data.tar.gz: '0619af030f4254e7e25c6d4eeebfd22e0b4cf0bd40d4bee0dba804c2b43d9caf'
5
5
  SHA512:
6
- metadata.gz: 3021adbfe55940b7f0a5d306259c2ba755277105d0139e6b51c18a425cbbf49737bde1fc38c6db00f51e272b71790c2c037838fcfffac7197fd35f429636d4d6
7
- data.tar.gz: 6ef608f3bc7655886b6926c746768741ca70fb3b604834fb3750dbb393ae4551c077fa30f47ee8edae24a4684853093697988e1b23f3f50c505e635496d792a8
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)
@@ -3,6 +3,6 @@ module Imap; end
3
3
  module Imap::Backup
4
4
  MAJOR = 2
5
5
  MINOR = 2
6
- REVISION = 0
6
+ REVISION = 1
7
7
  VERSION = [MAJOR, MINOR, REVISION].compact.map(&:to_s).join(".")
8
8
  end
@@ -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.0
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-09-02 00:00:00.000000000 Z
11
+ date: 2019-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline