imap-backup 12.1.0 → 13.0.0

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: ed7a9fd869f7b1ea66f5dc0816a4ce35d77c150bcf8170e2d778e893fda43e9d
4
- data.tar.gz: e75c535f849eb326906c1965a1e86507676209cf41cae5b98ad62e894912d9b8
3
+ metadata.gz: ff649779fd21a8a5ab2216b21618da22930c171dbe49fd2cf3aada02e3f2f18b
4
+ data.tar.gz: 7e0ac7d099b71a9404d183cbae3b43b0100ab81c80e69a0485447f7c392b3317
5
5
  SHA512:
6
- metadata.gz: 7ced0838fae828c771e831441fc3caf71b0465f4da630c3580e1ff842c687e51ad92d7e1913e7f8d48e9bb2c2db2eeee60eea3e2dcb464fda2b51ffc9252d8ea
7
- data.tar.gz: d751a6fb0e2eebc107f539cb80609d353bb0c07126fb09e5001bea69476ca9eaa5f1ffce7e6bab27f7efdc149be213997d20c741cc2b60bf3ccf6a3fd0bd810c
6
+ metadata.gz: 8846edccdd5e391d8740533a0a8f1b74b023ed181765e8ff8da4bf7782066b7186449ddf96a765d0a92ced194bf7e5b5f37c30ec2f1ddcab157e1a4b493d53e7
7
+ data.tar.gz: 064fd1b42bfabfddf9abfe740a21d9f6f5247eb7d58605becaf25a01f2657ea623b37063ca4567715daff684231995e7bd9fde2e5ed72fe68b5e124f3c165787
data/imap-backup.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
21
21
  gem.require_paths = ["lib"]
22
- gem.required_ruby_version = ">= 2.6"
22
+ gem.required_ruby_version = ">= 2.7"
23
23
 
24
24
  gem.add_runtime_dependency "highline"
25
25
  gem.add_runtime_dependency "mail", "2.7.1"
@@ -30,13 +30,6 @@ Gem::Specification.new do |gem|
30
30
  gem.add_runtime_dependency "thor", "~> 1.1"
31
31
  gem.add_runtime_dependency "thunderbird", ">= 0.0.0"
32
32
 
33
- gem.add_development_dependency "aruba", ">= 0.0.0"
34
- gem.add_development_dependency "pry-byebug"
35
- gem.add_development_dependency "rspec", ">= 3.0.0"
36
- gem.add_development_dependency "rubocop-rspec"
37
- gem.add_development_dependency "simplecov"
38
- gem.add_development_dependency "yard"
39
-
40
33
  gem.metadata = {
41
34
  "rubygems_mfa_required" => "true"
42
35
  }
data/lib/cli_coverage.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  class CliCoverage
2
2
  def self.conditionally_activate
3
- return if !ENV["COVERAGE"]
3
+ return if !ENV.key?("COVERAGE")
4
4
 
5
5
  require "simplecov"
6
6
 
7
7
  # Collect coverage separately
8
- SimpleCov.command_name "#{ENV['COVERAGE']} #{ARGV.join(' ')} coverage"
8
+ SimpleCov.command_name "#{ENV.fetch('COVERAGE')} #{ARGV.join(' ')} coverage"
9
9
 
10
10
  # Silence output
11
11
  SimpleCov.formatter = SimpleCov::Formatter::SimpleFormatter
@@ -99,7 +99,6 @@ module Imap::Backup
99
99
  flags = message.flags & PERMITTED_FLAGS
100
100
  retry_on_error(errors: APPEND_RETRY_CLASSES, limit: 3) do
101
101
  response = client.append(utf7_encoded_name, body, flags, date)
102
- flags = message.flags & PERMITTED_FLAGS
103
102
  extract_uid(response)
104
103
  end
105
104
  end
@@ -20,7 +20,7 @@ module Imap::Backup
20
20
  parts = path.split("/")
21
21
  return if parts.empty?
22
22
 
23
- FileUtils.mkdir_p(full_path) if !File.exist?(full_path)
23
+ FileUtils.mkdir_p(full_path)
24
24
  full = base
25
25
  parts.each do |part|
26
26
  full = File.join(full, part)
@@ -86,7 +86,7 @@ module Imap::Backup
86
86
  def delete
87
87
  return if !exist?
88
88
 
89
- File.unlink(pathname)
89
+ FileUtils.rm(pathname)
90
90
  @loaded = false
91
91
  @messages = nil
92
92
  @uid_validity = nil
@@ -53,7 +53,7 @@ module Imap::Backup
53
53
  def delete
54
54
  return if !exist?
55
55
 
56
- File.unlink(pathname)
56
+ FileUtils.rm(pathname)
57
57
  end
58
58
 
59
59
  def exist?
@@ -179,7 +179,7 @@ module Imap::Backup
179
179
  Logger.logger.info <<~MESSAGE
180
180
  Local metadata for folder '#{folder_path}' is currently stored in the version 2 format.
181
181
 
182
- This will now be transformed into the version 3 format.
182
+ Migrating to the version 3 format...
183
183
  MESSAGE
184
184
 
185
185
  migrator.run
@@ -68,7 +68,7 @@ module Imap::Backup
68
68
 
69
69
  if force
70
70
  info "Deleting '#{local_folder.msf_path}' as --force option was supplied"
71
- File.unlink local_folder.msf_path
71
+ FileUtils.rm local_folder.msf_path
72
72
  return false
73
73
  end
74
74
 
@@ -1,8 +1,8 @@
1
1
  module Imap; end
2
2
 
3
3
  module Imap::Backup
4
- MAJOR = 12
5
- MINOR = 1
4
+ MAJOR = 13
5
+ MINOR = 0
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: 12.1.0
4
+ version: 13.0.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-09-25 00:00:00.000000000 Z
11
+ date: 2023-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -122,90 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.0.0
125
- - !ruby/object:Gem::Dependency
126
- name: aruba
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: 0.0.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: 0.0.0
139
- - !ruby/object:Gem::Dependency
140
- name: pry-byebug
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: rspec
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: 3.0.0
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: 3.0.0
167
- - !ruby/object:Gem::Dependency
168
- name: rubocop-rspec
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: simplecov
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: yard
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
125
  description: Backup GMail, or any other IMAP email service, to disk.
210
126
  email:
211
127
  - joe.g.yates@gmail.com
@@ -309,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
225
  requirements:
310
226
  - - ">="
311
227
  - !ruby/object:Gem::Version
312
- version: '2.6'
228
+ version: '2.7'
313
229
  required_rubygems_version: !ruby/object:Gem::Requirement
314
230
  requirements:
315
231
  - - ">="