durable_rules 2.0.8 → 2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/src/rules/events.c +24 -22
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b58413e6f3ee72373f5490fcf8f7305de2ca8294
4
- data.tar.gz: 2bc9023959fb727e2dacb39b4678ff131c5745dc
3
+ metadata.gz: cfa1e57dda8143326832f1c3fda960c12f1c86b5
4
+ data.tar.gz: f448dd2fe6abcbb32f56f33e33f3048e4ab0fb10
5
5
  SHA512:
6
- metadata.gz: 1e80b5169aad8a21db8657c5e9b581d3f5376f8b53d198995a4d509c5cb8d6e15b052cd6fe4786e2ba684f0b49bc290e45ec68182f7df7bc43a6770c9b76117c
7
- data.tar.gz: ca93ea86c60fe1fb1decea6aa81ebda80ba153d5167a35032d159eff56e03be85e9c2631f6ccd658b23e22b1b311fa634af69a644fe1c102a2bc5cc3962197e5
6
+ metadata.gz: 7d58e95f7a9364dc84a1296c6db45fcefbabcf4c54e01c904e2d41722a482ae4d384ebaaaa1b9ff3f9a91c4396fb26c8126ac3be3a1c7c1041bc682156ab3d01
7
+ data.tar.gz: ee9107a906fe6e38519d43805a7a790406d6e677aba8a4074a27c6fd4d98bb92b07960296f3a22d76f59247861b4c5d387082eac2f2997711af9ba45c191fb01
@@ -1558,31 +1558,33 @@ static unsigned int isArrayMatch(ruleset *tree,
1558
1558
  for(unsigned int propertyIndex = 0; propertyIndex < jo.propertiesLength; ++propertyIndex) {
1559
1559
  jsonProperty *currentProperty = &jo.properties[propertyIndex];
1560
1560
  for (unsigned int entry = currentProperty->hash & HASH_MASK; nextHashset[entry] != 0; entry = (entry + 1) % NEXT_BUCKET_LENGTH) {
1561
- node *hashNode = &tree->nodePool[nextHashset[entry]];
1562
- if (hashNode->value.a.expression.operator == OP_IALL || hashNode->value.a.expression.operator == OP_IANY) {
1563
- CHECK_RESULT(isArrayMatch(tree,
1564
- &jo,
1565
- currentProperty,
1566
- &hashNode->value.a,
1567
- propertyMatch));
1568
- } else {
1569
- CHECK_RESULT(isAlphaMatch(tree,
1570
- &hashNode->value.a,
1571
- &jo,
1572
- propertyMatch));
1573
- }
1561
+ node *hashNode = &tree->nodePool[nextHashset[entry]];
1562
+ if (currentProperty->hash == hashNode->value.a.expression.left.value.id.propertyNameHash) {
1563
+ if (hashNode->value.a.expression.operator == OP_IALL || hashNode->value.a.expression.operator == OP_IANY) {
1564
+ CHECK_RESULT(isArrayMatch(tree,
1565
+ &jo,
1566
+ currentProperty,
1567
+ &hashNode->value.a,
1568
+ propertyMatch));
1569
+ } else {
1570
+ CHECK_RESULT(isAlphaMatch(tree,
1571
+ &hashNode->value.a,
1572
+ &jo,
1573
+ propertyMatch));
1574
+ }
1574
1575
 
1575
- if (*propertyMatch && hashNode->value.a.nextOffset) {
1576
- CHECK_RESULT(isNextMatch(tree,
1577
- &jo,
1578
- &hashNode->value.a,
1579
- propertyMatch));
1576
+ if (*propertyMatch && hashNode->value.a.nextOffset) {
1577
+ CHECK_RESULT(isNextMatch(tree,
1578
+ &jo,
1579
+ &hashNode->value.a,
1580
+ propertyMatch));
1580
1581
 
1581
- }
1582
+ }
1582
1583
 
1583
- if (*propertyMatch && (hashNode->value.a.nextOffset || hashNode->value.a.nextListOffset)) {
1584
- break;
1585
- }
1584
+ if (*propertyMatch && (hashNode->value.a.nextOffset || hashNode->value.a.nextListOffset)) {
1585
+ break;
1586
+ }
1587
+ }
1586
1588
  }
1587
1589
  }
1588
1590
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: durable_rules
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesus Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-21 00:00:00.000000000 Z
11
+ date: 2019-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake