statsig 2.5.0 → 2.5.1
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 +4 -4
- data/lib/evaluator.rb +8 -5
- data/lib/statsig.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 270fe13b6b756794826634e8256e0ffd19ff1df35c265942e721fe7c81807ac9
|
4
|
+
data.tar.gz: 96d33f20e9df4c35291e88a84a816336f183e70189c0cfb4f6a21ba7859e65b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dff47718c7ea99367818542ce9dd2f5d2825577fc5b74563e6d1bf3c71677c4e524dabed63772981f5c5bd685ec16d22e86bd39b6f75c091b0343fed30fc958f
|
7
|
+
data.tar.gz: 9c3b51ce54bf65e47ae8041a2dc1c8aae17f2a05e166f2c75607fc11bdb93c4b92a42dff9703dff5e0528ebf3fed8c442cb858680dadd276dc3b29692b3dfaa8
|
data/lib/evaluator.rb
CHANGED
@@ -591,19 +591,22 @@ module Statsig
|
|
591
591
|
def eval_rule(user, rule, end_result)
|
592
592
|
pass = true
|
593
593
|
i = 0
|
594
|
-
|
594
|
+
memo = user.get_memo
|
595
595
|
until i >= rule[:conditions].length
|
596
596
|
condition_hash = rule[:conditions][i]
|
597
597
|
condition = @spec_store.get_condition(condition_hash)
|
598
598
|
|
599
599
|
if condition.nil?
|
600
600
|
puts "[Statsig]: Warning - Condition with hash #{condition_hash} could not be found."
|
601
|
-
|
602
|
-
|
601
|
+
result = false
|
602
|
+
elsif condition[:type] == Const::CND_FAIL_GATE || condition[:type] == Const::CND_PASS_GATE
|
603
603
|
result = eval_condition(user, condition, end_result)
|
604
|
-
|
604
|
+
else
|
605
|
+
result = Memo.for(memo, :eval_rule, condition_hash) do
|
606
|
+
eval_condition(user, condition, end_result)
|
607
|
+
end
|
605
608
|
end
|
606
|
-
|
609
|
+
pass = false if result != true
|
607
610
|
i += 1
|
608
611
|
end
|
609
612
|
|
data/lib/statsig.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: statsig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Statsig, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|