solve 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solve/gem_version.rb +1 -1
- data/lib/solve/solver.rb +1 -0
- data/spec/acceptance/solutions_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01bb98e6648417d1174cc6af160fd6b50dc3607e
|
4
|
+
data.tar.gz: 924eb163e9684733fd2e1b15437eb72b9dfd29ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f56c29b39057df6d4e5c8a7ac298166cac1c97bef6daff5b19d756abe67e0a22bc17b108783e430b294e423976e606c527f794aa5b5c68de4ce7dc2eb204dc62
|
7
|
+
data.tar.gz: cc8561780e6f8ae46194f18adbad60799635e739d94b7606cbe22499eba534cff3cea9b2d319d506a247e886365f90773410d0f98b68d60aa28c75c527901010
|
data/lib/solve/gem_version.rb
CHANGED
data/lib/solve/solver.rb
CHANGED
@@ -260,6 +260,7 @@ module Solve
|
|
260
260
|
|
261
261
|
def add_dependencies(dependencies, source)
|
262
262
|
dependencies.each do |dependency|
|
263
|
+
next if (source.respond_to?(:name) && dependency.name == source.name)
|
263
264
|
Solve.tracer.add_constraint(dependency, source)
|
264
265
|
variable_table.add(dependency.name, source)
|
265
266
|
constraint_table.add(dependency, source)
|
@@ -114,6 +114,19 @@ describe "Solutions" do
|
|
114
114
|
"D" => "1.0.0")
|
115
115
|
end
|
116
116
|
|
117
|
+
it "fails with a self dependency" do
|
118
|
+
graph = Solve::Graph.new
|
119
|
+
|
120
|
+
graph.artifacts("bottom", "1.0.0")
|
121
|
+
graph.artifacts("middle", "1.0.0").depends("top", "= 1.0.0").depends("middle")
|
122
|
+
|
123
|
+
demands = [["bottom", "1.0.0"],["middle", "1.0.0"]]
|
124
|
+
|
125
|
+
expect { Solve.it!(graph, demands, { :sorted => true } ) }.to raise_error { |error|
|
126
|
+
error.should be_a(Solve::Errors::NoSolutionError)
|
127
|
+
}
|
128
|
+
end
|
129
|
+
|
117
130
|
it "gives an empty solution when there are no demands" do
|
118
131
|
graph = Solve::Graph.new
|
119
132
|
result = Solve.it!(graph, [])
|
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: 0.8.
|
4
|
+
version: 0.8.1
|
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: 2013-
|
13
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: A Ruby version constraint solver
|
16
16
|
email:
|