Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'graph'
require 'psych'
steps = Psych.load(File.read(ARGV[0]))["steps"]
previous_steps = []
digraph do
steps.each do |step|
id = step["id"] || step["name"]
deps = step["waitFor"] || previous_steps
deps.each do |dep|
break if dep == "-"
edge dep, id
end
previous_steps << id
end
save "buildgraph", "png"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.