<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -11,26 +11,33 @@ class PartialDependencies
     @views = nil
   end
   
-  def dot(type = &quot;png&quot;, fn = &quot;partial_dependencies&quot;)
-    IO.popen(&quot;dot -T#{type} -o #{fn}.#{type}&quot;, &quot;w&quot;) do |pipe|
-      pipe.puts dot_input
+  def dot(type = &quot;png&quot;, view_set = &quot;used&quot;, fn = &quot;partial_dependencies&quot;)
+    prog = view_set == &quot;unused&quot; ? &quot;neato&quot; : &quot;dot&quot;
+    IO.popen(&quot;#{prog} -T#{type} -o #{fn}-#{view_set}.#{type}&quot;, &quot;w&quot;) do |pipe|
+      pipe.puts dot_input(view_set)
     end
   end
 
   private
 
-  def dot_input
+  def dot_input(view_set)
+    possible_view_sets = [&quot;used&quot;, &quot;unused&quot;, &quot;all&quot;]
+    unless possible_view_sets.include?(view_set)
+      raise &quot;Wrong view_set. Only #{possible_view_sets.inspect} possible. Was #{view_set.inspect}&quot;
+    end
     str = StringIO.new
     parse_files
     str.puts &quot;digraph partial_dependencies {&quot;
     name_to_node = {}
-    @used_views.each_with_index do |view, index|
+    instance_variable_get(&quot;@#{view_set}_views&quot;).each_with_index do |view, index|
       str.puts &quot;Node#{index} [label=\&quot;#{view}\&quot;]&quot;
       name_to_node[view] = &quot;Node#{index}&quot;
     end
-    @edges.each do |view, partials|
-      partials.each do |partial|
-        str.puts &quot;#{name_to_node[view]}-&gt;#{name_to_node[partial]}&quot;
+    if ([&quot;used&quot;, &quot;all&quot;].include?(view_set))
+      @edges.each do |view, partials|
+        partials.each do |partial|
+          str.puts &quot;#{name_to_node[view]}-&gt;#{name_to_node[partial]}&quot;
+        end
       end
     end
     str.puts &quot;}&quot;
@@ -42,7 +49,9 @@ class PartialDependencies
   def parse_files
     @edges = Hash.new {|hash,key| hash[key] = []}
     @used_views = {}
+    @all_views = []
     views.each do |view|
+      @all_views &lt;&lt; pwfe(view)
       File.open(&quot;#{view[:path]}&quot;) do |contents|
         contents.each do |line|
           if line =~ /=\s*render\s*\(?:partial\s*=&gt;\s*[&quot;'](.*?)[&quot;']/
@@ -60,6 +69,7 @@ class PartialDependencies
       end
     end
     @used_views = @used_views.keys
+    @unused_views = @all_views - @used_views
   end
   
   def pwfe(view)
@@ -77,13 +87,8 @@ end
 
 namespace :partial_dependencies do
   desc &quot;Generate a graphical (PNG) representation of the partial dependencies&quot;
-  task :generate_picture do
-    pd = PartialDependencies.new
-    pd.dot
-  end
-  desc &quot;Generate a SVG representation (same as partial_dependencies:generate_picture apart from output format)&quot;
-  task :generate_svg do
+  task :generate_picture, :file_type, :view_set do |t, args|
     pd = PartialDependencies.new
-    pd.dot(&quot;svg&quot;)
+    pd.dot(args.file_type || &quot;png&quot;, args.view_set || &quot;used&quot;)
   end
 end</diff>
      <filename>tasks/partial_dependencies.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0436344fded3d18476349f6b5dcfc81c84df93cb</id>
    </parent>
    <parent>
      <id>148dfbb46f5be21146105b5bd8666bfb798cc8f0</id>
    </parent>
  </parents>
  <author>
    <name>phinze</name>
    <email>paul.t.hinze@gmail.com</email>
  </author>
  <url>http://github.com/msales/partial_dependencies/commit/2674721ae12148f756cce51402ed237e4d2980ea</url>
  <id>2674721ae12148f756cce51402ed237e4d2980ea</id>
  <committed-date>2009-03-11T06:19:30-07:00</committed-date>
  <authored-date>2009-03-11T06:19:30-07:00</authored-date>
  <message>Merge commit 'msales/master'</message>
  <tree>f99a3a803ed254f22ba1e56b15f537c2f555a756</tree>
  <committer>
    <name>phinze</name>
    <email>paul.t.hinze@gmail.com</email>
  </committer>
</commit>
