bump requirement on Ridley ~> 2.0
Refactor graph.rb to use same code.