predicate 2.3.1 → 2.3.2

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
  SHA256:
3
- metadata.gz: 4dfe13a9bf0be96cb22edabb43b170e58b312787bfb5f7af5e1f23cbf4d99f20
4
- data.tar.gz: f27cd571b7d17b57d4e35cf2001062498e8a8b3b75a76cc9db3bbf235c3786e7
3
+ metadata.gz: '039636282e90c0f484d6747ca27286890152c280dc9a5c7ba1d3fd21aff575f2'
4
+ data.tar.gz: 1ccfa7508aee58a1734ecdb8ae1f4bee5c3c1718d284b04051877bb7dc5d94e2
5
5
  SHA512:
6
- metadata.gz: 2aecdcbadfa7eee6a469ce56f2432cfd9f25cc3f5e4aaae882841d01178d4727ff1289d9bc47fb1ec14d2bb20f6ec4d53b1af4283037b72a3be4842111e56699
7
- data.tar.gz: 96bc8391a261ba1587a146248e5f37947c136f98cdd3352ed50554ea10b8056338355c5a722b87e3df553300a3b6761a19be576d741f6c2d7519f76e3fa25550
6
+ metadata.gz: 6470c50519c4675a6caebebf58767d2ff85b0c43e82ea838a0b042a84400c906a00aa84ec8707c3dfcdb548a8622bc31a333da55d4c8260817eef4d1629dd594
7
+ data.tar.gz: d12feeb814e4e6d5eae9e8fbd5eab71af196bc113ab714e8b2b98583221d79f94b95bb860b681b50999eb1a68b3002c944183a31819860c4d5b7f0f29f4829ba
@@ -15,7 +15,7 @@ class Predicate
15
15
  end
16
16
 
17
17
  def free_variables
18
- @free_variables ||= [ name ]
18
+ @free_variables ||= [ :"#{qualifier}.#{name}" ]
19
19
  end
20
20
 
21
21
  def evaluate(tuple)
@@ -2,7 +2,7 @@ class Predicate
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 3
5
- TINY = 1
5
+ TINY = 2
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
@@ -8,7 +8,7 @@ class Predicate
8
8
  subject{ predicate.and_split(list) }
9
9
 
10
10
  context 'when included' do
11
- let(:list){ [:id, :name] }
11
+ let(:list){ [:"t.id", :name] }
12
12
 
13
13
  it{ should eq([predicate, tautology]) }
14
14
  end
@@ -6,7 +6,7 @@ class Predicate
6
6
 
7
7
  subject{ expr.free_variables }
8
8
 
9
- it{ should eq([:id]) }
9
+ it{ should eq([:"t.id"]) }
10
10
 
11
11
  end
12
12
  end
@@ -38,5 +38,16 @@ class Predicate
38
38
  end
39
39
  end
40
40
 
41
+ context 'when using qualified names' do
42
+ let(:right) { Predicate.coerce(x: 2) }
43
+
44
+ it 'does not mix predicates' do
45
+ l = left.qualify(:p1)
46
+ r = right.qualify(:p2)
47
+ expect(l & r).not_to eql(l)
48
+ end
49
+
50
+ end
51
+
41
52
  end
42
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predicate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sexpr