rakelib/dep_graph.rake in rgl-0.4.0 vs rakelib/dep_graph.rake in rgl-0.5.0
- old
+ new
@@ -11,20 +11,21 @@
#
# rake -R/home/hd/src/rgl/rakelib -f /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/Rakefile dep_graph
desc "Generate dependency graph of rake tasks"
task :dep_graph do |task|
this_task = task.name
- dep = RGL::ImplicitGraph.new { |g|
+
+ dep = RGL::ImplicitGraph.new do |g|
# vertices of the graph are all defined tasks without this task
- g.vertex_iterator do |b|
+ g.vertex_iterator do |b|
Rake::Task.tasks.each do |t|
b.call(t) unless t.name == this_task
end
end
# neighbors of task t are its prerequisites
g.adjacent_iterator { |t, b| t.prerequisites.each(&b) }
g.directed = true
- }
+ end
dep.write_to_graphic_file('png', this_task)
puts "Wrote dependency graph to #{this_task}.png."
end