ruby-graphviz 1.0.4 → 1.0.5
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.
- data/.travis.yml +3 -1
- data/CHANGELOG.rdoc +5 -0
- data/bin/gem2gv +3 -3
- data/bin/git2gv +4 -4
- data/bin/ruby2gv +3 -3
- data/lib/graphviz.rb +1 -1
- data/lib/graphviz/attrs.rb +5 -0
- data/lib/graphviz/constants.rb +1 -1
- metadata +4 -4
data/.travis.yml
CHANGED
data/CHANGELOG.rdoc
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
= CHANGELOG
|
2
2
|
|
3
|
+
== 1.0.5 :
|
4
|
+
* Change deprecated methods in gem2gv, git2gv and ruby2gv
|
5
|
+
* Issue #38
|
6
|
+
* Issue #39
|
7
|
+
|
3
8
|
== 1.0.4 :
|
4
9
|
* GraphViz::Edge#each_attribut is deprecated, please use GraphViz::Edge#each_attribute
|
5
10
|
* GraphViz::GraphML#attributs is deprecated, please, use GraphViz::GraphML#attributes
|
data/bin/gem2gv
CHANGED
@@ -71,7 +71,7 @@ class Gem2Gv
|
|
71
71
|
#nodeLabel = "#{name}\n#{version}"
|
72
72
|
nodeName = "#{name}"
|
73
73
|
nodeLabel = "#{name}"
|
74
|
-
return @oGraph.get_node(nodeName) || @oGraph.
|
74
|
+
return @oGraph.get_node(nodeName) || @oGraph.add_nodes( nodeName, "label" => nodeLabel )
|
75
75
|
end
|
76
76
|
|
77
77
|
def createEdges( gemName, version, nodes )
|
@@ -79,7 +79,7 @@ class Gem2Gv
|
|
79
79
|
|
80
80
|
nodes.each do |node|
|
81
81
|
nodeB = getNode( node[:name], node[:version] )
|
82
|
-
@oGraph.
|
82
|
+
@oGraph.add_edges( nodeA, nodeB )
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -163,4 +163,4 @@ end
|
|
163
163
|
g = Gem2Gv.new( xGVPath, xUse )
|
164
164
|
g.go( xGem )
|
165
165
|
result = g.out( xOutFormat, xOutFile )
|
166
|
-
puts result unless result.nil?
|
166
|
+
puts result unless result.nil?
|
data/bin/git2gv
CHANGED
@@ -30,11 +30,11 @@ class Git2Gv
|
|
30
30
|
git.node[:shape => "record"]
|
31
31
|
|
32
32
|
branches.each do |branch|
|
33
|
-
git.
|
33
|
+
git.add_nodes( branch, :style => "filled", :fillcolor => :lightgrey )
|
34
34
|
end
|
35
35
|
|
36
36
|
commits.each do |commit|
|
37
|
-
git.
|
37
|
+
git.add_nodes(
|
38
38
|
commit[:short],
|
39
39
|
:style => "filled",
|
40
40
|
:fillcolor => :lightblue,
|
@@ -43,11 +43,11 @@ class Git2Gv
|
|
43
43
|
end
|
44
44
|
|
45
45
|
refs.each do |from, to|
|
46
|
-
git.
|
46
|
+
git.add_edges( from, to )
|
47
47
|
end
|
48
48
|
|
49
49
|
relations.each do |from, to|
|
50
|
-
git.
|
50
|
+
git.add_edges( to, from, :dir => "back" )
|
51
51
|
end
|
52
52
|
|
53
53
|
git.output( @xOutFormat => @xOutFile, :nothugly => @bNothugly )
|
data/bin/ruby2gv
CHANGED
@@ -55,9 +55,9 @@ class Rb2Gv
|
|
55
55
|
def gv_newNode( xNode, xShape = "box", xColor = nil )
|
56
56
|
xNodeName = xNode.gsub( /[^a-zA-Z0-9]/, "_" )
|
57
57
|
if xColor.nil? == true
|
58
|
-
@oGraph.
|
58
|
+
@oGraph.add_nodes( xNodeName, "label" => xNode, "shape" => xShape )
|
59
59
|
else
|
60
|
-
@oGraph.
|
60
|
+
@oGraph.add_nodes( xNodeName, "label" => xNode, "shape" => xShape, "style" => "filled", "color" => xColor )
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -143,7 +143,7 @@ class Rb2Gv
|
|
143
143
|
|
144
144
|
puts " + Edge #{xLib} -> #{xRequiredLib}" if DEBUG
|
145
145
|
unless @hxEdge.include?( "#{@hxNodes[xLib].id}-#{@hxNodes[xRequiredLib].id}" )
|
146
|
-
@oGraph.
|
146
|
+
@oGraph.add_edges( @hxNodes[xLib], @hxNodes[xRequiredLib] )
|
147
147
|
@hxEdge << "#{@hxNodes[xLib].id}-#{@hxNodes[xRequiredLib].id}"
|
148
148
|
end
|
149
149
|
end
|
data/lib/graphviz.rb
CHANGED
data/lib/graphviz/attrs.rb
CHANGED
@@ -56,6 +56,11 @@ class GraphViz
|
|
56
56
|
raise ArgumentError, "#{@name} attribute '#{key.to_s}' invalid"
|
57
57
|
end
|
58
58
|
|
59
|
+
if value.nil?
|
60
|
+
warn "Value for attribute `#{key}` can't be null"
|
61
|
+
return
|
62
|
+
end
|
63
|
+
|
59
64
|
begin
|
60
65
|
value = GraphViz::Types.const_get(@attributes[key.to_s]).new( value )
|
61
66
|
rescue => e
|
data/lib/graphviz/constants.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-graphviz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 5
|
10
|
+
version: 1.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gregoire Lejeune
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-02-06 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|