Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/pod/command/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down