gv_fsm 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gv_fsm.rb +7 -3
- data/lib/version.rb +1 -1
- 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: 687c6994a931d95a7cc4f190dbe26dd1c392e960f9ef1c41f544f53408f1ad70
|
4
|
+
data.tar.gz: 880237c706a106208808ae00a9c42be507dfd5dd5c43d09671f32e419d715b4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b690e25215ce7e994c96e5231759315fcf8804f13e6357c7b36f5a6cd6a925e1f7f6c761cbe494c76d592d967e981cb91b180de094f758919bd676e616376b74
|
7
|
+
data.tar.gz: 641de18537305498dafa1afc161f2d3bcb0d05a2c30835289eb4afbb1eb8cd965950f94a19691951d50f038daa5520de766bce5dade4d6db477018341d522022
|
data/lib/gv_fsm.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'ruby-graphviz'
|
4
4
|
require 'erb'
|
5
|
-
|
5
|
+
|
6
6
|
require File.expand_path('../templates.rb', __FILE__)
|
7
7
|
require File.expand_path("../version.rb", __FILE__)
|
8
8
|
|
@@ -32,8 +32,12 @@ module GV_FSM
|
|
32
32
|
GraphViz.parse(filename) do |g|
|
33
33
|
g.each_node do |id|
|
34
34
|
n = g.get_node(id)
|
35
|
-
|
36
|
-
|
35
|
+
if n[:label].source.empty? or
|
36
|
+
(n[:label].source == id and !n[:label].source.match(/^do_/)) then
|
37
|
+
label = "do_#{id}"
|
38
|
+
else
|
39
|
+
label = n[:label].source
|
40
|
+
end
|
37
41
|
@states << {id: id, function: @prefix+label}
|
38
42
|
end
|
39
43
|
g.each_edge do |e|
|
data/lib/version.rb
CHANGED