grimoire 0.2.6 → 0.2.8

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: 244dbe7852a4c8a6571a1acca74fd4691f2b3b95
4
- data.tar.gz: 8885acc391087a2f00aabbd2afc5cff96bcb7da7
3
+ metadata.gz: 23ee3c9e204511dddfb441e59544963a7b4cf212
4
+ data.tar.gz: e67e4bd46b4a04f64bc4e98670d73dedde02bf22
5
5
  SHA512:
6
- metadata.gz: 53f4a3d269886d731bbe4b624d2fbb5d8111e05dde78bbcc50bfa4d43955ca6f2b3ca6a04f41aef71ba3a0e6e45620c2b29e3465a7c3e72912c7cfd39978e661
7
- data.tar.gz: 760312eebe3756cb1f7353dd78020dccbe87fdea4f93ee60cccbcd87e9a86f38fbc11f653faa8a862cf139a771935dd6dd76e22d2c8ca431e127007cf14a2de8
6
+ metadata.gz: f978498f791d8881bea67c2ca2fd48f6f02c270ea3f4305509f2f3ddd0b3a250db63ba2dc48aab0302b88629265e0e5efa5c963821d325c299b49d284c550389
7
+ data.tar.gz: ebd36c60caf7f9cde62fb62f4de7372ca20555aaeff7d379b594288f56398df3c9a6c2e4954956754ba5e09059db3e7c43b6021da450eee48875e1fdd44f0781
@@ -1,3 +1,6 @@
1
+ # v0.2.8
2
+ * Provide helpful error when world contains no units to satisfy requirement
3
+
1
4
  # v0.2.6
2
5
  * Add support for external constraint set within solver
3
6
  * Allow Solver#requirements to be coerced from Array
@@ -71,6 +71,12 @@ module Grimoire
71
71
  def prune_world!
72
72
  @new_world = System.new
73
73
  requirements.requirements.each do |req|
74
+ unless(world.units[req.name])
75
+ debug "No units available matching requirement name `#{req.name}`! (#{req.inspect})"
76
+ exception = Error::UnitUnavailable.new "No units available for requirement `#{req.name}`"
77
+ exception.unit_name = req.name
78
+ raise exception
79
+ end
74
80
  world.units[req.name].each do |r_unit|
75
81
  begin
76
82
  req_list = RequirementList.new(
@@ -1,4 +1,4 @@
1
1
  module Grimoire
2
2
  # Current library version
3
- VERSION = Gem::Version.new('0.2.6')
3
+ VERSION = Gem::Version.new('0.2.8')
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.6
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.2.2
110
+ rubygems_version: 2.4.8
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Constraint solver