A Ruby constraint solver
$ gem install solve
Create a new graph
graph = Graph.new
Add an artifact to the graph
graph.artifacts("nginx", "1.0.0")
Now add another artifact that has a dependency
graph.artifacts("mysql", "1.2.4").depends("openssl", "~> 1.0.0")
Setup some demands
graph.demands('nginx', '>= 0.100.0')
And now solve the graph
Solve.it!(graph)
graph.artifacts("nginx", "1.0.0").delete
graph.demands('nginx', '>= 0.100.0').delete
artifact.dependencies("nginx", "~> 1.0.0").delete
Author:: Jamie Winsor (jamie@vialstudios.com)
Copyright 2012 Jamie Winsor