statsig 2.5.1 → 2.5.3
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 +24 -8
- 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: 9d2ed9517e4a8bdddd46fe4f7a143e97a4ad53ad421d2e5f66448b0a88b0c302
|
4
|
+
data.tar.gz: 23d4b29f5d3c8b456368f05a6d6caefab468b3aa5fb63e90ac0b897180619c13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f685c8419d3b2817ff26ed749552981462597ec660b019851e43f4df60ac1b61533df86282d7fb40b6212e328f2443549f9501b91cf9be92b3644233b892dcbc
|
7
|
+
data.tar.gz: 5faf75601f2ceed7bd6056db6fe8a9f646f7150f18f381d85943ad6ff304d5b1ba76757a91e0d28fbbfd25ced2aa3ec830cdd3ed08e19e0f1bdaae9febce9800
|
data/lib/evaluator.rb
CHANGED
@@ -103,6 +103,7 @@ module Statsig
|
|
103
103
|
end
|
104
104
|
|
105
105
|
if @spec_store.init_reason == EvaluationReason::UNINITIALIZED
|
106
|
+
end_result.gate_value = false
|
106
107
|
unless end_result.disable_evaluation_details
|
107
108
|
end_result.evaluation_details = EvaluationDetails.uninitialized
|
108
109
|
end
|
@@ -422,6 +423,7 @@ module Statsig
|
|
422
423
|
|
423
424
|
def unsupported_or_unrecognized(config_name, end_result)
|
424
425
|
end_result.rule_id = Const::EMPTY_STR
|
426
|
+
end_result.gate_value = false
|
425
427
|
|
426
428
|
if end_result.disable_evaluation_details
|
427
429
|
return
|
@@ -592,20 +594,34 @@ module Statsig
|
|
592
594
|
pass = true
|
593
595
|
i = 0
|
594
596
|
memo = user.get_memo
|
597
|
+
|
595
598
|
until i >= rule[:conditions].length
|
596
599
|
condition_hash = rule[:conditions][i]
|
597
|
-
condition = @spec_store.get_condition(condition_hash)
|
598
600
|
|
599
|
-
|
601
|
+
eval_rule_memo = memo[:eval_rule] || {}
|
602
|
+
result = eval_rule_memo[condition_hash]
|
603
|
+
|
604
|
+
if !result.nil?
|
605
|
+
pass = false if result != true
|
606
|
+
i += 1
|
607
|
+
next
|
608
|
+
end
|
609
|
+
|
610
|
+
condition = @spec_store.get_condition(condition_hash)
|
611
|
+
result = if condition.nil?
|
600
612
|
puts "[Statsig]: Warning - Condition with hash #{condition_hash} could not be found."
|
601
|
-
|
602
|
-
elsif condition[:type] == Const::CND_FAIL_GATE || condition[:type] == Const::CND_PASS_GATE
|
603
|
-
result = eval_condition(user, condition, end_result)
|
613
|
+
false
|
604
614
|
else
|
605
|
-
|
606
|
-
|
607
|
-
|
615
|
+
eval_condition(user, condition, end_result)
|
616
|
+
end
|
617
|
+
|
618
|
+
if !@options.disable_evaluation_memoization &&
|
619
|
+
condition && condition[:type] != Const::CND_PASS_GATE && condition[:type] != Const::CND_FAIL_GATE
|
620
|
+
eval_rule_memo[condition_hash] = result
|
608
621
|
end
|
622
|
+
|
623
|
+
memo[:eval_rule] = eval_rule_memo
|
624
|
+
|
609
625
|
pass = false if result != true
|
610
626
|
i += 1
|
611
627
|
end
|
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.3
|
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-06-
|
11
|
+
date: 2025-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|