Thanks to visit codestin.com
Credit goes to github.com

Skip to content

capoferro/solve

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solve

A Ruby constraint solver

Installation

$ gem install solve

Usage

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)

Removing an artifact, demand, or dependency

graph.artifacts("nginx", "1.0.0").delete

graph.demands('nginx', '>= 0.100.0').delete

artifact.dependencies("nginx", "~> 1.0.0").delete

Authors

Author:: Jamie Winsor ([email protected])

Copyright 2012 Jamie Winsor

About

A Ruby constraint solver

Resources

License

Stars

Watchers

Forks

Packages

No packages published