cpee-logging-xes-yaml 1.3.3 → 1.3.4
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/tools/cpee-logging-xes-yaml +16 -12
- 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: aab20ce260e56f4571add36cef8c7fe6f638fad4a723d28f8a13e6e93e99a32c
|
4
|
+
data.tar.gz: 122128fd3e956198fc7096409ff1f64bf47d0e17f5f2e72dd2f4cf3d138ea173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f36ec97639c73e0735250eee61c39febc1b43e2bab34912780be9a393ccedc45ef3cffdcfd97cd432145a73fcb0935e10dfc405bdd9500117de9afb53522b9de
|
7
|
+
data.tar.gz: 242461d18564a0c2fb9b2b5992e45a99e7506e79aab3eaa08be4c4a1bc4846733b39bc49b7b6e5c7714f719e74ce6afd6fa8225a91642be3188f61c597dfa4f2
|
data/tools/cpee-logging-xes-yaml
CHANGED
@@ -16,7 +16,6 @@
|
|
16
16
|
# CPEE-LOGGING-XES-YAML (file LICENSE in the main directory). If not, see
|
17
17
|
# <http://www.gnu.org/licenses/>.
|
18
18
|
|
19
|
-
curpath = __dir__
|
20
19
|
require 'rubygems'
|
21
20
|
require 'optparse'
|
22
21
|
require 'fileutils'
|
@@ -27,16 +26,18 @@ require 'stringio'
|
|
27
26
|
require 'typhoeus'
|
28
27
|
require 'date'
|
29
28
|
|
30
|
-
def wrap(s, width=78, indent=19, extra_indent=
|
29
|
+
def wrap(s, width=78, indent=19, extra_indent=2)
|
31
30
|
lines = []
|
32
|
-
line, s = s[0..indent-
|
33
|
-
s.split(/\n/).
|
34
|
-
ss.split(/[ \t]+/).
|
31
|
+
line, s = s[0..indent-1], s[indent..-1]
|
32
|
+
s.split(/\n/).each_with_index do |ss,i|
|
33
|
+
ss.split(/[ \t]+/).each_with_index do |word,j|
|
35
34
|
if line.size + word.size >= width
|
36
35
|
lines << line
|
37
|
-
line = (" " * (indent
|
36
|
+
line = (" " * (indent)) + word
|
38
37
|
else
|
39
|
-
line << " "
|
38
|
+
line << " " if i > 0 || j != 0
|
39
|
+
line << (" " * (extra_indent)) if i > 0 && j == 0
|
40
|
+
line << word
|
40
41
|
end
|
41
42
|
end
|
42
43
|
lines << line if line
|
@@ -100,7 +101,7 @@ def extract(path)
|
|
100
101
|
text = response.response_body
|
101
102
|
end
|
102
103
|
else
|
103
|
-
text = File.read(
|
104
|
+
text = File.read(path)
|
104
105
|
end
|
105
106
|
yaml = Psych.load_stream(text)
|
106
107
|
changes = []
|
@@ -147,13 +148,16 @@ ARGV.options { |opt|
|
|
147
148
|
opt.on("Options:")
|
148
149
|
opt.on("--help", "-h", "This text") { puts opt; exit }
|
149
150
|
opt.on("")
|
151
|
+
opt.on(wrap("\"#{exname}\" will be call \"c\" in the examples for each command."))
|
152
|
+
exname = 'c'
|
153
|
+
opt.on("")
|
150
154
|
opt.on(wrap("new [DIR] scaffolds a sample logging service. Add a handler to a cpee instance to experience the pleasure."))
|
151
155
|
opt.on("")
|
152
156
|
opt.on(wrap("view [DIR] view the dependencies between processes and subprocesses. Works for local and remote logs. Examples:\n#{exname} view https://cpee.org/log/123.xes.yaml\n#{exname} view https://cpee.org/log/a.xes.yaml > index.txt\n#{exname} view ~/log/logs/456.xes.yaml"))
|
153
157
|
opt.on("")
|
154
|
-
opt.on(wrap("copy [DIR] copy dependent processes and subprocesses to the current directory. Works for local and remote logs. Examples
|
158
|
+
opt.on(wrap("copy [DIR] copy dependent processes and subprocesses to the current directory. Works for local and remote logs. Examples: \n#{exname} copy https://cpee.org/log/123.xes.yaml\n#{exname} copy ~/log/logs/456.xes.yaml"))
|
155
159
|
opt.on("")
|
156
|
-
opt.on(wrap("extract-all [LOG] extract cpee testset from cpee xes-yaml log. Works for local and remote logs. Write logs to files in folder named like the instance uuid contained in the log. Examples
|
160
|
+
opt.on(wrap("extract-all [LOG] extract cpee testset from cpee xes-yaml log. Works for local and remote logs. Write logs to files in folder named like the instance uuid contained in the log. Examples: \n#{exname} extract https://cpee.org/log/123.xes.yaml\n#{exname} extract ~/log/logs/456.xes.yaml"))
|
157
161
|
opt.on("")
|
158
162
|
opt.on(wrap("extract-last [LOG] extract cpee testset from cpee xes-yaml log. Works for local and remote logs. Write last revision of the model to stdout. Examples:\n#{exname} extract https://cpee.org/log/123.xes.yaml\n#{exname} extract ~/log/logs/456.xes.yaml"))
|
159
163
|
opt.parse!
|
@@ -168,7 +172,7 @@ end
|
|
168
172
|
|
169
173
|
if command == 'new'
|
170
174
|
if !File.exist?(path)
|
171
|
-
FileUtils.cp_r(File.join(
|
175
|
+
FileUtils.cp_r(File.join(__dir__,'..','server'),path)
|
172
176
|
FileUtils.mkdir(File.join(path,'logs')) rescue nil
|
173
177
|
else
|
174
178
|
puts 'Directory already exists.'
|
@@ -196,7 +200,7 @@ elsif command == 'extract-all'
|
|
196
200
|
unless desc.nil?
|
197
201
|
description.replace_by(XML::Smart.string(desc).root())
|
198
202
|
end
|
199
|
-
dirname = File.join(
|
203
|
+
dirname = File.join(uuid)
|
200
204
|
filename = File.join(dirname,"#{uuid}_#{version}.xml")
|
201
205
|
Dir.mkdir(dirname) unless Dir.exist?(dirname)
|
202
206
|
File.write(filename, xml.to_s())
|
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.4
|
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: 2024-01-
|
12
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: riddl
|