Skip to content

Commit

Permalink
Prettify graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterLambaster authored and indirect committed Sep 13, 2010
1 parent 46914db commit b5ac4de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bundler/graph.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Bundler
class Graph

USER_OPTIONS = {:style => 'filled, bold', :fillcolor => '#cccccc'}.freeze
USER_OPTIONS = {:style => 'filled', :fillcolor => '#B9B9D5'}.freeze

def initialize(env)
@env = env
Expand All @@ -21,7 +21,7 @@ def viz(output_file, show_gem_versions = false, show_dependency_requirements = f
require 'graphviz'
populate

graph_viz = GraphViz::new('Gemfile', {:concentrate => true, :dpi => 65 } )
graph_viz = GraphViz::new('Gemfile', {:concentrate => true, :normalize => true, :nodesep => 0.55})
graph_viz.edge[:fontname] = graph_viz.node[:fontname] = 'Arial, Helvetica, SansSerif'
graph_viz.edge[:fontsize] = 12

Expand All @@ -38,7 +38,7 @@ def viz(output_file, show_gem_versions = false, show_dependency_requirements = f

group_nodes = {}
@groups.each do |name, dependencies|
group_nodes[name] = graph_viz.add_node(name.to_s, { :shape => 'folder', :fontsize => 16 }.merge(USER_OPTIONS))
group_nodes[name] = graph_viz.add_node(name.to_s, { :shape => 'box3d', :fontsize => 16 }.merge(USER_OPTIONS))
dependencies.each do |dependency|
options = { :weight => 2 }
if show_dependency_requirements && (dependency.requirement.to_s != ">= 0")
Expand Down

0 comments on commit b5ac4de

Please sign in to comment.