imap-backup 9.0.1.rc1 → 9.0.2

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: b3265f2db3d9cf928f1f89f0bc3ed7ef9b97f81ece419c17b2000433889a558f
4
- data.tar.gz: '0886830e13d3ad8cf02e2ca152733d14031444a2d17eb0b43dc1121cfb822280'
3
+ metadata.gz: b2482ddc0519b2eb1b1160cee2aae34befdb8faa4acf9de2127be214bac3907f
4
+ data.tar.gz: 2ed7b7b25497ee53cdfd1735628401076defaee63829aa9bfabd5fc483e69a28
5
5
  SHA512:
6
- metadata.gz: b790f8f237496fc0c10d4a50293d628931020e96da738ad2588b014138efdda25ea172a976e92a1b142ed316072cd46341369206604b9e6a5a2ed5b40b5459ac
7
- data.tar.gz: 60551fd6309b09bc4efb4f5537f5e1c1ec5c7439d17fec8c1657e7a17b31620eabe8e1e0c049de3a430d4706e4334c9954c13ce329fcc32f6c80889b7467c25f
6
+ metadata.gz: a7a6790a9354d9c06eedb72b2a6bf1960ed691a53c95b4a11c0ce50359ca397e0929240b2eafc93365610f43588c190515367462c4cde3ccf58242d5afd31622
7
+ data.tar.gz: 6270491bbc12302365de92b666b438b3638baa67d162f01e0b825deef73544f349919b779d6f4ea3db4dc3e570b3d27ede88e108667745b811596c9214fd205f
data/docs/development.md CHANGED
@@ -64,7 +64,7 @@ fetch_data_items = imap.uid_fetch(uids, ["BODY[]"])
64
64
  # Older Ruby Versions
65
65
 
66
66
  Dockerfiles are available for all the supported Ruby versions,
67
- see the `docker` directory.
67
+ see the `container` directory.
68
68
 
69
69
  # Contributing
70
70
 
@@ -14,24 +14,24 @@ module Imap::Backup
14
14
  def run
15
15
  all_names = Account::Connection::FolderNames.new(client: client, account: account).run
16
16
 
17
- names =
18
- if account.folders&.any?
17
+ configured =
18
+ case
19
+ when account.folders&.any?
19
20
  account.folders.map { |af| af[:name] }
21
+ when account.folder_blacklist
22
+ []
20
23
  else
21
24
  all_names
22
25
  end
23
26
 
24
- all_names.map do |name|
25
- backup =
26
- if account.folder_blacklist
27
- !names.include?(name)
28
- else
29
- names.include?(name)
30
- end
31
- next if !backup
27
+ names =
28
+ if account.folder_blacklist
29
+ all_names - configured
30
+ else
31
+ all_names & configured
32
+ end
32
33
 
33
- Account::Folder.new(account.connection, name)
34
- end.compact
34
+ names.map { |name| Account::Folder.new(account.connection, name) }
35
35
  end
36
36
  end
37
37
  end
@@ -33,14 +33,24 @@ module Imap::Backup
33
33
  end
34
34
 
35
35
  def source_uid(destination_uid)
36
+ if destination_store == {}
37
+ raise "Assign UID validities with #reset before calling #source_uid"
38
+ end
39
+
36
40
  map.key(destination_uid)
37
41
  end
38
42
 
39
43
  def destination_uid(source_uid)
44
+ if destination_store == {}
45
+ raise "Assign UID validities with #reset before calling #destination_uid"
46
+ end
47
+
40
48
  map[source_uid]
41
49
  end
42
50
 
43
51
  def map_uids(source:, destination:)
52
+ raise "Assign UID validities with #reset before calling #map_uids" if destination_store == {}
53
+
44
54
  map[source] = destination
45
55
  end
46
56
 
@@ -3,7 +3,7 @@ module Imap; end
3
3
  module Imap::Backup
4
4
  MAJOR = 9
5
5
  MINOR = 0
6
- REVISION = 1
7
- PRE = "rc1".freeze
6
+ REVISION = 2
7
+ PRE = nil
8
8
  VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
9
9
  end
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: 9.0.1.rc1
4
+ version: 9.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Yates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-29 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -301,9 +301,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
301
301
  version: '2.6'
302
302
  required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  requirements:
304
- - - ">"
304
+ - - ">="
305
305
  - !ruby/object:Gem::Version
306
- version: 1.3.1
306
+ version: '0'
307
307
  requirements: []
308
308
  rubygems_version: 3.3.7
309
309
  signing_key: