VictoriaFreSh 2022.2.20 → 2022.2.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/victoriafresh.rb +19 -16
- 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: 5293fd04253e9ab289f8827edf268ea5653d709402de849d5304ea19fc014a10
|
4
|
+
data.tar.gz: c5aa96e8dd2a479a3d80b411299ae22c8d49f18fa20c3ad051913bbc375ba243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39014b2e4a571cb0c8da0ddcc7f7d4c0ef4b41a3d61405ed519391d2bc6054d1686e1443be27701e31bd5eb995c99c95e98b465ff6c380b663a34caba6be6d0a
|
7
|
+
data.tar.gz: 12f6a697b3b4d761cd713e26257e9e4901cd8da3ecbeff5358ae88e1fa0be97ae2f5f451423b9c509859c70c1c5edd78e96ee43dbf9e0bd528a75b931d742be5
|
data/lib/victoriafresh.rb
CHANGED
@@ -348,10 +348,9 @@ class VictoriaFresh
|
|
348
348
|
|
349
349
|
@diskWriteFileObject.close
|
350
350
|
else #单个磁盘文件
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
351
|
+
@diskWriteFileObject.syswrite(contentToWrite) #写入内容
|
352
|
+
|
353
|
+
@diskWriteFileObject.close #关闭文件
|
355
354
|
end #if (@diskMultiFile) #多个磁盘文件
|
356
355
|
end #if (isFinalPart) #是最后一部分
|
357
356
|
end #if (@diskFlush) #要做磁盘写入
|
@@ -360,19 +359,21 @@ class VictoriaFresh
|
|
360
359
|
# 读取要忽略的文件名列表。
|
361
360
|
def readIgnoreFileList (directoryPathName)
|
362
361
|
current_paragraph=[] # 列表
|
363
|
-
#陈欣
|
364
|
-
datastore= "#{directoryPathName.expand_path}/#{@ignoreFileName}" # 配置文件路径
|
365
362
|
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
363
|
+
if @ignoreFileName # 设置了忽略列表
|
364
|
+
#陈欣
|
365
|
+
datastore = "#{directoryPathName.expand_path}/#{@ignoreFileName}" # 配置文件路径
|
366
|
+
|
367
|
+
begin
|
368
|
+
File.foreach(datastore).with_index do |line, _line_num|
|
369
|
+
if line.strip.empty? # 空行
|
370
|
+
else # 不是空行
|
371
|
+
current_paragraph << line.strip # 记录一行
|
372
|
+
end # if line.strip.empty? # 空行
|
373
|
+
end # File&.foreach(datastore).with_index do |line, _line_num|
|
374
|
+
rescue Errno::ENOENT
|
375
|
+
end
|
376
|
+
end # if @ignoreFileName # 设置了忽略列表
|
376
377
|
|
377
378
|
current_paragraph
|
378
379
|
end
|
@@ -391,6 +392,8 @@ class VictoriaFresh
|
|
391
392
|
|
392
393
|
fileTimestamp=mtimeStamp.tv_sec # 获取秒数
|
393
394
|
|
395
|
+
#puts "path: #{directoryPath}, time stamp: #{fileTimestamp}, threshold: #{@timestampThreshold}" # debug
|
396
|
+
|
394
397
|
if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
|
395
398
|
result =true # 是过早了
|
396
399
|
end # if (fileTimestamp< @timestampThreshold) # 文件的时间戳比阈值要小,过早了
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: VictoriaFreSh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2022.2.
|
4
|
+
version: 2022.2.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hxcan Cai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hx_cbor
|