require 'gviz' class String def normalize_gviz_id self.gsub(/[ _¥(¥)]/, "") end end file = File.open("ruboty_committers", "r:utf-8"){|f|f.read} committers = file.each_line.map(&:chomp).map(&:normalize_gviz_id).reverse.map.with_index(1){|e, i|"#{e}#{i}"} committers.unshift("start") committers.push("goal") Graph do committers.each_slice(2) do |a, b| break if b.nil? edge :"#{a}_#{b}" end save :sample