imap-backup 4.1.1 → 4.1.2

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: d6302ae17c5b96de2f99c6683c4a6403edbf80d2afc51cbe0f471918251cfaef
4
- data.tar.gz: 349c0b68911a751e670176a91dfc98d4359a06a9cb8acae7c2cc5d5efa028f25
3
+ metadata.gz: 00a744249ff80a26be2c57655709be59d9678c9bb998dc1c9f3ea4bf3539d747
4
+ data.tar.gz: 4f44c050c66fe2ef2e136b46dec581a91f77ab4b650e9b3466a893540e481a24
5
5
  SHA512:
6
- metadata.gz: 444432d3bf689fa12de1226cb84e9f8975a300f2c94cc2529254e1e3680fba6d7b0cfddfc3fff9001a866dd5d84d1afabc0e952e894ec5ae1a91557ea5538472
7
- data.tar.gz: f4d156790a84308e08ee3d4348741e6d55b26f07fece75473a80f4fc0b7c0265c1bb62230cee178bf4c00941ff0de91a323ade1c0e0783a72a970c738c8823f0
6
+ metadata.gz: 66067924fda33810aff4b02aa047c20cd26ce3fc31d8e752fc43a8f78af3e1c952871fa0ba372c670a5ee399e7fc686f9df9601fc5cbb7caa6f2065b4ac95b90
7
+ data.tar.gz: 443a86c3bda9cc1652fc9d1c5619347c1d82498befed16851a6f8a227eaf3299813dd6a4084e1bb0d180170adb1b63ccf8e5d2a8bb19f0457611e7916d796c4d
@@ -13,7 +13,7 @@ module Imap::Backup
13
13
  no_commands do
14
14
  def run
15
15
  each_connection(account_names) do |connection|
16
- puts connection.username
16
+ puts connection.account.username
17
17
  folders = connection.status
18
18
  folders.each do |f|
19
19
  missing_locally = f[:remote] - f[:local]
@@ -3,7 +3,7 @@ module Imap; end
3
3
  module Imap::Backup
4
4
  MAJOR = 4
5
5
  MINOR = 1
6
- REVISION = 1
6
+ REVISION = 2
7
7
  PRE = nil
8
8
  VERSION = [MAJOR, MINOR, REVISION, PRE].compact.map(&:to_s).join(".")
9
9
  end
@@ -0,0 +1,43 @@
1
+ require "features/helper"
2
+ require "imap/backup/cli/status"
3
+
4
+ RSpec.describe "status", type: :feature, docker: true do
5
+ include_context "imap-backup connection"
6
+ include_context "message-fixtures"
7
+
8
+ context "when there are non-backed-up messages" do
9
+ let(:options) do
10
+ {accounts: "address@example.org"}
11
+ end
12
+ let(:folder) { "my-stuff" }
13
+ let(:backup_folders) { [{name: folder}] }
14
+ let(:email1) { send_email folder, msg1 }
15
+ let(:output) { StringIO.new }
16
+
17
+ before do
18
+ allow(Imap::Backup::CLI::Accounts).to receive(:new) { [account] }
19
+ server_create_folder folder
20
+ email1
21
+ end
22
+
23
+ around do |example|
24
+ stdout = $stdout
25
+ $stdout = output
26
+ example.run
27
+ $stdout = stdout
28
+ end
29
+
30
+ after do
31
+ FileUtils.rm_rf local_backup_path
32
+ delete_emails folder
33
+ server_delete_folder folder
34
+ connection.disconnect
35
+ end
36
+
37
+ it "prints the number" do
38
+ Imap::Backup::CLI::Status.new(options).run
39
+
40
+ expect(output.string).to eq("address@example.org\nmy-stuff: 1\n")
41
+ end
42
+ end
43
+ end
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.1.1
4
+ version: 4.1.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: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -231,6 +231,7 @@ files:
231
231
  - spec/features/backup_spec.rb
232
232
  - spec/features/helper.rb
233
233
  - spec/features/restore_spec.rb
234
+ - spec/features/status_spec.rb
234
235
  - spec/features/support/backup_directory.rb
235
236
  - spec/features/support/email_server.rb
236
237
  - spec/features/support/shared/connection_context.rb
@@ -296,6 +297,7 @@ test_files:
296
297
  - spec/features/support/shared/connection_context.rb
297
298
  - spec/features/support/email_server.rb
298
299
  - spec/features/restore_spec.rb
300
+ - spec/features/status_spec.rb
299
301
  - spec/features/backup_spec.rb
300
302
  - spec/support/higline_test_helpers.rb
301
303
  - spec/support/fixtures.rb