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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gv_fsm.rb +7 -3
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48a490d68d563a441424cfdd79c6c6051d30d4b6e55765239936aed794a898a5
4
- data.tar.gz: fc16d72b89d439ae9b18f021e46a9cbf1c5caf4b48ed71a45bad2db72998005b
3
+ metadata.gz: 687c6994a931d95a7cc4f190dbe26dd1c392e960f9ef1c41f544f53408f1ad70
4
+ data.tar.gz: 880237c706a106208808ae00a9c42be507dfd5dd5c43d09671f32e419d715b4d
5
5
  SHA512:
6
- metadata.gz: ff52872fa8b822d0b63085cf1721bff88123d64112d3ba1103bdaf6da7e5eb1e801f5fed4526d029128b0853ab1527c45f1fc625d61cc37a9350c81709c5a578
7
- data.tar.gz: 2d4c28d766e9c34bbe379af163f3302f53501870497df608142c7b67e9f02059846944d17ecac780c4d732a68be00eb790625ffbbd6d2d90b4040c764ea6dcea
6
+ metadata.gz: b690e25215ce7e994c96e5231759315fcf8804f13e6357c7b36f5a6cd6a925e1f7f6c761cbe494c76d592d967e981cb91b180de094f758919bd676e616376b74
7
+ data.tar.gz: 641de18537305498dafa1afc161f2d3bcb0d05a2c30835289eb4afbb1eb8cd965950f94a19691951d50f038daa5520de766bce5dade4d6db477018341d522022
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'ruby-graphviz'
4
4
  require 'erb'
5
- require 'pry'
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
- binding.pry
36
- label = n[:label].source.empty? ? "do_#{id}" : n[:label].source
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|
@@ -1,3 +1,3 @@
1
1
  module GV_FSM
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gv_fsm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Bosetti