uniword 1.5.0 → 1.5.1
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 +4 -4
- data/lib/uniword/infrastructure/zip_packager.rb +21 -2
- data/lib/uniword/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d06dcd363ee45ec4dff3dfaa8c56b9062aa478915e429188691bdaac4ee5dbc1
|
|
4
|
+
data.tar.gz: bd597d9b4c1cf37dff1fe4d5092b14ffa5273fe12ec696ea028c4cacc6024b41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2dc4f986025a8d4753bbb1bd82e9bb1d13b3cdf6d90804c1778c46763001a0fe9ace019dfc3f559cceb1f399b4ffca94b1f764be46599470accd43e837a1230
|
|
7
|
+
data.tar.gz: e68202ac74cad763250c93261789a2bfa6dad2c7fe906e424fb01948fd51cd6d84d8eb783b6e85fed7637ef2e2d2c1b6230398c36caa1591080bf87f85bbf20a
|
|
@@ -73,7 +73,7 @@ module Uniword
|
|
|
73
73
|
|
|
74
74
|
move_temp_to_output(temp_path, output_path)
|
|
75
75
|
ensure
|
|
76
|
-
|
|
76
|
+
remove_temp_file(temp_path)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# Add a file to an existing ZIP archive.
|
|
@@ -184,7 +184,7 @@ module Uniword
|
|
|
184
184
|
|
|
185
185
|
move_temp_to_output(temp_path, output_path)
|
|
186
186
|
ensure
|
|
187
|
-
|
|
187
|
+
remove_temp_file(temp_path)
|
|
188
188
|
end
|
|
189
189
|
|
|
190
190
|
def move_temp_to_output(temp_path, output_path)
|
|
@@ -203,6 +203,25 @@ module Uniword
|
|
|
203
203
|
end
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
+
# Best-effort temp file removal with Windows-safe retries. AV
|
|
207
|
+
# scanners and the indexer briefly hold newly-written files; a
|
|
208
|
+
# single `FileUtils.rm_f` can return EACCES and leak the temp.
|
|
209
|
+
def remove_temp_file(temp_path)
|
|
210
|
+
return unless defined?(temp_path) && temp_path
|
|
211
|
+
return unless File.exist?(temp_path)
|
|
212
|
+
|
|
213
|
+
retries = 5
|
|
214
|
+
begin
|
|
215
|
+
FileUtils.rm_f(temp_path)
|
|
216
|
+
rescue Errno::EACCES
|
|
217
|
+
retries -= 1
|
|
218
|
+
if retries.positive?
|
|
219
|
+
sleep(0.3)
|
|
220
|
+
retry
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
206
225
|
# Validate the content hash.
|
|
207
226
|
#
|
|
208
227
|
# @param content [Object] The content to validate
|
data/lib/uniword/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: uniword
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logger
|