Sha256: 4a7b66afa23ff9e7839fc8ee28edf2f55258e164605e620093292e7c42c0c694
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
# Solve [](http://badge.fury.io/rb/solve) [](http://travis-ci.org/berkshelf/solve) A Ruby versioning constraint solver implementing [Semantic Versioning 2.0.0](http://semver.org). ## 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']) Or, if you want a topologically sorted solution NOTE: This will raise Solve::Errors::UnsortableSolutionError if the solution contains a cycle (which can happen with ruby packages) Solve.it!(graph, ['nginx', '>= 0.100.0'], sorted: true) ### Removing an artifact, or dependency from the graph graph.artifacts("nginx", "1.0.0").delete artifact.dependencies("nginx", "~> 1.0.0").delete ## Authors * [Jamie Winsor](https://github.com/reset) (<jamie@vialstudios.com>) * [Andrew Garson](andrewGarson) (<agarson@riotgames.com>) * [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](http://twitter.com/thibaudgg))
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solve-0.8.2 | README.md |