cgraph 0.0.3 → 0.0.4
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/Gemfile.lock +1 -1
- data/cgraph.gemspec +1 -1
- data/lib/cgraph.rb +4 -4
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/cgraph.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "cgraph"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = "0.0.
|
15
|
+
gem.version = "0.0.4"
|
16
16
|
gem.add_development_dependency "guard-minitest"
|
17
17
|
gem.add_development_dependency "minitest"
|
18
18
|
|
data/lib/cgraph.rb
CHANGED
@@ -97,7 +97,7 @@ module Cgraph
|
|
97
97
|
if @no_penwidth
|
98
98
|
options = {}
|
99
99
|
else
|
100
|
-
options = {
|
100
|
+
options = {style: calc_penwidth(conn[1][:count])}
|
101
101
|
end
|
102
102
|
|
103
103
|
graph.add_edges tupel[0],tupel[1],options
|
@@ -106,10 +106,10 @@ module Cgraph
|
|
106
106
|
end
|
107
107
|
def calc_penwidth(count)
|
108
108
|
case count
|
109
|
-
when
|
110
|
-
when
|
109
|
+
when 4..10 then 'dashed'
|
110
|
+
when 11..1000 then 'solid'
|
111
111
|
else
|
112
|
-
|
112
|
+
'dotted'
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|