imap-backup 9.3.1 → 9.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/development.md +6 -0
- data/lib/imap/backup/cli.rb +13 -0
- data/lib/imap/backup/serializer.rb +8 -2
- data/lib/imap/backup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35c15f0cf7b9909868b55bb5c9ec928cb5c22e6943a9856fbf52b1bd9fb0212b
|
4
|
+
data.tar.gz: d4cfaf196b031f91c0e745a55def95cdc480906c7b387a888949c80bc607867f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bca6edbdf041a3795d9f97ba1df9f63feaeee7d024df73da389990cc2a235b73a0379096261b1c515344746cb256380f79c7b2a99abdd78b2a279049b6184bbf
|
7
|
+
data.tar.gz: 966e04781677d2f281810a2160a5f56dfea17dd69c7694948cf8a36e96616685708d5c599e8bb661f7441fbdf7a0accc66fbcbb9d278bbe375c685af62e8a0b7
|
data/docs/development.md
CHANGED
data/lib/imap/backup/cli.rb
CHANGED
@@ -20,9 +20,17 @@ module Imap::Backup
|
|
20
20
|
|
21
21
|
include Helpers
|
22
22
|
|
23
|
+
VERSION_ARGUMENTS = %w(-v --version).freeze
|
24
|
+
|
23
25
|
default_task :backup
|
24
26
|
|
25
27
|
def self.start(*args)
|
28
|
+
version_argument = ARGV & VERSION_ARGUMENTS
|
29
|
+
if version_argument.any?
|
30
|
+
new.version
|
31
|
+
exit 0
|
32
|
+
end
|
33
|
+
|
26
34
|
# By default, commands like `imap-backup help foo bar`
|
27
35
|
# are handled by listing all `foo` methods, whereas the user
|
28
36
|
# probably wants the detailed help for the `bar` method.
|
@@ -227,5 +235,10 @@ module Imap::Backup
|
|
227
235
|
|
228
236
|
desc "utils SUBCOMMAND [OPTIONS]", "Various utilities"
|
229
237
|
subcommand "utils", Utils
|
238
|
+
|
239
|
+
desc "version", "Print the imap-backup version"
|
240
|
+
def version
|
241
|
+
Kernel.puts "imap-backup #{Imap::Backup::VERSION}"
|
242
|
+
end
|
230
243
|
end
|
231
244
|
end
|
@@ -30,14 +30,20 @@ module Imap::Backup
|
|
30
30
|
def initialize(path, folder)
|
31
31
|
@path = path
|
32
32
|
@folder = folder
|
33
|
+
@validated = nil
|
33
34
|
end
|
34
35
|
|
35
36
|
# Returns true if there are existing, valid files
|
36
37
|
# false otherwise (in which case any existing files are deleted)
|
37
38
|
def validate!
|
39
|
+
return if @validated
|
40
|
+
|
38
41
|
optionally_migrate2to3
|
39
42
|
|
40
|
-
|
43
|
+
if imap.valid? && mbox.valid?
|
44
|
+
@validated = true
|
45
|
+
return true
|
46
|
+
end
|
41
47
|
|
42
48
|
delete
|
43
49
|
|
@@ -113,7 +119,7 @@ module Imap::Backup
|
|
113
119
|
# NOOP
|
114
120
|
nil
|
115
121
|
else
|
116
|
-
apply_new_uid_validity
|
122
|
+
apply_new_uid_validity(value)
|
117
123
|
end
|
118
124
|
end
|
119
125
|
|
data/lib/imap/backup/version.rb
CHANGED
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.3.
|
4
|
+
version: 9.3.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: 2023-
|
11
|
+
date: 2023-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|