imap-backup 9.3.1 → 9.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f01e9469da5b4990bdcc90f5e019b0cf5e9cf06203f29980503edabdec4abb8
4
- data.tar.gz: 93501685a083a9b3edc8f1bb606decf7bcac965773063eb9e59863f3afa43113
3
+ metadata.gz: 35c15f0cf7b9909868b55bb5c9ec928cb5c22e6943a9856fbf52b1bd9fb0212b
4
+ data.tar.gz: d4cfaf196b031f91c0e745a55def95cdc480906c7b387a888949c80bc607867f
5
5
  SHA512:
6
- metadata.gz: 494089b738a8ca9080c1057b4bdc5a8ebe8d2900e756fbd2c16445d856e3939da759bd8bc644585f8d6591055a79656b92a44b60cb0a522a87023d30f6b49ca9
7
- data.tar.gz: fa3e100e307103808360797853953cfec677bbd6ee3b9b36330f2449ef065a5e128660154e6d3593a34652f6753a553bf4697e145c60a3e728645acb67477de3
6
+ metadata.gz: bca6edbdf041a3795d9f97ba1df9f63feaeee7d024df73da389990cc2a235b73a0379096261b1c515344746cb256380f79c7b2a99abdd78b2a279049b6184bbf
7
+ data.tar.gz: 966e04781677d2f281810a2160a5f56dfea17dd69c7694948cf8a36e96616685708d5c599e8bb661f7441fbdf7a0accc66fbcbb9d278bbe375c685af62e8a0b7
data/docs/development.md CHANGED
@@ -21,6 +21,12 @@ Before running the test suite, it needs to be started:
21
21
  $ docker-compose up -d
22
22
  ```
23
23
 
24
+ or, with Podman
25
+
26
+ ```sh
27
+ $ podman-compose -f docker-compose.yml up -d
28
+ ```
29
+
24
30
  ```sh
25
31
  $ rake
26
32
  ```
@@ -20,9 +20,17 @@ module Imap::Backup
20
20
 
21
21
  include Helpers
22
22
 
23
+ VERSION_ARGUMENTS = %w(-v --version).freeze
24
+
23
25
  default_task :backup
24
26
 
25
27
  def self.start(*args)
28
+ version_argument = ARGV & VERSION_ARGUMENTS
29
+ if version_argument.any?
30
+ new.version
31
+ exit 0
32
+ end
33
+
26
34
  # By default, commands like `imap-backup help foo bar`
27
35
  # are handled by listing all `foo` methods, whereas the user
28
36
  # probably wants the detailed help for the `bar` method.
@@ -227,5 +235,10 @@ module Imap::Backup
227
235
 
228
236
  desc "utils SUBCOMMAND [OPTIONS]", "Various utilities"
229
237
  subcommand "utils", Utils
238
+
239
+ desc "version", "Print the imap-backup version"
240
+ def version
241
+ Kernel.puts "imap-backup #{Imap::Backup::VERSION}"
242
+ end
230
243
  end
231
244
  end
@@ -30,14 +30,20 @@ module Imap::Backup
30
30
  def initialize(path, folder)
31
31
  @path = path
32
32
  @folder = folder
33
+ @validated = nil
33
34
  end
34
35
 
35
36
  # Returns true if there are existing, valid files
36
37
  # false otherwise (in which case any existing files are deleted)
37
38
  def validate!
39
+ return if @validated
40
+
38
41
  optionally_migrate2to3
39
42
 
40
- return true if imap.valid? && mbox.valid?
43
+ if imap.valid? && mbox.valid?
44
+ @validated = true
45
+ return true
46
+ end
41
47
 
42
48
  delete
43
49
 
@@ -113,7 +119,7 @@ module Imap::Backup
113
119
  # NOOP
114
120
  nil
115
121
  else
116
- apply_new_uid_validity value
122
+ apply_new_uid_validity(value)
117
123
  end
118
124
  end
119
125
 
@@ -3,7 +3,7 @@ module Imap; end
3
3
  module Imap::Backup
4
4
  MAJOR = 9
5
5
  MINOR = 3
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
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: 9.3.1
4
+ version: 9.3.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: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline