wongi-engine 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hgtags +4 -0
- data/CHANGELOG.md +8 -0
- data/lib/wongi-engine/dsl/any_rule.rb +4 -2
- data/lib/wongi-engine/dsl/ncc_subrule.rb +3 -1
- data/lib/wongi-engine/dsl/query.rb +3 -2
- data/lib/wongi-engine/dsl/rule.rb +5 -5
- data/lib/wongi-engine/version.rb +1 -1
- data/spec/rule_specs/ncc_spec.rb +0 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 350acce859cab23d251cb069c921a9497f0b955b
|
4
|
+
data.tar.gz: 0edb71d4019b1864b64b490d0acddc14544252e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4fb91a49af2f799deca113472cfc1de004eeeb580f2f56464a9c3c87dda451bf6f872f68ead62bb6e164d58383d340a9d22ce2f7a37a002a7f0cb266f0e6a4a
|
7
|
+
data.tar.gz: f3aec20c0bcca40506138cc7fef15783c2f98a0af1370c10cb3eb248f29be7d235db606a701752267d859c0076cbb40abb07ba2cfa485483919f7bcd3be77faf
|
data/.hgtags
CHANGED
@@ -4,3 +4,7 @@ accab6252d5746dafe847935ad55f8500594d0cc v0.1.1
|
|
4
4
|
0000000000000000000000000000000000000000 v0.1.1
|
5
5
|
80964eb067a8445980b27e871731ff1274bd7be2 v0.2.1
|
6
6
|
808537c4e3a2defd382fd8f0a662f8850c70aa1f v0.2.2
|
7
|
+
b8b5d5ac7b39ce11d9bb86e61fcb04b227aca02d v0.2.7
|
8
|
+
2b0925ffd7d5c9acc48ffd873abff9a3b6ed66c3 v0.2.8
|
9
|
+
2b0925ffd7d5c9acc48ffd873abff9a3b6ed66c3 v0.2.8
|
10
|
+
5692396d6db5ab9a9b1d26a0f41686124f87de62 v0.2.8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
module Wongi::Engine
|
2
|
-
|
2
|
+
module DSL
|
3
|
+
class AnyRule
|
3
4
|
|
4
5
|
attr_reader :variants
|
5
6
|
|
@@ -22,10 +23,11 @@ module Wongi::Engine
|
|
22
23
|
|
23
24
|
end
|
24
25
|
|
25
|
-
|
26
|
+
class VariantRule < Rule
|
26
27
|
def initialize name = nil
|
27
28
|
super
|
28
29
|
@current_section = :forall
|
29
30
|
end
|
30
31
|
end
|
32
|
+
end
|
31
33
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Wongi::Engine
|
2
|
-
|
2
|
+
module DSL
|
3
|
+
class NccSubrule < Rule
|
3
4
|
|
4
5
|
def initialize name = nil, &block
|
5
6
|
super
|
@@ -12,4 +13,5 @@ module Wongi::Engine
|
|
12
13
|
context.tap { |c| c.ncc_node(self, false) }
|
13
14
|
end
|
14
15
|
end
|
16
|
+
end
|
15
17
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
module Wongi::Engine
|
2
|
-
|
2
|
+
module DSL
|
3
|
+
class Rule
|
3
4
|
|
4
5
|
attr_reader :name
|
5
6
|
|
6
|
-
|
7
|
+
include Generated
|
7
8
|
|
8
9
|
class << self
|
9
10
|
|
@@ -30,7 +31,7 @@ module Wongi::Engine
|
|
30
31
|
def initialize name
|
31
32
|
@name = name
|
32
33
|
@current_section = nil
|
33
|
-
|
34
|
+
Rule.sections.each { |section| acceptors[section] ||= [] }
|
34
35
|
end
|
35
36
|
|
36
37
|
def acceptors
|
@@ -79,6 +80,5 @@ module Wongi::Engine
|
|
79
80
|
|
80
81
|
|
81
82
|
end
|
82
|
-
|
83
|
-
|
83
|
+
end
|
84
84
|
end
|
data/lib/wongi-engine/version.rb
CHANGED
data/spec/rule_specs/ncc_spec.rb
CHANGED
@@ -233,11 +233,6 @@ describe Wongi::Engine::NccNode do
|
|
233
233
|
}
|
234
234
|
}
|
235
235
|
|
236
|
-
File.open "rete.dot", "w" do |io|
|
237
|
-
Wongi::Engine::Graph.new( engine ).dot( io )
|
238
|
-
end
|
239
|
-
|
240
|
-
|
241
236
|
%w( math science english bio ).each { |req| engine << [ req, :is_a, :requirement ] }
|
242
237
|
%w( CourseA CourseB CourseC ).each { |course| engine << [ course, :is_a, :course ] }
|
243
238
|
engine << [ "StudentA", :is_a, :student ]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wongi-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valeri Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|