twb 4.9.9 → 4.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twb.rb +1 -1
- data/lib/twb/analysis/datasources/datasourcefilesanalyzer.rb +7 -4
- 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: ae42176483937996d559e926704bfeb458797941bf1b886ab07a0826589c6a47
|
4
|
+
data.tar.gz: cb1995d3c14a0db492631bb00f2d635b0a2abd2df3b04e7dee4639a95e7fe84d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6e513b77ddbfc5eaa758ddc1281c78cad2ce20eb376d7144975d1e05371bef9e05ba32df08d0f587777113bcfa3242e0508c891e97d0690d8a31602740deed
|
7
|
+
data.tar.gz: dc69868cb98f02ca25ce5cf208ca935c3e16c4a6b18e36dbc90cada288f864aeb7df90df9d891545177a0c66c3f0edf24c2cac711d37797b47c1fd98b4693b74
|
data/lib/twb.rb
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
15
|
|
16
16
|
require 'csv'
|
17
|
+
require 'pry'
|
17
18
|
|
18
19
|
module Twb
|
19
20
|
module Analysis
|
@@ -32,6 +33,7 @@ module DataSources
|
|
32
33
|
'Data Source',
|
33
34
|
'File Name',
|
34
35
|
'File Dir',
|
36
|
+
'File Exists?',
|
35
37
|
'File Modified',
|
36
38
|
'File Size'
|
37
39
|
]
|
@@ -55,7 +57,7 @@ module DataSources
|
|
55
57
|
|
56
58
|
def processTWB twb
|
57
59
|
@twbName = twb.name
|
58
|
-
@
|
60
|
+
@twbDir = twb.dir
|
59
61
|
twb.datasources.each do |ds|
|
60
62
|
processFiles ds
|
61
63
|
end
|
@@ -69,9 +71,10 @@ module DataSources
|
|
69
71
|
fqFileName = twbFileDir.nil? ? twbFileName : twbFileDir + '/' + twbFileName
|
70
72
|
fileName = File.basename fqFileName
|
71
73
|
fileDir = File.dirname fqFileName
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
exists = File.exist? fqFileName
|
75
|
+
modtime = exists ? File.mtime(fqFileName) : nil
|
76
|
+
size = exists ? File.size(fqFileName) : nil
|
77
|
+
data = [@recNum+=1, @twbName, @twbDir, ds.uiname, fileName, fileDir, exists, modtime, size]
|
75
78
|
@csvFile << data
|
76
79
|
end
|
77
80
|
end
|