imap-backup 9.0.0 → 9.0.1.rc1
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/cli.rb +1 -8
- data/lib/imap/backup/migrator.rb +1 -21
- data/lib/imap/backup/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3265f2db3d9cf928f1f89f0bc3ed7ef9b97f81ece419c17b2000433889a558f
|
4
|
+
data.tar.gz: '0886830e13d3ad8cf02e2ca152733d14031444a2d17eb0b43dc1121cfb822280'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b790f8f237496fc0c10d4a50293d628931020e96da738ad2588b014138efdda25ea172a976e92a1b142ed316072cd46341369206604b9e6a5a2ed5b40b5459ac
|
7
|
+
data.tar.gz: 60551fd6309b09bc4efb4f5537f5e1c1ec5c7439d17fec8c1657e7a17b31620eabe8e1e0c049de3a430d4706e4334c9954c13ce329fcc32f6c80889b7467c25f
|
data/lib/imap/backup/cli.rb
CHANGED
@@ -75,14 +75,7 @@ module Imap::Backup
|
|
75
75
|
When one or other account uses a delimiter other than `/` (i.e. `.`),
|
76
76
|
use the `--source-delimiter=` and/or `--destination-delimiter=` options.
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
Before migrating each folder, `imap-backup` checks if the destination
|
81
|
-
folder is empty.
|
82
|
-
|
83
|
-
If it finds a non-empty destination folder, it halts with an error.
|
84
|
-
|
85
|
-
If you are sure that these destination emails can be deleted,
|
78
|
+
If you you want to delete existing emails in destination folders,
|
86
79
|
use the `--reset` option. In this case, all existing emails are
|
87
80
|
deleted before uploading the migrated emails.
|
88
81
|
DESC
|
data/lib/imap/backup/migrator.rb
CHANGED
@@ -13,7 +13,7 @@ module Imap::Backup
|
|
13
13
|
def run
|
14
14
|
count = serializer.uids.count
|
15
15
|
folder.create
|
16
|
-
|
16
|
+
folder.clear if reset
|
17
17
|
|
18
18
|
Logger.logger.debug "[#{folder.name}] #{count} to migrate"
|
19
19
|
serializer.each_message(serializer.uids).with_index do |message, i|
|
@@ -31,25 +31,5 @@ module Imap::Backup
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def ensure_destination_empty!
|
38
|
-
if reset
|
39
|
-
folder.clear
|
40
|
-
else
|
41
|
-
fail_if_destination_not_empty!
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def fail_if_destination_not_empty!
|
46
|
-
return if folder.uids.empty?
|
47
|
-
|
48
|
-
raise <<~ERROR
|
49
|
-
The destination folder '#{folder.name}' is not empty.
|
50
|
-
Pass the --reset flag if you want to clear existing emails from destination
|
51
|
-
folders before uploading.
|
52
|
-
ERROR
|
53
|
-
end
|
54
34
|
end
|
55
35
|
end
|
data/lib/imap/backup/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imap-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.1.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Yates
|
@@ -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:
|
306
|
+
version: 1.3.1
|
307
307
|
requirements: []
|
308
308
|
rubygems_version: 3.3.7
|
309
309
|
signing_key:
|