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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6212f8c60b2164547104c04af321f94ea6c25786
4
- data.tar.gz: 7e2ddc441bbfa0bf3e4a8af737544c5353fb3430
3
+ metadata.gz: 9c9a17a38a635dd8381968dfe601ba977b446a44
4
+ data.tar.gz: 053725154fb8bb735e6b2732b8de1192cbc32651
5
5
  SHA512:
6
- metadata.gz: 8ce671fae5ed3842110f8b9dc0ed6d0567f6900fdddd763940d3618c468af6caa165eefa50cb8e5fd01a2f9e2287864cba0ba3cfa50e3ac3342fb64529f4b7c6
7
- data.tar.gz: a341c1da2122171235d5af9ad8d4fb8c30010f886883fb4d711236ca1622ff05e2ec3e2352e9340ebc2aae0c7c585b4a94aca80e29c6adf2dd01ab5f17a77555
6
+ metadata.gz: 3d54699457032f23745a65e9c261c289e6887524e63f9bdba932296900de3a9170b44f157ff7fc3841495c861d2ac01c9f565b87f2af03fb7c55d6dc675a45b1
7
+ data.tar.gz: 3d00dc2abf2326224e93697124e7d4b3ffd9963f6be46c8f7030bf60cd2d2c3d31772e024b2a8997577580a5c4c30d780cdf4afc995606e1e49f11d1e083a02c
@@ -1,3 +1,6 @@
1
+ # v0.2.16
2
+ * Fix constraint validator to check full unit collection
3
+
1
4
  # v0.2.14
2
5
  * Relax constraints on dependency libraries
3
6
 
@@ -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
@@ -254,12 +254,21 @@ module Grimoire
254
254
  deps.compact!
255
255
  u_dep
256
256
  end.compact.map do |u_dep| # validator
257
- existing = deps.detect{|d| d.name == u_dep.name}
258
- if(existing)
259
- unless(u_dep.requirement.satisfied_by?(existing.version))
260
- deps.delete(existing)
261
- reset_queue(u_dep.name)
262
- raise Error::ResolutionPathInvalid.new("Unit <#{existing.inspect}> does not satisfy <#{u_dep.inspect}>")
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
@@ -1,4 +1,4 @@
1
1
  module Grimoire
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.2.14')
3
+ VERSION = Gem::Version.new('0.2.16')
4
4
  end
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.14
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 00:00:00.000000000 Z
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: []