imap-backup 9.0.0.rc1 → 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: 3a95742a7ae3b07a12f7cb95d50bcea360530ee351edbca8d9b93e5c4579090a
4
- data.tar.gz: 9d7d43ba0f44f13a19272214dfe8ca265c72f7d1173ccf67c4d4a873de007a81
3
+ metadata.gz: b3265f2db3d9cf928f1f89f0bc3ed7ef9b97f81ece419c17b2000433889a558f
4
+ data.tar.gz: '0886830e13d3ad8cf02e2ca152733d14031444a2d17eb0b43dc1121cfb822280'
5
5
  SHA512:
6
- metadata.gz: 155eeb475d56b03bc8012fc8b9b2882fbd8bcaad4366ee2119952f710de79d94a6709c81185ccc49b4f20f6d333523272de4cfa3742c1ff05f797830d1cb916e
7
- data.tar.gz: dc6c0ce95c22c81512eb71791f6a75ecc8fe35f011e48fd0d68266771fac96f234664f22316fd1e98fbfc93397713f60375555442577dc0977eedcabfc2cf1ea
6
+ metadata.gz: b790f8f237496fc0c10d4a50293d628931020e96da738ad2588b014138efdda25ea172a976e92a1b142ed316072cd46341369206604b9e6a5a2ed5b40b5459ac
7
+ data.tar.gz: 60551fd6309b09bc4efb4f5537f5e1c1ec5c7439d17fec8c1657e7a17b31620eabe8e1e0c049de3a430d4706e4334c9954c13ce329fcc32f6c80889b7467c25f
data/docs/development.md CHANGED
@@ -4,6 +4,11 @@
4
4
  * Restartable - calculate start point based on already downloaded messages
5
5
  * Standalone - do not rely on an email client or MTA
6
6
 
7
+ # Development
8
+
9
+ A setup for developing under any available Ruby version is
10
+ available in the container directory.
11
+
7
12
  # Testing
8
13
 
9
14
  ## Feature Specs
@@ -56,6 +61,11 @@ uids = imap.uid_search(["ALL"]).sort
56
61
  fetch_data_items = imap.uid_fetch(uids, ["BODY[]"])
57
62
  ```
58
63
 
64
+ # Older Ruby Versions
65
+
66
+ Dockerfiles are available for all the supported Ruby versions,
67
+ see the `docker` directory.
68
+
59
69
  # Contributing
60
70
 
61
71
  1. Fork it
@@ -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
6
+ REVISION = 1
7
7
  PRE = "rc1".freeze
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.0.rc1
4
+ version: 9.0.1.rc1
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-22 00:00:00.000000000 Z
11
+ date: 2022-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline