grimoire 0.2.14 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/grimoire.gemspec +1 -0
- data/lib/grimoire/solver.rb +15 -6
- data/lib/grimoire/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c9a17a38a635dd8381968dfe601ba977b446a44
|
4
|
+
data.tar.gz: 053725154fb8bb735e6b2732b8de1192cbc32651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d54699457032f23745a65e9c261c289e6887524e63f9bdba932296900de3a9170b44f157ff7fc3841495c861d2ac01c9f565b87f2af03fb7c55d6dc675a45b1
|
7
|
+
data.tar.gz: 3d00dc2abf2326224e93697124e7d4b3ffd9963f6be46c8f7030bf60cd2d2c3d31772e024b2a8997577580a5c4c30d780cdf4afc995606e1e49f11d1e083a02c
|
data/CHANGELOG.md
CHANGED
data/grimoire.gemspec
CHANGED
@@ -14,5 +14,6 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.add_runtime_dependency 'attribute_struct', '>= 0.1.12', '< 0.5'
|
15
15
|
s.add_development_dependency 'minitest'
|
16
16
|
s.add_development_dependency 'pry'
|
17
|
+
s.add_development_dependency 'rake', '~> 10'
|
17
18
|
s.files = Dir['{lib}/**/**/*'] + %w(grimoire.gemspec README.md CHANGELOG.md CONTRIBUTING.md LICENSE)
|
18
19
|
end
|
data/lib/grimoire/solver.rb
CHANGED
@@ -254,12 +254,21 @@ module Grimoire
|
|
254
254
|
deps.compact!
|
255
255
|
u_dep
|
256
256
|
end.compact.map do |u_dep| # validator
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
257
|
+
existing_collection = deps.find_all do |d|
|
258
|
+
d.name == u_dep.name
|
259
|
+
end
|
260
|
+
existing_requirements = deps.map do |d|
|
261
|
+
d.dependencies.find_all do |d_dep|
|
262
|
+
d_dep.name == u_dep.name
|
263
|
+
end
|
264
|
+
end.flatten.compact.map(&:requirement)
|
265
|
+
existing_collection.each do |existing|
|
266
|
+
([u_dep.requirement] + existing_requirements).each do |req|
|
267
|
+
unless(req.satisfied_by?(existing.version))
|
268
|
+
deps.delete(existing)
|
269
|
+
reset_queue(u_dep.name)
|
270
|
+
raise Error::ResolutionPathInvalid.new("Unit <#{existing.inspect}> does not satisfy <#{req.inspect}>")
|
271
|
+
end
|
263
272
|
end
|
264
273
|
end
|
265
274
|
end
|
data/lib/grimoire/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grimoire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bogo
|
@@ -78,6 +78,20 @@ dependencies:
|
|
78
78
|
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: rake
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '10'
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - "~>"
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '10'
|
81
95
|
description: Specialized constraint solver allowing weighted results
|
82
96
|
email: code@chrisroberts.org
|
83
97
|
executables: []
|