solve 2.0.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -9
- data/README.md +35 -19
- data/lib/solve/version.rb +1 -1
- data/solve.gemspec +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5a2205bf43deacec0b14cc196e58b3643c97aee
|
4
|
+
data.tar.gz: 893b886c7b74606ddfec121f6392ce196957a58f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5809dc6444ded2ed0376d362bea7f9c635a1d2f454dc904440e5e9c805de37407e42c2e643e02eb8aa531489c46471254a1cc5ac3cd7c32ef237fa5be7530f5
|
7
|
+
data.tar.gz: bd838e96806320adcab4fa9d3da1885836cf9d86654c7983fe0e9f486a041a10480b7dbae9cd614ffff39b60d7ed480596da172267b423dbf73aa40e961b88fd
|
data/.travis.yml
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
+
sudo: true
|
1
2
|
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.1
|
3
|
+
cache: bundler
|
5
4
|
|
6
5
|
before_install:
|
7
6
|
- sudo apt-get update
|
@@ -19,11 +18,10 @@ branches:
|
|
19
18
|
|
20
19
|
matrix:
|
21
20
|
include:
|
22
|
-
- rvm: 1.9
|
23
|
-
- rvm: 2.
|
24
|
-
- rvm:
|
25
|
-
|
26
|
-
|
27
|
-
script: "bundle exec thor nogecode_spec"
|
21
|
+
- rvm: 2.1.9
|
22
|
+
- rvm: 2.2.5
|
23
|
+
- rvm: 2.3.1
|
24
|
+
allow_failures:
|
25
|
+
- rvm: 2.3.1
|
28
26
|
|
29
27
|
|
data/README.md
CHANGED
@@ -1,43 +1,52 @@
|
|
1
1
|
# Solve
|
2
|
-
[![Gem Version](http://img.shields.io/gem/v/solve.svg)][gem]
|
3
|
-
[![Build Status](http://img.shields.io/travis/berkshelf/solve.svg)][travis]
|
4
2
|
|
5
|
-
[gem]
|
6
|
-
[travis]: http://travis-ci.org/berkshelf/solve
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/solve.svg)][gem] [![Build Status](http://img.shields.io/travis/berkshelf/solve.svg)][travis]
|
7
4
|
|
8
5
|
A Ruby versioning constraint solver implementing [Semantic Versioning 2.0.0](http://semver.org).
|
9
6
|
|
10
7
|
## Installation
|
11
8
|
|
12
|
-
|
9
|
+
```
|
10
|
+
$ gem install solve
|
11
|
+
```
|
13
12
|
|
14
13
|
## Usage
|
15
14
|
|
16
15
|
Create a new graph
|
17
16
|
|
18
|
-
|
17
|
+
```
|
18
|
+
graph = Solve::Graph.new
|
19
|
+
```
|
19
20
|
|
20
21
|
Add an artifact to the graph
|
21
22
|
|
22
|
-
|
23
|
+
```
|
24
|
+
graph.artifact("nginx", "1.0.0")
|
25
|
+
```
|
23
26
|
|
24
27
|
Now add another artifact that has a dependency
|
25
28
|
|
26
|
-
|
29
|
+
```
|
30
|
+
graph.artifact("mysql", "1.2.4-alpha.1").depends("openssl", "~> 1.0.0")
|
31
|
+
```
|
27
32
|
|
28
33
|
Dependencies can be chained, too
|
29
34
|
|
30
|
-
|
35
|
+
```
|
36
|
+
graph.artifact("ntp", "1.0.0").depends("build-essential").depends("yum")
|
37
|
+
```
|
31
38
|
|
32
39
|
And now solve the graph with some demands
|
33
40
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
NOTE: This will raise Solve::Errors::UnsortableSolutionError if the solution contains a cycle (which can happen with ruby packages)
|
41
|
+
```
|
42
|
+
Solve.it!(graph, [['nginx', '>= 0.100.0']])
|
43
|
+
```
|
38
44
|
|
39
|
-
|
45
|
+
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)
|
40
46
|
|
47
|
+
```
|
48
|
+
Solve.it!(graph, [['nginx', '>= 0.100.0']], sorted: true)
|
49
|
+
```
|
41
50
|
|
42
51
|
### Selecting A Resolver
|
43
52
|
|
@@ -52,18 +61,25 @@ You can set the resolver by calling `Solver.engine=` with the symbol `:ruby` or
|
|
52
61
|
|
53
62
|
The Ruby solver is installed and enabled by default. If you'd like to use the Gecode solver you can do so by installing the dep-selector gem or adding it to your Gemfile:
|
54
63
|
|
55
|
-
|
64
|
+
```
|
65
|
+
$ gem install dep_selector
|
66
|
+
```
|
56
67
|
|
57
68
|
### Increasing the solver's timeout
|
58
69
|
|
59
70
|
By default the solver will wait 30 seconds before giving up on finding a solution. Under certain conditions a graph may be too complicated to solve within the alotted time. To increase the timeout you can set the "SOLVE_TIMEOUT" environment variable to the amount of seconds desired.
|
60
71
|
|
61
|
-
|
72
|
+
```
|
73
|
+
$ export SOLVE_TIMEOUT=60
|
74
|
+
```
|
62
75
|
|
63
76
|
This will set the timeout to 60 seconds instead of the default 30 seconds.
|
64
77
|
|
65
78
|
## Authors
|
66
79
|
|
67
|
-
|
68
|
-
|
69
|
-
|
80
|
+
- [Jamie Winsor](https://github.com/reset) ([jamie@vialstudios.com](mailto:jamie@vialstudios.com))
|
81
|
+
- [Andrew Garson](andrewGarson) ([agarson@riotgames.com](mailto:agarson@riotgames.com))
|
82
|
+
- [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](http://twitter.com/thibaudgg))
|
83
|
+
|
84
|
+
[gem]: https://rubygems.org/gems/solve
|
85
|
+
[travis]: http://travis-ci.org/berkshelf/solve
|
data/lib/solve/version.rb
CHANGED
data/solve.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.name = "solve"
|
15
15
|
s.require_paths = ["lib"]
|
16
16
|
s.version = Solve::VERSION
|
17
|
-
s.required_ruby_version = ">= 1.
|
17
|
+
s.required_ruby_version = ">= 2.1.0"
|
18
18
|
|
19
19
|
s.add_dependency "semverse", "~> 1.1"
|
20
20
|
s.add_dependency "molinillo", "~> 0.4.2"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Winsor
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-03
|
13
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: semverse
|
@@ -152,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
153
153
|
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
version: 1.
|
155
|
+
version: 2.1.0
|
156
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
158
|
- - ">="
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.6.
|
163
|
+
rubygems_version: 2.6.6
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: A Ruby version constraint solver implementing Semantic Versioning 2.0.0-rc.1
|
@@ -179,4 +179,3 @@ test_files:
|
|
179
179
|
- spec/unit/solve/ruby_solver_spec.rb
|
180
180
|
- spec/unit/solve/solver/serializer_spec.rb
|
181
181
|
- spec/unit/solve_spec.rb
|
182
|
-
has_rdoc:
|