VictoriaFreSh 2020.7.42 → 2020.7.43
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/victoriafresh.rb +8 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cd9a3ba2ec266174958ab7fed3a2dfba2656ffb0b0833742fb91fe078a28617
|
4
|
+
data.tar.gz: 44f60f5f60c7d0126a5994e1ba99afa435a2c153a4a84d46dd9406ddf0bbb9b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 965aea54528d639258d17c780a28160fb33d4043f026eb000c3c1ad51e5b11960c3655b2b5b96ad1c1fe02e926417603560eadbaca2d42b436380573883ce233
|
7
|
+
data.tar.gz: ae2bbe7ab8f2a894af168acbebbe9e6861bd2e46baf5fe19d65049d986575848f3d27fe9fbf6e0827e9c604d1814b21e26e3921737e5455601c6405a32bac8eb
|
data/lib/victoriafresh.rb
CHANGED
@@ -21,16 +21,18 @@ class VictoriaFresh
|
|
21
21
|
|
22
22
|
timeObject=getTimeObject(packagedFile) #构造时间戳对象
|
23
23
|
|
24
|
-
victoriaFreshData=contentString[packagedFile.file_start_index, packagedFile.file_length] #获取内容
|
24
|
+
# victoriaFreshData=contentString[packagedFile.file_start_index, packagedFile.file_length] #获取内容
|
25
|
+
victoriaFreshData=contentString[ packagedFile['file_start_index'], packagedFile['file_length'] ] #获取内容
|
25
26
|
|
26
|
-
pathToMake=pathPrefix + '/' + packagedFile.name #构造文件名
|
27
|
+
# pathToMake=pathPrefix + '/' + packagedFile.name #构造文件名
|
28
|
+
pathToMake=pathPrefix + '/' + packagedFile['name'] #构造文件名
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
+
victoriaFreshDataFile=File.new(pathToMake , "wb") #数据文件。
|
31
|
+
victoriaFreshDataFile.syswrite(victoriaFreshData) #写入文件。
|
30
32
|
victoriaFreshDataFile.close #关闭文件。
|
31
|
-
|
33
|
+
|
32
34
|
FileUtils.touch pathToMake, :mtime => timeObject #设置修改时间
|
33
|
-
|
35
|
+
|
34
36
|
end #writeFile(pathPrefix, packagedFile, contentString) #写入文件
|
35
37
|
|
36
38
|
def getTimeObject(packagedFile) #构造时间戳对象
|