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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96b860730518abd99eb79c2d9b847fc6b4b13d5c
4
- data.tar.gz: 95635f8ef60cce43ff1b92e7800e749ef1666659
3
+ metadata.gz: 01bb98e6648417d1174cc6af160fd6b50dc3607e
4
+ data.tar.gz: 924eb163e9684733fd2e1b15437eb72b9dfd29ee
5
5
  SHA512:
6
- metadata.gz: 5742cdbaecdfae7a0dac68f377331b96ee1200ca469e4317a647ec4fb23710520afd46051468ce9509ba81952c508cbb12dccc50323f35c00aa75d2c6f20df43
7
- data.tar.gz: f6602ad5b6a9e9e07e052e779727b9a8f24abc267443af2e9902f6536dcb99b430841f1d72e8ea62b2edfa20b789740675326c6a2499ce4e5bdd35a9a117f61a
6
+ metadata.gz: f56c29b39057df6d4e5c8a7ac298166cac1c97bef6daff5b19d756abe67e0a22bc17b108783e430b294e423976e606c527f794aa5b5c68de4ce7dc2eb204dc62
7
+ data.tar.gz: cc8561780e6f8ae46194f18adbad60799635e739d94b7606cbe22499eba534cff3cea9b2d319d506a247e886365f90773410d0f98b68d60aa28c75c527901010
@@ -1,3 +1,3 @@
1
1
  module Solve
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -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.0
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-07-31 00:00:00.000000000 Z
13
+ date: 2013-08-28 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: A Ruby version constraint solver
16
16
  email: