imap-backup 14.2.0 → 14.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1da04e15e0f6c66398320aff6a7ce638e50089db3b6470a3aed7c6a4b49f0a66
4
- data.tar.gz: '0261943b048d8a97f334ca58f21010ae26799ff0afab23cd611cf4528ac841c7'
3
+ metadata.gz: 1fa22c1790c4f48592fd5be38af7e23109a1bd170c71a08f2277576ddee8ea7e
4
+ data.tar.gz: b78e7398359db0707df631ac4c0cbd075a2879f879a4b3155afc9bc98ce8f2a6
5
5
  SHA512:
6
- metadata.gz: 627bcbbdeab8a9bf8cd68cdfd28ae68fbd0961aeb8ce87703428b4a6c1709c3a08a6b45619fc9455d124e31c677af0423e726bbe2c89ad28abc35ddff1fdf2ad
7
- data.tar.gz: ea19474d8dbe419330b96f46860d44ca930d94188492afde2afde4a7a3018e190904b13af6f820c88295540deca0887abee908987abcef8a2d17d7c21fe239db
6
+ metadata.gz: 9b14acc69aa91010b1ea0cc8fa3257376d63d0accb3e41cfc04910861c2ab8e3d4bcf4035efabd34cfd1ee9ccbda5e26b2f63fb8306534f474deddf3ec83b2a2
7
+ data.tar.gz: df034a9b5f24fa072506d9cbf858df23bf533fe6e57cedd0845e22e90d6ffbc0962619786af5746e15dec448ed46654337e362d5c26b8a82efc5b72acf5c7b3e
data/README.md CHANGED
@@ -30,10 +30,49 @@ There are two types of backups:
30
30
  * Mirror - make a destination account match the local copy. This action can be repeated.
31
31
  * Restore - push the local copy back to the original account.
32
32
 
33
- See below for a [full list of commands](#Commands).
33
+ See below for a [full list of commands](#commands).
34
34
 
35
35
  # Installation
36
36
 
37
+ ## Docker or Podman
38
+
39
+ If you have Docker or Podman installed, the easist way to use imap-backup
40
+ is via the container image.
41
+
42
+ You'll need to choose a path on your computer where your backups will be saved,
43
+ we'll use `./my-data` here.
44
+
45
+ If you have just one account, you can do as follows
46
+
47
+ ```sh
48
+ docker run -v ./my-data:/data -ti ghcr.io/joeyates/imap-backup:latest \
49
+ imap-backup single backup \
50
+ --email me@example.com --password mysecret --server imap.example.com \
51
+ --path /data/me_example.com
52
+ ```
53
+
54
+ Podman will work exactly the same.
55
+
56
+ If you have multiple accounts, you can create a configuration file.
57
+
58
+ You'll need to choose a path on your computer where your configuration will be saved,
59
+ we'll use `./my-config` here.
60
+
61
+ First, run the menu-driven setup program to configure your accounts
62
+
63
+ ```sh
64
+ docker run -ti -v ./my-config:/config -v ./my-data:/data -ti ghcr.io/joeyates/imap-backup:latest \
65
+ imap-backup setup -c /config/imap-backup.json
66
+ ```
67
+
68
+ Then, run the backup
69
+
70
+ ```sh
71
+ docker run -v ./my-config:/config -v ./my-data:/data -ti ghcr.io/joeyates/imap-backup:latest \
72
+ imap-backup backup -c /config/imap-backup.json
73
+ ```
74
+
75
+
37
76
  ## Homebrew (macOS)
38
77
 
39
78
  ![Homebrew installs](https://img.shields.io/homebrew/installs/dm/imap-backup?label=Homebrew%20installs)
@@ -76,8 +115,8 @@ you can pass all the necessary parameters directly to the `single backup` comman
76
115
  ## GMail
77
116
 
78
117
  To use imap-backup with GMail, Office 365 and other services that require
79
- OAuth2 authentication, you can use [email-oauth2-proxy](https://github.com/simonrob/email-oauth2-proxy)
80
- to handle authentication, and then connect to the proxy on a local port.
118
+ OAuth2 authentication, you can use [email-oauth2-proxy](https://github.com/simonrob/email-oauth2-proxy).
119
+ See [this blog post about using imap-backup with email-oauth2-proxy](https://joeyates.info/posts/back-up-gmail-accounts-with-imap-backup-using-email-oauth2-proxy/).
81
120
 
82
121
  # Backup
83
122
 
@@ -121,7 +160,7 @@ For more information about a command, run
121
160
  imap-backup help COMMAND
122
161
  ```
123
162
 
124
- # Performace
163
+ # Performance
125
164
 
126
165
  There are a couple of performance tweaks that you can use
127
166
  to improve backup speed.
data/docs/development.md CHANGED
@@ -13,35 +13,30 @@ git config --local blame.ignoreRevsFile .git-blame-ignore-revs
13
13
  * Restartable - calculate start point based on already downloaded messages
14
14
  * Standalone - do not rely on an email client or MTA
15
15
 
16
- # Development
17
-
18
- A Dockerfile is available to allow testing with all available Ruby versions,
19
- see the `dev/container` directory.
20
-
21
16
  # Testing
22
17
 
23
18
  ## Feature Specs
24
19
 
25
20
  Specs under `specs/features` are integration specs run against
26
- two local IMAP servers controlled by Docker Compose.
21
+ two local IMAP servers controlled by Podman (or Docker) Compose.
27
22
 
28
23
  Start them before running the test suite
29
24
 
30
25
  ```sh
31
- $ docker-compose -f dev/docker-compose.yml up -d
26
+ $ podman-compose -f dev/compose.yml up -d
32
27
  ```
33
28
 
34
29
  or, with Podman
35
30
 
36
31
  ```sh
37
- $ podman-compose -f dev/docker-compose.yml up -d
32
+ $ podman-compose -f dev/compose.yml up -d
38
33
  ```
39
34
 
40
35
  ```sh
41
36
  $ rake
42
37
  ```
43
38
 
44
- To exclude Docker-based tests:
39
+ To exclude container-based tests:
45
40
 
46
41
  ```sh
47
42
  rake no-docker
@@ -53,6 +48,11 @@ or
53
48
  $ rspec --tag ~docker
54
49
  ```
55
50
 
51
+ # Older Rubies
52
+
53
+ A Containerfile is available to allow testing with all available Ruby versions,
54
+ see the README in the `dev` directory.
55
+
56
56
  # Performance Specs
57
57
 
58
58
  ```sh
data/imap-backup.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- $LOAD_PATH.unshift(File.expand_path("lib", __dir__))
2
- require "imap/backup/version"
1
+ require_relative "lib/imap/backup/version"
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.name = "imap-backup"
@@ -122,27 +122,30 @@ module Imap::Backup
122
122
  else
123
123
  DEFAULT_STRATEGY
124
124
  end
125
- if data[:version] == VERSION_2_1
126
- dehashify_folders(data)
127
- else
128
- data
129
- end
125
+ dehashify_folders(data)
130
126
  else
131
127
  {accounts: [], download_strategy: DEFAULT_STRATEGY}
132
128
  end
133
129
  end
134
130
 
135
131
  def dehashify_folders(data)
136
- data[:version] = VERSION
137
-
138
132
  data[:accounts].each do |account|
139
133
  next if !account.key?(:folders)
140
134
 
141
135
  folders = account[:folders]
142
- names = folders.map { |f| f[:name] }
136
+ names = folders.map do |f|
137
+ case f
138
+ when Hash
139
+ f[:name]
140
+ else
141
+ f
142
+ end
143
+ end
143
144
  account[:folders] = names
144
145
  end
145
146
 
147
+ data[:version] = VERSION
148
+
146
149
  data
147
150
  end
148
151
 
@@ -2,7 +2,7 @@ module Imap; end
2
2
 
3
3
  module Imap::Backup
4
4
  MAJOR = 14
5
- MINOR = 2
5
+ MINOR = 4
6
6
  REVISION = 0
7
7
  PRE = nil
8
8
  VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
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: 14.2.0
4
+ version: 14.4.0
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-10-21 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline