Skip to content

Instantly share code, notes, and snippets.

@cmrd-senya
Last active December 9, 2015 14:59
Show Gist options
  • Save cmrd-senya/797820555dc854d6b05a to your computer and use it in GitHub Desktop.
Save cmrd-senya/797820555dc854d6b05a to your computer and use it in GitHub Desktop.
BEGIN { print"strict digraph G {\n";x = 0}
END { print "}" }
/SGN_DBG/ { if (x > 0) print ";"; x = 1; }
/^\[/ && !/SGN_DBG/ { if (x > 0) print ";"; x = 0; }
{
if (x > 0) {
if($0 ~ /SGN_DBG/)
print "\""$5 $9"\"";
else if ($0 ~ / from /) {
sub(/\"/, "")
sub(/\/home\/user\//, "")
sub(/vendor\/bundle\/ruby\/2\.2\.0\//, "gems_path")
print "-> \""$2 $3"\"";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment