Skip to content

Commit

Permalink
Add task to create a graph of rake dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Jul 31, 2008
1 parent 3197850 commit 58a47f9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -41,8 +41,8 @@ shotgun/lib/subtend/*.d
\#*
.\#*
*.dSYM
/rubinius_tasks.dot

/vm/.deps
/vm/log

attic/externals/syd-parser/pkg
Expand Down
19 changes: 19 additions & 0 deletions rakelib/graph.rake
@@ -0,0 +1,19 @@
task :graph, :exclude do |_, args|
begin
require 'graph'
rescue LoadError
abort 'install ZenHacks'
end

exclude = /#{args[:exclude]}/ if args[:exclude]

graph = Graph.new

Rake::Task.tasks.each do |task|
next if exclude and task.name =~ exclude
graph[task.name] = task.prerequisites
end

open 'rubinius_tasks.dot', 'w' do |io| io << graph end
end

0 comments on commit 58a47f9

Please sign in to comment.