imap-backup 4.0.0.rc1 → 4.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +22 -8
  4. data/imap-backup.gemspec +0 -2
  5. data/lib/imap/backup/account/connection.rb +2 -21
  6. data/lib/imap/backup/cli/local.rb +9 -5
  7. data/lib/imap/backup/cli.rb +77 -73
  8. data/lib/imap/backup/configuration/account.rb +1 -11
  9. data/lib/imap/backup/version.rb +1 -1
  10. data/lib/imap/backup.rb +0 -1
  11. data/spec/unit/imap/backup/account/connection_spec.rb +0 -45
  12. data/spec/unit/imap/backup/configuration/account_spec.rb +0 -43
  13. metadata +2 -65
  14. data/docs/01-credentials-screen.png +0 -0
  15. data/docs/02-new-project.png +0 -0
  16. data/docs/03-initial-credentials-for-project.png +0 -0
  17. data/docs/04-credential-type-selection.png +0 -0
  18. data/docs/05-cant-create-without-consent-setup.png +0 -0
  19. data/docs/06-user-type-selection.png +0 -0
  20. data/docs/07-consent-screen-form.png +0 -0
  21. data/docs/08-app-scopes.png +0 -0
  22. data/docs/09-scope-selection.png +0 -0
  23. data/docs/10-updated-app-scopes.png +0 -0
  24. data/docs/11-test-users.png +0 -0
  25. data/docs/12-add-users.png +0 -0
  26. data/docs/13-create-oauth-client.png +0 -0
  27. data/docs/14-application-details.png +0 -0
  28. data/docs/16-initial-menu.png +0 -0
  29. data/docs/17-inputting-the-email-address.png +0 -0
  30. data/docs/18-choose-password.png +0 -0
  31. data/docs/19-supply-client-info.png +0 -0
  32. data/docs/20-choose-gmail-account.png +0 -0
  33. data/docs/21-accept-warnings.png +0 -0
  34. data/docs/22-grant-access.png +0 -0
  35. data/docs/24-confirm-choices.png +0 -0
  36. data/docs/25-success-code.png +0 -0
  37. data/docs/26-type-code-into-imap-backup.png +0 -0
  38. data/docs/27-success.png +0 -0
  39. data/docs/setting-up-gmail-with-oauth2.md +0 -166
  40. data/lib/gmail/authenticator.rb +0 -160
  41. data/lib/google/auth/stores/in_memory_token_store.rb +0 -9
  42. data/lib/imap/backup/configuration/gmail_oauth2.rb +0 -102
  43. data/spec/unit/gmail/authenticator_spec.rb +0 -138
  44. data/spec/unit/google/auth/stores/in_memory_token_store_spec.rb +0 -15
  45. data/spec/unit/imap/backup/configuration/gmail_oauth2_spec.rb +0 -121
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba3f202308a586f7ec54b28d66ea2f9422cf30f706c118ab02f362346351f268
4
- data.tar.gz: 585bd29f2d2f836aad27c6ac58855649b7621eff770d5e2b40bfdd3f6aa774f0
3
+ metadata.gz: f6b754ca94002e528fff72fa9bfbe6316281d3325796843d312303c4956cd03f
4
+ data.tar.gz: dc7230bd742a4db2dfe24a358c6bac1508433578c1eb108130bbd5d89e41b60c
5
5
  SHA512:
6
- metadata.gz: 6270660f55ab52e3a3d8242bdfbb2d044ce7428ccc75daabf25b6753a7c91f9c3f4d8b2be4db517f44fb887663a40e946f128c2bf06f4d1006cd02182d9f477e
7
- data.tar.gz: f94af41fee60be97e15e0d2aa3da5a0696b9d8bab5cb03cb42c805881b13e8a38fc5be42ee30efd26576d5cadb10d2f53b0c46c00fc94ca72cf23f94e05d602b
6
+ metadata.gz: 3b8cbc016eb22fe70240bad350ad2d9e009800af15db493f798aa33367e7b67ae0725ce6f8d97666c0f0ad46101fe793f2447d241199ffdc983a17d60c47a852
7
+ data.tar.gz: 0f3c5a5a4e8e257dca263c25ac004e7d697908dfaccc9a82e354b5dfa8164f61e8671feb20afc8a4afd55bc3e79337bf723c715f61ce758d3a6e7ba1f8448677
data/CHANGELOG.md CHANGED
@@ -4,8 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [4.0.0.rc2] - 2021-11-18
8
+
9
+ ### Removed
10
+
11
+ * GMail OAuth2 support. Tokens only last a few days, so this authentication
12
+ method is not usable for automated backups.
13
+
7
14
  ## [4.0.0.rc1] - 2021-11-17
8
15
 
9
16
  ### Added
17
+
10
18
  * `local` commands to list accounts, folders and emails and to view single
11
19
  emails.
data/README.md CHANGED
@@ -20,20 +20,24 @@
20
20
 
21
21
  To use imap-backup with GMail, you will need to enable 'App passwords' on your account.
22
22
 
23
- ## GMail OAuth2
23
+ # Installation
24
+
25
+ ```shell
26
+ $ gem install 'imap-backup'
27
+ ```
24
28
 
25
- GMail OAuth2 authentication is supported, but as GMail's policy requires
26
- users to set up an application specific to their account, the feature
27
- is disabled by default.
29
+ # Commands
28
30
 
29
- You will need to set the environment variable IMAP_BACKUP_ENABLE_GMAIL_OAUTH2.
31
+ For a full list, run
30
32
 
31
- To set it up, [follow the HOWTO](docs/setting-up-gmail-with-oauth2.md).
33
+ ```
34
+ $ imap-backup help
35
+ ```
32
36
 
33
- # Installation
37
+ For more information about a command, run
34
38
 
35
39
  ```shell
36
- $ gem install 'imap-backup'
40
+ $ imap-backup help COMMAND
37
41
  ```
38
42
 
39
43
  # Setup
@@ -148,6 +152,16 @@ Each folder is saved to an mbox file.
148
152
  Alongside each mbox is a file with extension '.imap', which lists the source IMAP
149
153
  UIDs to allow a full restore.
150
154
 
155
+ # Local commands
156
+
157
+ There a various commands for viewing local backup status.
158
+
159
+ To view the list, use
160
+
161
+ ```shell
162
+ $ imap_backup help local
163
+ ```
164
+
151
165
  # Troubleshooting
152
166
 
153
167
  If you have problems:
data/imap-backup.gemspec CHANGED
@@ -16,8 +16,6 @@ Gem::Specification.new do |gem|
16
16
  gem.required_ruby_version = ">= 2.5"
17
17
  gem.version = Imap::Backup::VERSION
18
18
 
19
- gem.add_runtime_dependency "gmail_xoauth"
20
- gem.add_runtime_dependency "googleauth"
21
19
  gem.add_runtime_dependency "highline"
22
20
  gem.add_runtime_dependency "mail"
23
21
  gem.add_runtime_dependency "rake"
@@ -1,15 +1,11 @@
1
1
  require "net/imap"
2
- require "gmail_xoauth"
3
2
 
4
- require "gmail/authenticator"
5
3
  require "retry_on_error"
6
4
 
7
5
  module Imap::Backup
8
6
  module Account; end
9
7
 
10
8
  class Account::Connection
11
- class InvalidGmailOauth2RefreshToken < StandardError; end
12
-
13
9
  include RetryOnError
14
10
 
15
11
  LOGIN_RETRY_CLASSES = [EOFError, Errno::ECONNRESET, SocketError].freeze
@@ -109,17 +105,8 @@ module Imap::Backup
109
105
  "Creating IMAP instance: #{server}, options: #{options.inspect}"
110
106
  )
111
107
  imap = Net::IMAP.new(server, options)
112
- if use_gmail_oauth2? && Gmail::Authenticator.refresh_token?(password)
113
- authenticator = Gmail::Authenticator.new(email: username, token: password)
114
- credentials = authenticator.credentials
115
- raise InvalidGmailOauth2RefreshToken if !credentials
116
-
117
- Imap::Backup.logger.debug "Logging in with OAuth2 token: #{username}"
118
- imap.authenticate("XOAUTH2", username, credentials.access_token)
119
- else
120
- Imap::Backup.logger.debug "Logging in: #{username}/#{masked_password}"
121
- imap.login(username, password)
122
- end
108
+ Imap::Backup.logger.debug "Logging in: #{username}/#{masked_password}"
109
+ imap.login(username, password)
123
110
  Imap::Backup.logger.debug "Login complete"
124
111
  imap
125
112
  end
@@ -181,12 +168,6 @@ module Imap::Backup
181
168
  password.gsub(/./, "x")
182
169
  end
183
170
 
184
- def use_gmail_oauth2?
185
- # TODO: test use of ENV
186
- server == Email::Provider::GMAIL_IMAP_SERVER &&
187
- ENV["IMAP_BACKUP_ENABLE_GMAIL_OAUTH2"]
188
- end
189
-
190
171
  def backup_folders
191
172
  @backup_folders ||=
192
173
  begin
@@ -3,13 +3,13 @@ module Imap::Backup
3
3
  include Thor::Actions
4
4
  include CLI::Helpers
5
5
 
6
- desc "accounts", "list locally backed-up accounts"
6
+ desc "accounts", "List locally backed-up accounts"
7
7
  def accounts
8
8
  connections = Imap::Backup::Configuration::List.new
9
9
  connections.accounts.each { |a| puts a[:username] }
10
10
  end
11
11
 
12
- desc "folders EMAIL", "list account folders"
12
+ desc "folders EMAIL", "List account folders"
13
13
  def folders(email)
14
14
  connections = Imap::Backup::Configuration::List.new
15
15
  account = connections.accounts.find { |a| a[:username] == email }
@@ -21,7 +21,7 @@ module Imap::Backup
21
21
  end
22
22
  end
23
23
 
24
- desc "emails EMAIL FOLDER", "list emails in a folder"
24
+ desc "emails EMAIL FOLDER", "List emails in a folder"
25
25
  def emails(email, folder_name)
26
26
  connections = Imap::Backup::Configuration::List.new
27
27
  account = connections.accounts.find { |a| a[:username] == email }
@@ -40,7 +40,11 @@ module Imap::Backup
40
40
  uids = folder_serializer.uids
41
41
 
42
42
  folder_serializer.each_message(uids).map do |uid, message|
43
- m = {uid: uid, date: message.parsed.date.to_s, subject: message.parsed.subject}
43
+ m = {
44
+ uid: uid,
45
+ date: message.parsed.date.to_s,
46
+ subject: message.parsed.subject || ""
47
+ }
44
48
  if m[:subject].length > max_subject
45
49
  puts format("% 10<uid>u: %.#{max_subject - 3}<subject>s... - %<date>s", m)
46
50
  else
@@ -49,7 +53,7 @@ module Imap::Backup
49
53
  end
50
54
  end
51
55
 
52
- desc "email EMAIL FOLDER UID", "show an email"
56
+ desc "email EMAIL FOLDER UID", "Show an email"
53
57
  def email(email, folder_name, uid)
54
58
  connections = Imap::Backup::Configuration::List.new
55
59
  account = connections.accounts.find { |a| a[:username] == email }
@@ -1,87 +1,91 @@
1
1
  require "thor"
2
2
 
3
- class Imap::Backup::CLI < Thor
4
- require "imap/backup/cli/helpers"
3
+ module Imap; end
5
4
 
6
- autoload :Backup, "imap/backup/cli/backup"
7
- autoload :Folders, "imap/backup/cli/folders"
8
- autoload :Local, "imap/backup/cli/local"
9
- autoload :Remote, "imap/backup/cli/remote"
10
- autoload :Restore, "imap/backup/cli/restore"
11
- autoload :Setup, "imap/backup/cli/setup"
12
- autoload :Status, "imap/backup/cli/status"
5
+ module Imap::Backup
6
+ class CLI < Thor
7
+ require "imap/backup/cli/helpers"
13
8
 
14
- include Helpers
9
+ autoload :Backup, "imap/backup/cli/backup"
10
+ autoload :Folders, "imap/backup/cli/folders"
11
+ autoload :Local, "imap/backup/cli/local"
12
+ autoload :Remote, "imap/backup/cli/remote"
13
+ autoload :Restore, "imap/backup/cli/restore"
14
+ autoload :Setup, "imap/backup/cli/setup"
15
+ autoload :Status, "imap/backup/cli/status"
15
16
 
16
- default_task :backup
17
+ include Helpers
17
18
 
18
- def self.exit_on_failure?
19
- true
20
- end
19
+ default_task :backup
21
20
 
22
- def self.accounts_option
23
- method_option(
24
- "accounts",
25
- type: :string,
26
- banner: "a comma-separated list of accounts (defaults to all configured accounts)",
27
- aliases: ["-a"]
28
- )
29
- end
21
+ def self.exit_on_failure?
22
+ true
23
+ end
30
24
 
31
- desc "backup [OPTIONS]", "Run the backup"
32
- long_desc <<~DESC
33
- Downloads any emails not yet present locally.
34
- Runs the backup for each configured account,
35
- or for those requested via the --accounts option.
36
- By default all folders, are backed up.
37
- The setup tool can be used to choose a specific list of folders to back up.
38
- DESC
39
- accounts_option
40
- def backup
41
- Backup.new(symbolized(options)).run
42
- end
25
+ def self.accounts_option
26
+ method_option(
27
+ "accounts",
28
+ type: :string,
29
+ banner: "a comma-separated list of accounts (defaults to all configured accounts)",
30
+ aliases: ["-a"]
31
+ )
32
+ end
43
33
 
44
- desc "folders [OPTIONS]", "This command is deprecated, use `imap-backup remote folders ACCOUNT`"
45
- long_desc <<~DESC
46
- Lists all folders of all configured accounts.
47
- This command is deprecated.
48
- Instead, use a combination of `imap-backup local accounts` to get the list of accounts,
49
- and `imap-backup remote folders ACCOUNT` to get the folder list.
50
- DESC
51
- accounts_option
52
- def folders
53
- Folders.new(symbolized(options)).run
54
- end
34
+ desc "backup [OPTIONS]", "Run the backup"
35
+ long_desc <<~DESC
36
+ Downloads any emails not yet present locally.
37
+ Runs the backup for each configured account,
38
+ or for those requested via the --accounts option.
39
+ By default all folders, are backed up.
40
+ The setup tool can be used to choose a specific list of folders to back up.
41
+ DESC
42
+ accounts_option
43
+ def backup
44
+ Backup.new(symbolized(options)).run
45
+ end
55
46
 
56
- desc "restore [OPTIONS]", "This command is deprecated, use `imap-backup restore ACCOUNT`"
57
- long_desc <<~DESC
58
- By default, restores all local emails to their respective servers.
59
- This command is deprecated.
60
- Instead, use `imap-backup restore ACCOUNT` to restore a single account.
61
- DESC
62
- accounts_option
63
- def restore
64
- Restore.new(symbolized(options)).run
65
- end
47
+ desc "folders [OPTIONS]", "This command is deprecated, use `imap-backup remote folders ACCOUNT`"
48
+ long_desc <<~DESC
49
+ Lists all folders of all configured accounts.
50
+ This command is deprecated.
51
+ Instead, use a combination of `imap-backup local accounts` to get the list of accounts,
52
+ and `imap-backup remote folders ACCOUNT` to get the folder list.
53
+ DESC
54
+ accounts_option
55
+ def folders
56
+ Folders.new(symbolized(options)).run
57
+ end
66
58
 
67
- desc "setup", "Configure imap-backup"
68
- long_desc <<~DESC
69
- A menu-driven command-line application used to configure imap-backup.
70
- Configure email accounts to back up.
71
- DESC
72
- def setup
73
- Setup.new().run
74
- end
59
+ desc "restore [OPTIONS]", "This command is deprecated, use `imap-backup restore ACCOUNT`"
60
+ long_desc <<~DESC
61
+ By default, restores all local emails to their respective servers.
62
+ This command is deprecated.
63
+ Instead, use `imap-backup restore ACCOUNT` to restore a single account.
64
+ DESC
65
+ accounts_option
66
+ def restore
67
+ Restore.new(symbolized(options)).run
68
+ end
75
69
 
76
- desc "status", "Show backup status"
77
- long_desc <<~DESC
78
- For each configured account and folder, lists the number of emails yet to be downloaded.
79
- DESC
80
- accounts_option
81
- def status
82
- Status.new(symbolized(options)).run
83
- end
70
+ desc "setup", "Configure imap-backup"
71
+ long_desc <<~DESC
72
+ A menu-driven command-line application used to configure imap-backup.
73
+ Configure email accounts to back up.
74
+ DESC
75
+ def setup
76
+ Setup.new().run
77
+ end
84
78
 
85
- desc "local subcommand ...ARGS", "View local info"
86
- subcommand "local", Local
79
+ desc "status", "Show backup status"
80
+ long_desc <<~DESC
81
+ For each configured account and folder, lists the number of emails yet to be downloaded.
82
+ DESC
83
+ accounts_option
84
+ def status
85
+ Status.new(symbolized(options)).run
86
+ end
87
+
88
+ desc "local SUBCOMMAND [OPTIONS]", "View local info"
89
+ subcommand "local", Local
90
+ end
87
91
  end
@@ -68,12 +68,7 @@ module Imap::Backup
68
68
 
69
69
  def modify_password(menu)
70
70
  menu.choice("modify password") do
71
- password =
72
- if use_gmail_oauth2?(account)
73
- Configuration::GmailOauth2.new(account).run
74
- else
75
- Configuration::Asker.password
76
- end
71
+ password = Configuration::Asker.password
77
72
 
78
73
  if !password.nil?
79
74
  account[:password] = password
@@ -82,11 +77,6 @@ module Imap::Backup
82
77
  end
83
78
  end
84
79
 
85
- def use_gmail_oauth2?(account)
86
- account[:server] == Email::Provider::GMAIL_IMAP_SERVER &&
87
- ENV["IMAP_BACKUP_ENABLE_GMAIL_OAUTH2"]
88
- end
89
-
90
80
  def modify_server(menu)
91
81
  menu.choice("modify server") do
92
82
  server = highline.ask("server: ")
@@ -4,6 +4,6 @@ module Imap::Backup
4
4
  MAJOR = 4
5
5
  MINOR = 0
6
6
  REVISION = 0
7
- PRE = "rc1"
7
+ PRE = "rc5"
8
8
  VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
9
9
  end
data/lib/imap/backup.rb CHANGED
@@ -7,7 +7,6 @@ require "imap/backup/configuration/account"
7
7
  require "imap/backup/configuration/asker"
8
8
  require "imap/backup/configuration/connection_tester"
9
9
  require "imap/backup/configuration/folder_chooser"
10
- require "imap/backup/configuration/gmail_oauth2"
11
10
  require "imap/backup/configuration/list"
12
11
  require "imap/backup/configuration/setup"
13
12
  require "imap/backup/configuration/store"
@@ -90,56 +90,11 @@ describe Imap::Backup::Account::Connection do
90
90
  end
91
91
 
92
92
  context "with the GMail IMAP server" do
93
- ACCESS_TOKEN = "access_token".freeze
94
-
95
93
  let(:server) { GMAIL_IMAP_SERVER }
96
94
  let(:refresh_token) { true }
97
95
  let(:result) { nil }
98
- let(:authenticator) do
99
- instance_double(
100
- Gmail::Authenticator,
101
- credentials: credentials
102
- )
103
- end
104
- let(:credentials) { OpenStruct.new(access_token: ACCESS_TOKEN) }
105
-
106
- before do
107
- allow(Gmail::Authenticator).
108
- to receive(:refresh_token?) { refresh_token }
109
- allow(Gmail::Authenticator).
110
- to receive(:new).
111
- with(email: USERNAME, token: PASSWORD) { authenticator }
112
- end
113
-
114
- context "when the password is our copy of a GMail refresh token and the environment IMAP_BACKUP_ENABLE_GMAIL_OAUTH2 is set" do
115
- before do
116
- ENV["IMAP_BACKUP_ENABLE_GMAIL_OAUTH2"] = "1"
117
- end
118
-
119
- after do
120
- ENV.delete("IMAP_BACKUP_ENABLE_GMAIL_OAUTH2")
121
- end
122
-
123
- it "uses the OAuth2 access_token to authenticate" do
124
- subject.imap
125
-
126
- expect(imap).to have_received(:authenticate).with(
127
- "XOAUTH2", USERNAME, ACCESS_TOKEN
128
- )
129
- end
130
-
131
- context "when the refresh token is invalid" do
132
- let(:credentials) { nil }
133
-
134
- it "raises" do
135
- expect { subject.imap }.to raise_error(String)
136
- end
137
- end
138
- end
139
96
 
140
97
  context "when the password is not our copy of a GMail refresh token" do
141
- let(:refresh_token) { false }
142
-
143
98
  it "uses the password" do
144
99
  subject.imap
145
100
 
@@ -241,49 +241,6 @@ describe Imap::Backup::Configuration::Account do
241
241
  end
242
242
  end
243
243
 
244
- describe "choosing 'modify password' when the server is for GMail" do
245
- let(:new_password) { "new_password" }
246
- let(:current_server) { GMAIL_IMAP_SERVER }
247
- let(:gmail_oauth2) do
248
- instance_double(Imap::Backup::Configuration::GmailOauth2, run: nil)
249
- end
250
-
251
- before do
252
- allow(Imap::Backup::Configuration::Asker).
253
- to receive(:password) { new_password }
254
- allow(Imap::Backup::Configuration::GmailOauth2).
255
- to receive(:new).
256
- with(account) { gmail_oauth2 }
257
- end
258
-
259
- context "when the environment IMAP_BACKUP_ENABLE_GMAIL_OAUTH2 is set" do
260
- before do
261
- ENV["IMAP_BACKUP_ENABLE_GMAIL_OAUTH2"] = "1"
262
- subject.run
263
- menu.choices["modify password"].call
264
- end
265
-
266
- after do
267
- ENV.delete("IMAP_BACKUP_ENABLE_GMAIL_OAUTH2")
268
- end
269
-
270
- it "sets up GMail OAuth2" do
271
- expect(gmail_oauth2).to have_received(:run)
272
- end
273
- end
274
-
275
- context "when the environment IMAP_BACKUP_ENABLE_GMAIL_OAUTH2 is not set" do
276
- before do
277
- subject.run
278
- menu.choices["modify password"].call
279
- end
280
-
281
- it "sets up GMail OAuth2" do
282
- expect(gmail_oauth2).to_not have_received(:run)
283
- end
284
- end
285
- end
286
-
287
244
  describe "choosing 'modify server'" do
288
245
  let(:server) { "server" }
289
246
 
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imap-backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc1
4
+ version: 4.0.0.rc5
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-17 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: gmail_xoauth
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: googleauth
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
13
  - !ruby/object:Gem::Dependency
42
14
  name: highline
43
15
  requirement: !ruby/object:Gem::Requirement
@@ -199,39 +171,11 @@ files:
199
171
  - Rakefile
200
172
  - bin/imap-backup
201
173
  - docker-compose.yml
202
- - docs/01-credentials-screen.png
203
- - docs/02-new-project.png
204
- - docs/03-initial-credentials-for-project.png
205
- - docs/04-credential-type-selection.png
206
- - docs/05-cant-create-without-consent-setup.png
207
- - docs/06-user-type-selection.png
208
- - docs/07-consent-screen-form.png
209
- - docs/08-app-scopes.png
210
- - docs/09-scope-selection.png
211
- - docs/10-updated-app-scopes.png
212
- - docs/11-test-users.png
213
- - docs/12-add-users.png
214
- - docs/13-create-oauth-client.png
215
- - docs/14-application-details.png
216
- - docs/16-initial-menu.png
217
- - docs/17-inputting-the-email-address.png
218
- - docs/18-choose-password.png
219
- - docs/19-supply-client-info.png
220
- - docs/20-choose-gmail-account.png
221
- - docs/21-accept-warnings.png
222
- - docs/22-grant-access.png
223
- - docs/24-confirm-choices.png
224
- - docs/25-success-code.png
225
- - docs/26-type-code-into-imap-backup.png
226
- - docs/27-success.png
227
174
  - docs/docker-imap.md
228
- - docs/setting-up-gmail-with-oauth2.md
229
175
  - imap-backup
230
176
  - imap-backup.gemspec
231
177
  - lib/email/mboxrd/message.rb
232
178
  - lib/email/provider.rb
233
- - lib/gmail/authenticator.rb
234
- - lib/google/auth/stores/in_memory_token_store.rb
235
179
  - lib/imap/backup.rb
236
180
  - lib/imap/backup/account/connection.rb
237
181
  - lib/imap/backup/account/folder.rb
@@ -247,7 +191,6 @@ files:
247
191
  - lib/imap/backup/configuration/asker.rb
248
192
  - lib/imap/backup/configuration/connection_tester.rb
249
193
  - lib/imap/backup/configuration/folder_chooser.rb
250
- - lib/imap/backup/configuration/gmail_oauth2.rb
251
194
  - lib/imap/backup/configuration/list.rb
252
195
  - lib/imap/backup/configuration/setup.rb
253
196
  - lib/imap/backup/configuration/store.rb
@@ -276,15 +219,12 @@ files:
276
219
  - spec/support/silence_logging.rb
277
220
  - spec/unit/email/mboxrd/message_spec.rb
278
221
  - spec/unit/email/provider_spec.rb
279
- - spec/unit/gmail/authenticator_spec.rb
280
- - spec/unit/google/auth/stores/in_memory_token_store_spec.rb
281
222
  - spec/unit/imap/backup/account/connection_spec.rb
282
223
  - spec/unit/imap/backup/account/folder_spec.rb
283
224
  - spec/unit/imap/backup/configuration/account_spec.rb
284
225
  - spec/unit/imap/backup/configuration/asker_spec.rb
285
226
  - spec/unit/imap/backup/configuration/connection_tester_spec.rb
286
227
  - spec/unit/imap/backup/configuration/folder_chooser_spec.rb
287
- - spec/unit/imap/backup/configuration/gmail_oauth2_spec.rb
288
228
  - spec/unit/imap/backup/configuration/list_spec.rb
289
229
  - spec/unit/imap/backup/configuration/setup_spec.rb
290
230
  - spec/unit/imap/backup/configuration/store_spec.rb
@@ -335,15 +275,12 @@ test_files:
335
275
  - spec/support/silence_logging.rb
336
276
  - spec/unit/email/mboxrd/message_spec.rb
337
277
  - spec/unit/email/provider_spec.rb
338
- - spec/unit/gmail/authenticator_spec.rb
339
- - spec/unit/google/auth/stores/in_memory_token_store_spec.rb
340
278
  - spec/unit/imap/backup/account/connection_spec.rb
341
279
  - spec/unit/imap/backup/account/folder_spec.rb
342
280
  - spec/unit/imap/backup/configuration/account_spec.rb
343
281
  - spec/unit/imap/backup/configuration/asker_spec.rb
344
282
  - spec/unit/imap/backup/configuration/connection_tester_spec.rb
345
283
  - spec/unit/imap/backup/configuration/folder_chooser_spec.rb
346
- - spec/unit/imap/backup/configuration/gmail_oauth2_spec.rb
347
284
  - spec/unit/imap/backup/configuration/list_spec.rb
348
285
  - spec/unit/imap/backup/configuration/setup_spec.rb
349
286
  - spec/unit/imap/backup/configuration/store_spec.rb
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file