imap-backup 4.0.0.rc2 → 4.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/imap/backup/cli.rb +75 -73
- 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: 956fde3bc96dc3acd872d51905a88fa9478d9b5cd7022cf55f8e73db769d8ef7
|
4
|
+
data.tar.gz: 28d653dc4e1cfebaed0a730c0231ec13a3c3c04e1a8514352183b11f152db065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75643fb06176ab9017d0a7673bb428df4907e1350075cf4e3429702b42f03f8a6ef8a2be1095af3b6f4032ebd682d165e05d94b2e3930397ecb31ad95b2be665
|
7
|
+
data.tar.gz: e703041a7ed4e38ced9ef1b762fb3f2ebaf178cd7beb88a204624f6dd7fc53c8f9b9635942018c0f02abfa664db90e52c17eccf3278251e23395072153fe99da
|
data/lib/imap/backup/cli.rb
CHANGED
@@ -1,87 +1,89 @@
|
|
1
1
|
require "thor"
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
module Imap::Backup
|
4
|
+
class CLI < Thor
|
5
|
+
require "imap/backup/cli/helpers"
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
autoload :Backup, "imap/backup/cli/backup"
|
8
|
+
autoload :Folders, "imap/backup/cli/folders"
|
9
|
+
autoload :Local, "imap/backup/cli/local"
|
10
|
+
autoload :Remote, "imap/backup/cli/remote"
|
11
|
+
autoload :Restore, "imap/backup/cli/restore"
|
12
|
+
autoload :Setup, "imap/backup/cli/setup"
|
13
|
+
autoload :Status, "imap/backup/cli/status"
|
13
14
|
|
14
|
-
|
15
|
+
include Helpers
|
15
16
|
|
16
|
-
|
17
|
+
default_task :backup
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
def self.exit_on_failure?
|
20
|
+
true
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
def self.accounts_option
|
24
|
+
method_option(
|
25
|
+
"accounts",
|
26
|
+
type: :string,
|
27
|
+
banner: "a comma-separated list of accounts (defaults to all configured accounts)",
|
28
|
+
aliases: ["-a"]
|
29
|
+
)
|
30
|
+
end
|
30
31
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
32
|
+
desc "backup [OPTIONS]", "Run the backup"
|
33
|
+
long_desc <<~DESC
|
34
|
+
Downloads any emails not yet present locally.
|
35
|
+
Runs the backup for each configured account,
|
36
|
+
or for those requested via the --accounts option.
|
37
|
+
By default all folders, are backed up.
|
38
|
+
The setup tool can be used to choose a specific list of folders to back up.
|
39
|
+
DESC
|
40
|
+
accounts_option
|
41
|
+
def backup
|
42
|
+
Backup.new(symbolized(options)).run
|
43
|
+
end
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
desc "folders [OPTIONS]", "This command is deprecated, use `imap-backup remote folders ACCOUNT`"
|
46
|
+
long_desc <<~DESC
|
47
|
+
Lists all folders of all configured accounts.
|
48
|
+
This command is deprecated.
|
49
|
+
Instead, use a combination of `imap-backup local accounts` to get the list of accounts,
|
50
|
+
and `imap-backup remote folders ACCOUNT` to get the folder list.
|
51
|
+
DESC
|
52
|
+
accounts_option
|
53
|
+
def folders
|
54
|
+
Folders.new(symbolized(options)).run
|
55
|
+
end
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
57
|
+
desc "restore [OPTIONS]", "This command is deprecated, use `imap-backup restore ACCOUNT`"
|
58
|
+
long_desc <<~DESC
|
59
|
+
By default, restores all local emails to their respective servers.
|
60
|
+
This command is deprecated.
|
61
|
+
Instead, use `imap-backup restore ACCOUNT` to restore a single account.
|
62
|
+
DESC
|
63
|
+
accounts_option
|
64
|
+
def restore
|
65
|
+
Restore.new(symbolized(options)).run
|
66
|
+
end
|
66
67
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
68
|
+
desc "setup", "Configure imap-backup"
|
69
|
+
long_desc <<~DESC
|
70
|
+
A menu-driven command-line application used to configure imap-backup.
|
71
|
+
Configure email accounts to back up.
|
72
|
+
DESC
|
73
|
+
def setup
|
74
|
+
Setup.new().run
|
75
|
+
end
|
75
76
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
77
|
+
desc "status", "Show backup status"
|
78
|
+
long_desc <<~DESC
|
79
|
+
For each configured account and folder, lists the number of emails yet to be downloaded.
|
80
|
+
DESC
|
81
|
+
accounts_option
|
82
|
+
def status
|
83
|
+
Status.new(symbolized(options)).run
|
84
|
+
end
|
84
85
|
|
85
|
-
|
86
|
-
|
86
|
+
desc "local SUBCOMMAND [OPTIONS]", "View local info"
|
87
|
+
subcommand "local", Local
|
88
|
+
end
|
87
89
|
end
|
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: 4.0.0.
|
4
|
+
version: 4.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Yates
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|