imap-backup 13.1.0 → 13.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/lib/cli_coverage.rb +2 -3
- data/lib/imap/backup/account/backup_folders.rb +2 -0
- data/lib/imap/backup/account/folder_backup.rb +2 -0
- data/lib/imap/backup/account/restore.rb +1 -0
- data/lib/imap/backup/account/serialized_folders.rb +4 -0
- data/lib/imap/backup/account.rb +2 -0
- data/lib/imap/backup/cli/backup.rb +6 -0
- data/lib/imap/backup/cli/folder_enumerator.rb +8 -0
- data/lib/imap/backup/cli/helpers.rb +5 -1
- data/lib/imap/backup/cli/local/check.rb +6 -0
- data/lib/imap/backup/cli/local.rb +5 -0
- data/lib/imap/backup/cli/remote.rb +5 -0
- data/lib/imap/backup/cli/restore.rb +6 -0
- data/lib/imap/backup/cli/setup.rb +7 -0
- data/lib/imap/backup/cli/stats.rb +1 -0
- data/lib/imap/backup/cli/transfer.rb +1 -0
- data/lib/imap/backup/cli/utils.rb +8 -0
- data/lib/imap/backup/cli.rb +2 -2
- data/lib/imap/backup/client/default.rb +2 -0
- data/lib/imap/backup/configuration_not_found.rb +5 -0
- data/lib/imap/backup/logger.rb +0 -1
- data/lib/imap/backup/mirror/map.rb +2 -0
- data/lib/imap/backup/serializer/appender.rb +2 -0
- data/lib/imap/backup/serializer/delayed_metadata_serializer.rb +1 -0
- data/lib/imap/backup/serializer/directory.rb +1 -0
- data/lib/imap/backup/serializer/imap.rb +1 -0
- data/lib/imap/backup/serializer/permission_checker.rb +2 -0
- data/lib/imap/backup/serializer/unused_name_finder.rb +2 -0
- data/lib/imap/backup/serializer/version2_migrator.rb +2 -0
- data/lib/imap/backup/serializer.rb +2 -0
- data/lib/imap/backup/setup/account/header.rb +2 -0
- data/lib/imap/backup/setup/account.rb +2 -0
- data/lib/imap/backup/setup/connection_tester.rb +1 -1
- data/lib/imap/backup/setup.rb +2 -0
- data/lib/imap/backup/thunderbird/mailbox_exporter.rb +2 -1
- data/lib/imap/backup/uploader.rb +4 -0
- data/lib/imap/backup/version.rb +1 -1
- metadata +2 -2
- data/lib/imap/backup.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef98e7550571026f402c2fa7c82b37707be3c79ee23bd190dd091d234e9c9e7
|
4
|
+
data.tar.gz: f2f7508af8f492cfd19972ba11e3ca651bc417f69b43dd5f78d511500f5373af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6bb21bffea6ac0c7dc70c073700fe532d3fe5492ad9fd54f668070b682b17e958c152f07e91807a3c5f6aa8e354c7cdb0ca188cd2398bccc16951b421d4ea0
|
7
|
+
data.tar.gz: 2a1f679f55a047626cb85b2bd8b3b69cadbce20426af6ad278fab2f24758e379276575dc0149265b7783804da18f433731672cbaf34e0bf7c52ee38fa26a258e
|
data/README.md
CHANGED
@@ -7,6 +7,15 @@
|
|
7
7
|
|
8
8
|
Backup, restore and migrate email accounts.
|
9
9
|
|
10
|
+
# Quick Start
|
11
|
+
|
12
|
+
```sh
|
13
|
+
brew install imap-backup # for macOS
|
14
|
+
gem install imap-backup # for Linux
|
15
|
+
imap-backup setup
|
16
|
+
imap-backup
|
17
|
+
```
|
18
|
+
|
10
19
|
# Modes
|
11
20
|
|
12
21
|
There are two types of backups:
|
@@ -57,7 +66,9 @@ imap-backup setup
|
|
57
66
|
|
58
67
|
## GMail
|
59
68
|
|
60
|
-
To use imap-backup with GMail,
|
69
|
+
To use imap-backup with GMail, Office 365 and other services that require
|
70
|
+
OAuth2 authentication, you can use [email-oauth2-proxy](https://github.com/simonrob/email-oauth2-proxy)
|
71
|
+
to handle authentication, and then connect to the proxy on a local port.
|
61
72
|
|
62
73
|
# Backup
|
63
74
|
|
data/lib/cli_coverage.rb
CHANGED
@@ -2,10 +2,9 @@ class CliCoverage
|
|
2
2
|
def self.conditionally_activate
|
3
3
|
return if !ENV.key?("COVERAGE")
|
4
4
|
|
5
|
-
require "simplecov"
|
6
|
-
|
7
5
|
# Collect coverage separately
|
8
|
-
|
6
|
+
ENV["SIMPLECOV_COMMAND_NAME"] = "#{ENV.fetch('COVERAGE')} #{ARGV.join(' ')} coverage"
|
7
|
+
require "simplecov"
|
9
8
|
|
10
9
|
# Silence output
|
11
10
|
SimpleCov.formatter = SimpleCov::Formatter::SimpleFormatter
|
@@ -2,6 +2,8 @@ require "imap/backup/serializer/delayed_metadata_serializer"
|
|
2
2
|
require "imap/backup/downloader"
|
3
3
|
require "imap/backup/flag_refresher"
|
4
4
|
require "imap/backup/local_only_message_deleter"
|
5
|
+
require "imap/backup/logger"
|
6
|
+
require "imap/backup/serializer"
|
5
7
|
|
6
8
|
module Imap; end
|
7
9
|
|
data/lib/imap/backup/account.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
require "net/imap"
|
2
|
+
require "thor"
|
3
|
+
|
2
4
|
require "imap/backup/account/backup"
|
5
|
+
require "imap/backup/cli/helpers"
|
6
|
+
require "imap/backup/logger"
|
3
7
|
|
4
8
|
module Imap; end
|
5
9
|
|
6
10
|
module Imap::Backup
|
11
|
+
class CLI < Thor; end
|
12
|
+
|
7
13
|
class CLI::Backup < Thor
|
8
14
|
include Thor::Actions
|
9
15
|
include CLI::Helpers
|
@@ -1,6 +1,14 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "pathname"
|
3
|
+
|
4
|
+
require "imap/backup/account/folder"
|
5
|
+
require "imap/backup/serializer"
|
6
|
+
|
1
7
|
module Imap; end
|
2
8
|
|
3
9
|
module Imap::Backup
|
10
|
+
class CLI < Thor; end
|
11
|
+
|
4
12
|
class CLI::FolderEnumerator
|
5
13
|
attr_reader :destination
|
6
14
|
attr_reader :destination_delimiter
|
@@ -1,9 +1,14 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
1
3
|
require "imap/backup/account/serialized_folders"
|
4
|
+
require "imap/backup/cli/helpers"
|
2
5
|
require "imap/backup/cli/local/check"
|
3
6
|
|
4
7
|
module Imap; end
|
5
8
|
|
6
9
|
module Imap::Backup
|
10
|
+
class CLI < Thor; end
|
11
|
+
|
7
12
|
class CLI::Local < Thor
|
8
13
|
include Thor::Actions
|
9
14
|
include CLI::Helpers
|
@@ -1,10 +1,18 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "thunderbird/profiles"
|
3
|
+
|
1
4
|
require "imap/backup/account/backup_folders"
|
2
5
|
require "imap/backup/account/serialized_folders"
|
6
|
+
require "imap/backup/cli/helpers"
|
7
|
+
require "imap/backup/logger"
|
8
|
+
require "imap/backup/serializer"
|
3
9
|
require "imap/backup/thunderbird/mailbox_exporter"
|
4
10
|
|
5
11
|
module Imap; end
|
6
12
|
|
7
13
|
module Imap::Backup
|
14
|
+
class CLI < Thor; end
|
15
|
+
|
8
16
|
class CLI::Utils < Thor
|
9
17
|
include Thor::Actions
|
10
18
|
include CLI::Helpers
|
data/lib/imap/backup/cli.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "thor"
|
2
|
+
|
2
3
|
require "imap/backup/logger"
|
3
4
|
|
4
5
|
module Imap; end
|
@@ -8,7 +9,6 @@ module Imap::Backup
|
|
8
9
|
require "imap/backup/cli/helpers"
|
9
10
|
|
10
11
|
autoload :Backup, "imap/backup/cli/backup"
|
11
|
-
autoload :Folders, "imap/backup/cli/folders"
|
12
12
|
autoload :Local, "imap/backup/cli/local"
|
13
13
|
autoload :Remote, "imap/backup/cli/remote"
|
14
14
|
autoload :Restore, "imap/backup/cli/restore"
|
@@ -234,7 +234,7 @@ module Imap::Backup
|
|
234
234
|
verbose_option
|
235
235
|
def setup
|
236
236
|
non_logging_options = Imap::Backup::Logger.setup_logging(options)
|
237
|
-
Setup.new(non_logging_options).run
|
237
|
+
CLI::Setup.new(non_logging_options).run
|
238
238
|
end
|
239
239
|
|
240
240
|
desc "stats EMAIL [OPTIONS]", "Print stats for each account folder"
|
data/lib/imap/backup/logger.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
require "forwardable"
|
2
2
|
|
3
3
|
require "email/mboxrd/message"
|
4
|
+
require "imap/backup/logger"
|
4
5
|
require "imap/backup/naming"
|
5
6
|
require "imap/backup/serializer/appender"
|
7
|
+
require "imap/backup/serializer/directory"
|
6
8
|
require "imap/backup/serializer/integrity_checker"
|
7
9
|
require "imap/backup/serializer/imap"
|
8
10
|
require "imap/backup/serializer/mbox"
|
data/lib/imap/backup/setup.rb
CHANGED
data/lib/imap/backup/uploader.rb
CHANGED
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: 13.
|
4
|
+
version: 13.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Yates
|
@@ -146,7 +146,6 @@ files:
|
|
146
146
|
- lib/email/provider/gmail.rb
|
147
147
|
- lib/email/provider/purelymail.rb
|
148
148
|
- lib/email/provider/unknown.rb
|
149
|
-
- lib/imap/backup.rb
|
150
149
|
- lib/imap/backup/account.rb
|
151
150
|
- lib/imap/backup/account/backup.rb
|
152
151
|
- lib/imap/backup/account/backup_folders.rb
|
@@ -173,6 +172,7 @@ files:
|
|
173
172
|
- lib/imap/backup/client/automatic_login_wrapper.rb
|
174
173
|
- lib/imap/backup/client/default.rb
|
175
174
|
- lib/imap/backup/configuration.rb
|
175
|
+
- lib/imap/backup/configuration_not_found.rb
|
176
176
|
- lib/imap/backup/downloader.rb
|
177
177
|
- lib/imap/backup/file_mode.rb
|
178
178
|
- lib/imap/backup/flag_refresher.rb
|
data/lib/imap/backup.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require "imap/backup/account/folder"
|
2
|
-
require "imap/backup/configuration"
|
3
|
-
require "imap/backup/downloader"
|
4
|
-
require "imap/backup/logger"
|
5
|
-
require "imap/backup/uploader"
|
6
|
-
require "imap/backup/serializer"
|
7
|
-
require "imap/backup/setup"
|
8
|
-
require "imap/backup/setup/account"
|
9
|
-
require "imap/backup/setup/asker"
|
10
|
-
require "imap/backup/setup/connection_tester"
|
11
|
-
require "imap/backup/setup/folder_chooser"
|
12
|
-
require "imap/backup/version"
|
13
|
-
|
14
|
-
module Imap; end
|
15
|
-
|
16
|
-
module Imap::Backup
|
17
|
-
class ConfigurationNotFound < StandardError; end
|
18
|
-
end
|