wongi-engine 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42749e9f8fc743ae3e5a96e43d44185446c622c7
4
- data.tar.gz: 55c35cd79c0ea900a27d173b76c4f949750f0f50
3
+ metadata.gz: 2ebefeac4c0e93a0534b98d43ca8b516438cda65
4
+ data.tar.gz: c28584fbb3aefc936b19f2d973812eb05b583c74
5
5
  SHA512:
6
- metadata.gz: 1d1a6fa593a0d293bcb563c8ba0f1388541a12f44f0a7ec8de279a98b8f8cda8faa49a26d514f67f3eaff366e1a889561da0672ec0129a0c466e75ab1e2f1b0b
7
- data.tar.gz: edb677ce97d0a79e986f1646350d6f358569e3ce3d070e92c437ca540b4b23758a990056df6e08c99676e3de6f0e9230808909b67f09f2896e7c5798e99d982e
6
+ metadata.gz: 995e486ab8c10d54999cbe8c42ccf3ae9b4891c1de3b1314a39401309a335d48596a91b43bcff65c581c8f68ca2d1dbaebec8f9079dbd3fe41e2768e413ec234
7
+ data.tar.gz: d4663b88528ed320a2868a458c5fa74f72c94517ffca0e342c9122af55ebbb2ab699651dc8792a0df6bd98662fb618ddc944863b2c0859e32c2e8a6a89e78128
data/README.md CHANGED
@@ -259,8 +259,8 @@ The following matchers are nothing but syntactic sugar for a combination of prim
259
259
  Short for:
260
260
 
261
261
  ```ruby
262
- neg subject, predicate, object, time: -1
263
262
  has subject, predicate, object, time: 0
263
+ neg subject, predicate, object, time: -1
264
264
  ```
265
265
 
266
266
  That is, it passes if the fact was missing in the previous state but exists in the current one. Alias: `added`.
@@ -296,6 +296,8 @@ neg subject, predicate, object, time: -1
296
296
  neg subject, predicate, object, time: 0
297
297
  ```
298
298
 
299
+ Since neg rules cannot introduce new variables, neither can this one.
300
+
299
301
  Alias: `still_missing`.
300
302
 
301
303
  ### Other built-in actions
@@ -446,6 +448,10 @@ The Rete implementation in this library largely follows the outline presented in
446
448
 
447
449
  ## Changelog
448
450
 
451
+ ### 0.0.9
452
+
453
+ * fixed the definition of `asserted` (#16)
454
+
449
455
  ### 0.0.8
450
456
 
451
457
  * preventing the feedback loop introduced in 0.0.7; experimental
@@ -80,8 +80,8 @@ dsl {
80
80
 
81
81
  clause :asserted, :added
82
82
  body { |s, p, o|
83
- missing s, p, o, time: -1
84
83
  has s, p, o, time: 0
84
+ missing s, p, o, time: -1
85
85
  }
86
86
 
87
87
  clause :retracted, :removed
@@ -1,5 +1,5 @@
1
1
  module Wongi
2
2
  module Engine
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data/spec/ruleset_spec.rb CHANGED
@@ -42,8 +42,8 @@ describe Wongi::Engine::Ruleset do
42
42
  end
43
43
 
44
44
  it 'should install creating rules into a rete' do
45
- rete = mock 'rete'
46
-
45
+ rete = double 'rete'
46
+
47
47
  ruleset = Wongi::Engine::Ruleset.new
48
48
  rule = ruleset.rule( 'test-rule' ) { }
49
49
 
data/spec/wme_spec.rb CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Wongi::Engine::WME do
4
4
 
5
5
  def capitalizing_rete
6
- rete = mock 'rete'
6
+ rete = double 'rete'
7
7
  rete.should_receive(:import).with("a").and_return("A")
8
8
  rete.should_receive(:import).with("b").and_return("B")
9
9
  rete.should_receive(:import).with("c").and_return("C")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wongi-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Valeri Sokolov