VictoriaFreSh 2022.2.20 → 2022.2.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/victoriafresh.rb +19 -16
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 858f913baefa07976884fe157551cd49be5afed8350a25d7b80b0bf721c3651b
4
- data.tar.gz: 1b3ec78d1870b2c80e55dff66a75a8fbc3ab090f7b98fbbe015cc7021dd7f494
3
+ metadata.gz: 5293fd04253e9ab289f8827edf268ea5653d709402de849d5304ea19fc014a10
4
+ data.tar.gz: c5aa96e8dd2a479a3d80b411299ae22c8d49f18fa20c3ad051913bbc375ba243
5
5
  SHA512:
6
- metadata.gz: 4a31d07ec88d16ef521967358af884dafc8fa94b6a9c1cfac4717b6e6a6df4a209ee999ecb4ee9cc7e4ce07b299f1676e601274048f0042e436c41b2208dc012
7
- data.tar.gz: 4f16f1a94a499726e2aa6e9139866e6a794b78fd13a3ea4f2f7196ff92fdc5c38d5168fd7a79f39b374e1f10a5ecbe723325c641a9217c4b0a9d1d478a547077
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
- @diskWriteFileObject.syswrite(contentToWrite) #写入内容
352
-
353
- @diskWriteFileObject.close #关闭文件
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
- begin
367
- File.foreach(datastore).with_index do |line, _line_num|
368
- if line.strip.empty? # 空行
369
- else # 不是空行
370
- current_paragraph << line.strip # 记录一行
371
- end # if line.strip.empty? # 空行
372
- end # File&.foreach(datastore).with_index do |line, _line_num|
373
-
374
- rescue Errno::ENOENT
375
- end
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.20
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-19 00:00:00.000000000 Z
11
+ date: 2022-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hx_cbor