A constraint solver for Ruby
Pull request Compare This branch is 213 commits behind berkshelf:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rbenv-version
.travis.yml
Gemfile
Guardfile
LICENSE
README.md
Thorfile
solve.gemspec

README.md

Solve

Build Status Dependency Status Code Climate

A Ruby versioning constraint solver implementing Semantic Versioning 2.0.0-rc.1.

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-alpha.1").depends("openssl", "~> 1.0.0")

Dependencies can be chained, too

graph.artifacts("ntp", "1.0.0").depends("build-essential").depends("yum")

And now solve the graph with some demands

Solve.it!(graph, ['nginx', '>= 0.100.0'])

Removing an artifact, or dependency from the graph

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

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

Authors

Author:: Jamie Winsor (jamie@vialstudios.com) Author:: Andrew Garson (andrew.garson@gmail.com)

Contributors

Thibaud Guillaume-Gentil (@thibaudgg)