dogviz 0.0.12 → 0.0.13
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/dogviz/version.rb +1 -1
- data/lib/dogviz.rb +7 -4
- data/tests/test_dogviz_functionally.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f2eba7014ad75dedbfafa7ff0e216fffdc8f46
|
4
|
+
data.tar.gz: da75936f1407196db7c95b62545740a0f2417c4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75c7f38b30ed3aff4670f01097518b063c5e2dfcb86a05b13befac58020d01cfff41206d30b732951238318742f2069fac50c68e202fdfab08bb5ea6b3f7fe55
|
7
|
+
data.tar.gz: 469d201d3d79dc1803afbf5b9e66b83a11c77eadb7c958d14ed2467a4c5b13b3778cb338f4efb3375ae558fa242e9fe00080a7c47147aebd4f8a9fb65167b2a9
|
data/lib/dogviz/version.rb
CHANGED
data/lib/dogviz.rb
CHANGED
@@ -9,6 +9,9 @@ module Dogviz
|
|
9
9
|
def name
|
10
10
|
@processor.name
|
11
11
|
end
|
12
|
+
def description
|
13
|
+
@description
|
14
|
+
end
|
12
15
|
end
|
13
16
|
module Flowable
|
14
17
|
def does(action)
|
@@ -465,8 +468,8 @@ module Dogviz
|
|
465
468
|
receiver_label = other.name
|
466
469
|
sender_label = from.name
|
467
470
|
if other.is_a?(Process)
|
471
|
+
detail = process_annotations(detail, sender_label, receiver_label, other.description)
|
468
472
|
receiver_label = process_start_label(receiver_label)
|
469
|
-
detail = process_annotations(detail)
|
470
473
|
elsif from.is_a?(Process)
|
471
474
|
receiver_label = process_end_label(receiver_label)
|
472
475
|
end
|
@@ -487,10 +490,10 @@ module Dogviz
|
|
487
490
|
"-#{receiver_label}"
|
488
491
|
end
|
489
492
|
|
490
|
-
def process_annotations(detail)
|
493
|
+
def process_annotations(detail, sender, receiver, process_description)
|
491
494
|
detail = [detail,
|
492
|
-
|
493
|
-
|
495
|
+
"note right of #{receiver}",
|
496
|
+
" #{process_description}",
|
494
497
|
'end note'].join("\n")
|
495
498
|
end
|
496
499
|
end
|
@@ -56,10 +56,10 @@ module Tests
|
|
56
56
|
sys = System.new 'takeaway'
|
57
57
|
eater = sys.thing 'eater'
|
58
58
|
server = sys.thing 'server'
|
59
|
-
cook = sys.thing '
|
59
|
+
cook = sys.thing 'chef'
|
60
60
|
|
61
61
|
order = sys.flow 'order'
|
62
|
-
order.flows eater, '
|
62
|
+
order.flows eater, 'gimme burger',
|
63
63
|
server, 'passes order',
|
64
64
|
cook, server, eater
|
65
65
|
|
@@ -68,9 +68,9 @@ module Tests
|
|
68
68
|
definition = read_outfile('seq.txt')
|
69
69
|
|
70
70
|
assert_equal [
|
71
|
-
'eater -> server:
|
72
|
-
'server ->
|
73
|
-
'
|
71
|
+
'eater -> server: gimme burger',
|
72
|
+
'server -> chef: passes order',
|
73
|
+
'chef -> server:',
|
74
74
|
'server -> eater:',
|
75
75
|
].join("\n"), definition
|
76
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogviz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- damned
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|