cpee-logging-xes-yaml 1.3.0 → 1.3.2
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/cpee-logging-xes-yaml.gemspec +1 -1
- data/lib/cpee-logging-xes-yaml/tools.rb +7 -7
- data/tools/cpee-logging-xes-yaml +3 -3
- 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: 99c79d272d96fc0194b782ae5f93492b7a50f5daac07cb60da447d2be314cbc8
|
4
|
+
data.tar.gz: ceb9ac1ca98aa9bae3fc4fb15c3e617ec306fa00bc62e8f627888169ee8ca703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe2f39dad68c6a86308811d25df6a1e41e9133984c1c67c6512240128abce5fa57727f915615cbe2fae21ef61bead8ab20b36e5c8bbab43181d7a9a38d116459
|
7
|
+
data.tar.gz: 94fa1197bc3e2b820464c947204aaa3ec376c13d90a87f3f371c11c39548aee98c4ec6fc71de28969ef319e07df780eb024db674e5777e33796cfc8a62b9dc51
|
@@ -148,7 +148,7 @@ module CPEE
|
|
148
148
|
ret[tid] = ret[tid][0]
|
149
149
|
end
|
150
150
|
hash = Digest::SHA1.hexdigest(ret[tid])
|
151
|
-
if !File.
|
151
|
+
if !File.exist?(fname) || (File.exist?(fname) && File.read(fname) != hash)
|
152
152
|
File.write(fname,hash)
|
153
153
|
end
|
154
154
|
end
|
@@ -195,7 +195,7 @@ module CPEE
|
|
195
195
|
end
|
196
196
|
|
197
197
|
def self::persist_values(where,values)
|
198
|
-
unless File.
|
198
|
+
unless File.exist?(where)
|
199
199
|
File.write(where,'{}')
|
200
200
|
end
|
201
201
|
f = File.open(where,'r+')
|
@@ -259,7 +259,7 @@ module CPEE
|
|
259
259
|
log["log"]["trace"]["concept:name"] ||= instancenr
|
260
260
|
log["log"]["trace"]["cpee:name"] ||= notification['instance-name'] if notification['instance-name']
|
261
261
|
log["log"]["trace"]["cpee:instance"] ||= instance
|
262
|
-
File.open(File.join(log_dir,instance+'.xes.yaml'),'w'){|f| f.puts log.to_yaml} unless File.
|
262
|
+
File.open(File.join(log_dir,instance+'.xes.yaml'),'w'){|f| f.puts log.to_yaml} unless File.exist? File.join(log_dir,instance+'.xes.yaml')
|
263
263
|
event = {}
|
264
264
|
event["concept:instance"] = instancenr
|
265
265
|
event["concept:name"] = content["label"] if content["label"]
|
@@ -292,8 +292,8 @@ module CPEE
|
|
292
292
|
fname = File.join(log_dir,instance + '_' + event["id:id"] + '.probe')
|
293
293
|
dname = File.join(log_dir,instance + '.data.json')
|
294
294
|
|
295
|
-
if File.
|
296
|
-
rs = WEEL::ReadStructure.new(File.
|
295
|
+
if File.exist?(fname)
|
296
|
+
rs = WEEL::ReadStructure.new(File.exist?(dname) ? JSON::load(File::open(dname)) : {},{},{},{})
|
297
297
|
XML::Smart::open_unprotected(fname) do |doc|
|
298
298
|
doc.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
|
299
299
|
doc.find('//d:probe[d:extractor_type="intrinsic"]').each do |p|
|
@@ -315,10 +315,10 @@ module CPEE
|
|
315
315
|
fname = File.join(log_dir,instance + '_' + event["id:id"] + '.probe')
|
316
316
|
dname = File.join(log_dir,instance + '.data.json')
|
317
317
|
|
318
|
-
if File.
|
318
|
+
if File.exist?(fname)
|
319
319
|
te = event.dup
|
320
320
|
|
321
|
-
rs = WEEL::ReadStructure.new(File.
|
321
|
+
rs = WEEL::ReadStructure.new(File.exist?(dname) ? JSON::load(File::open(dname)) : {},{},{},{})
|
322
322
|
XML::Smart::open_unprotected(fname) do |doc|
|
323
323
|
doc.register_namespace 'd', 'http://cpee.org/ns/description/1.0'
|
324
324
|
if doc.find('//d:probe/d:extractor_type[.="extrinsic"]').any?
|
data/tools/cpee-logging-xes-yaml
CHANGED
@@ -50,7 +50,7 @@ def follow(fname,io,copy,deep=0)
|
|
50
50
|
File.basename(fname,'.xes.yaml')
|
51
51
|
end
|
52
52
|
if copy
|
53
|
-
File.write(
|
53
|
+
File.write(File.basename(fname),io.read)
|
54
54
|
io.rewind
|
55
55
|
end
|
56
56
|
YAML.load_stream(io) do |e|
|
@@ -84,7 +84,7 @@ def react(name,copy=false,deep=0)
|
|
84
84
|
file.close
|
85
85
|
file.unlink
|
86
86
|
end
|
87
|
-
elsif File.
|
87
|
+
elsif File.exist? name
|
88
88
|
follow name, File.open(name), copy, deep
|
89
89
|
else
|
90
90
|
help
|
@@ -116,7 +116,7 @@ else
|
|
116
116
|
end
|
117
117
|
|
118
118
|
if command == 'new'
|
119
|
-
if !File.
|
119
|
+
if !File.exist?(dir)
|
120
120
|
FileUtils.cp_r(File.join(curpath,'..','server'),dir)
|
121
121
|
FileUtils.mkdir(File.join(dir,'logs')) rescue nil
|
122
122
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-logging-xes-yaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: tools
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: riddl
|