diff --git a/lib/pod/command/dependencies.rb b/lib/pod/command/dependencies.rb index 0cac74c..f412670 100644 --- a/lib/pod/command/dependencies.rb +++ b/lib/pod/command/dependencies.rb @@ -18,6 +18,7 @@ def self.options ['--use-podfile-targets', 'Uses targets from the Podfile'], ['--ranksep', 'If you use --image command this command will be useful. The gives desired rank separation, in inches. Example --ranksep=.75, default .75'], ['--nodesep', 'It is same as [--ranksep] command. Minimum space between two adjacent nodes in the same rank, in inches.Example --nodesep=.25, default .25'], + ['--splines', 'straight lines: https://graphviz.readthedocs.io/en/stable/manual.html#styling'], ['--filter-pattern', 'Filters out subtrees from pods with names matching the specified pattern from the --graphviz and --image output. Example --filter-pattern="Tests"'], ].concat(super) end @@ -37,6 +38,7 @@ def initialize(argv) @use_podfile_targets = argv.flag?('use-podfile-targets', false) @ranksep = argv.option('ranksep', '0.75') @nodesep = argv.option('nodesep', '0.25') + @splines = argv.option('splines', 'ortho') @filter_pattern = argv.option('filter-pattern', nil) super end @@ -129,7 +131,8 @@ def sandbox def graphviz_data @graphviz ||= begin require 'graphviz' - graph = GraphViz::new(output_file_basename, :type => :digraph, :ranksep => @ranksep, :nodesep => @nodesep) + graph = GraphViz::new(output_file_basename, :type => :digraph, :ranksep => @ranksep, :nodesep => @nodesep, :splines => @splines) + graph.node["shape"] = "box" if @use_podfile_targets unless @podspec @@ -213,7 +216,7 @@ def graphviz_image_output end def graphviz_dot_output - graphviz_data.output( :dot => "#{output_file_basename}.gv") + graphviz_data.output( :canon => "#{output_file_basename}.gv") end end