rudelo 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -47,7 +47,7 @@ module Rudelo
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def matches?(cell, value)
|
50
|
-
puts "\n matches? `#{cell}` => `#{value}`"
|
50
|
+
# puts "\n matches? `#{cell}` => `#{value}`"
|
51
51
|
return false unless force || can_match?(cell)
|
52
52
|
evaluator = ast(cell)
|
53
53
|
return return_on_cant_match if evaluator.nil?
|
data/lib/rudelo/version.rb
CHANGED
@@ -23,6 +23,11 @@ describe "Rudelo::Matchers::SetLogic" do
|
|
23
23
|
expect(subject.matches?(cell2, 'a,b,c')).to eq(:break)
|
24
24
|
end
|
25
25
|
|
26
|
+
it "matches explicit set syntax" do
|
27
|
+
expect(subject.matches?('$(a, b, c)', 'a,b,c')).to be_true
|
28
|
+
expect(subject.matches?('$(a, b, c)', 'a,b,d')).to eq(:break)
|
29
|
+
end
|
30
|
+
|
26
31
|
context "rufus-decision" do
|
27
32
|
let(:table){
|
28
33
|
table = Rufus::Decision::Table.new(%{
|
@@ -141,6 +141,8 @@ describe "Rudelo::Parsers::SetLogicParser" do
|
|
141
141
|
it "parses a set logic expression with optional cardinality" do
|
142
142
|
expect(expr_parser).to parse('$(bob, jeff) <= $in', trace: true)
|
143
143
|
expect(expr_parser).to parse('$(bob, jeff) <= $in #> 3', trace: true)
|
144
|
+
expect(expr_parser).to parse('$in intersection $(Differentiation Kit, Human Embryonic Progenitor Package, Growth Media, Basal Media) #> 0', trace: true)
|
145
|
+
|
144
146
|
end
|
145
147
|
|
146
148
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rudelo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rufus-decision
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash: -
|
139
|
+
hash: -1336408223698741406
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash: -
|
148
|
+
hash: -1336408223698741406
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
151
|
rubygems_version: 1.8.25
|