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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3daac577a7328b73a4593e677826b2f168f7565487595a04b37504b863dccd46
4
- data.tar.gz: 3290089c8c67f31d7dc7cfc53ca6c6d2dd20328727447b2164273409408d36d5
3
+ metadata.gz: b3265f2db3d9cf928f1f89f0bc3ed7ef9b97f81ece419c17b2000433889a558f
4
+ data.tar.gz: '0886830e13d3ad8cf02e2ca152733d14031444a2d17eb0b43dc1121cfb822280'
5
5
  SHA512:
6
- metadata.gz: df10381df343a5c4c08d8fa39310a6593b6383608926d360202feb92652bc2ad42bbeffc306789e6f4761bc06405cb2b8d51efe76e65cfc5a9507d397d36e2ae
7
- data.tar.gz: 05a4d8b9941622fc56f68e952f71b38383a9593fe6abedb64d6c4b1a5670eee0ca2c40a27cc14a7d05d298638e3c242f056b3a8b68288a61dafae8449f51e36b
6
+ metadata.gz: b790f8f237496fc0c10d4a50293d628931020e96da738ad2588b014138efdda25ea172a976e92a1b142ed316072cd46341369206604b9e6a5a2ed5b40b5459ac
7
+ data.tar.gz: 60551fd6309b09bc4efb4f5537f5e1c1ec5c7439d17fec8c1657e7a17b31620eabe8e1e0c049de3a430d4706e4334c9954c13ce329fcc32f6c80889b7467c25f
@@ -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
- Usually, you should migrate to an account with empty folders.
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
@@ -13,7 +13,7 @@ module Imap::Backup
13
13
  def run
14
14
  count = serializer.uids.count
15
15
  folder.create
16
- ensure_destination_empty!
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
@@ -3,7 +3,7 @@ module Imap; end
3
3
  module Imap::Backup
4
4
  MAJOR = 9
5
5
  MINOR = 0
6
- REVISION = 0
7
- PRE = nil
6
+ REVISION = 1
7
+ PRE = "rc1".freeze
8
8
  VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
9
9
  end
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.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: '0'
306
+ version: 1.3.1
307
307
  requirements: []
308
308
  rubygems_version: 3.3.7
309
309
  signing_key: