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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f085fb8d6ded2540d50008da16c1c6d6769d5041
4
- data.tar.gz: f98a92c101a882b59863dd073dd8349c29141ba3
3
+ metadata.gz: 42f2eba7014ad75dedbfafa7ff0e216fffdc8f46
4
+ data.tar.gz: da75936f1407196db7c95b62545740a0f2417c4d
5
5
  SHA512:
6
- metadata.gz: 7cd88dfa88063c39f4ffa14e017bcc34da8faf484bd283e587242391780c5c9030ef3a9aabe7c58e1f6de56d2266a7ccfb93fa0630781946e21d5c3fea798181
7
- data.tar.gz: 80784c272449229635d3b99b7fb348e8d3dc61a4524ab39c27080751a17a4fe60c28bd0ebc6b1d476c929f87f1d2c615e73293e8ca01240e2855f716baf2f3a2
6
+ metadata.gz: 75c7f38b30ed3aff4670f01097518b063c5e2dfcb86a05b13befac58020d01cfff41206d30b732951238318742f2069fac50c68e202fdfab08bb5ea6b3f7fe55
7
+ data.tar.gz: 469d201d3d79dc1803afbf5b9e66b83a11c77eadb7c958d14ed2467a4c5b13b3778cb338f4efb3375ae558fa242e9fe00080a7c47147aebd4f8a9fb65167b2a9
@@ -1,3 +1,3 @@
1
1
  module Dogviz
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
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
- 'note right of cook',
493
- ' cooks burger',
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 'cook'
59
+ cook = sys.thing 'chef'
60
60
 
61
61
  order = sys.flow 'order'
62
- order.flows eater, 'asks for burger',
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: asks for burger',
72
- 'server -> cook: passes order',
73
- 'cook -> server:',
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.12
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-14 00:00:00.000000000 Z
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler