statsig 2.2.1 → 2.2.2
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/client_initialize_helpers.rb +3 -1
- data/lib/config_result.rb +4 -1
- data/lib/evaluator.rb +11 -3
- data/lib/statsig.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24c2882bd3f5fbf4aeaaac8889ec9eff344202c962b655ce5f638b0beb0d4118
|
4
|
+
data.tar.gz: fe2d3822d6ff0fea02710b5c2f07b7ba6ca900cc2b1abc52269b8b0a2e26f585
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723cd162782fcad1dda2858102ea92a21c1b58989e6f8d7a399d64f5f0944bdc044fbfe1aa53110745b4a821779ea8b371963834db9e72e20af4c90f71ede860
|
7
|
+
data.tar.gz: 45c320a711d630d1b25e36094ba1f2007e287457609635dcd6d27ea3ab85e802a85517d62d926cd1108a0f453ba7dd39e4941ff6fea7ead4cdfac605365170ba
|
@@ -51,7 +51,8 @@ module Statsig
|
|
51
51
|
eval_result = ConfigResult.new(
|
52
52
|
name: config_name,
|
53
53
|
disable_evaluation_details: true,
|
54
|
-
disable_exposures: !include_exposures
|
54
|
+
disable_exposures: !include_exposures,
|
55
|
+
include_local_overrides: include_local_overrides
|
55
56
|
)
|
56
57
|
evaluator.eval_spec(config_name_str, user, config_spec, eval_result)
|
57
58
|
else
|
@@ -73,6 +74,7 @@ module Statsig
|
|
73
74
|
result[:value] = eval_result.json_value
|
74
75
|
result[:group] = eval_result.rule_id
|
75
76
|
result[:is_device_based] = id_type.is_a?(String) && id_type.downcase == Statsig::Const::STABLEID
|
77
|
+
result[:passed] = eval_result.gate_value
|
76
78
|
else
|
77
79
|
return nil
|
78
80
|
end
|
data/lib/config_result.rb
CHANGED
@@ -17,6 +17,7 @@ module Statsig
|
|
17
17
|
attr_accessor :disable_evaluation_details
|
18
18
|
attr_accessor :disable_exposures
|
19
19
|
attr_accessor :config_version
|
20
|
+
attr_accessor :include_local_overrides
|
20
21
|
|
21
22
|
def initialize(
|
22
23
|
name:,
|
@@ -33,7 +34,8 @@ module Statsig
|
|
33
34
|
target_app_ids: nil,
|
34
35
|
disable_evaluation_details: false,
|
35
36
|
disable_exposures: false,
|
36
|
-
config_version: nil
|
37
|
+
config_version: nil,
|
38
|
+
include_local_overrides: true
|
37
39
|
)
|
38
40
|
@name = name
|
39
41
|
@gate_value = gate_value
|
@@ -51,6 +53,7 @@ module Statsig
|
|
51
53
|
@disable_evaluation_details = disable_evaluation_details
|
52
54
|
@disable_exposures = disable_exposures
|
53
55
|
@config_version = config_version
|
56
|
+
@include_local_overrides = include_local_overrides
|
54
57
|
end
|
55
58
|
|
56
59
|
def self.from_user_persisted_values(config_name, user_persisted_values)
|
data/lib/evaluator.rb
CHANGED
@@ -381,8 +381,15 @@ module Statsig
|
|
381
381
|
until i >= rule[:conditions].length
|
382
382
|
condition_hash = rule[:conditions][i]
|
383
383
|
condition = @spec_store.get_condition(condition_hash)
|
384
|
-
|
385
|
-
|
384
|
+
|
385
|
+
if condition.nil?
|
386
|
+
puts "[Statsig]: Warning - Condition with hash #{condition_hash} could not be found."
|
387
|
+
pass = false
|
388
|
+
else
|
389
|
+
result = eval_condition(user, condition, end_result)
|
390
|
+
pass = false if result != true
|
391
|
+
end
|
392
|
+
|
386
393
|
i += 1
|
387
394
|
end
|
388
395
|
|
@@ -584,7 +591,8 @@ module Statsig
|
|
584
591
|
end
|
585
592
|
|
586
593
|
def eval_nested_gate(gate_name, user, end_result)
|
587
|
-
check_gate(user, gate_name, end_result, is_nested: true
|
594
|
+
check_gate(user, gate_name, end_result, is_nested: true,
|
595
|
+
ignore_local_overrides: !end_result.include_local_overrides)
|
588
596
|
gate_value = end_result.gate_value
|
589
597
|
|
590
598
|
unless end_result.disable_exposures
|
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.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Statsig, Inc
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -354,7 +354,7 @@ homepage: https://rubygems.org/gems/statsig
|
|
354
354
|
licenses:
|
355
355
|
- ISC
|
356
356
|
metadata: {}
|
357
|
-
post_install_message:
|
357
|
+
post_install_message:
|
358
358
|
rdoc_options: []
|
359
359
|
require_paths:
|
360
360
|
- lib
|
@@ -370,7 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
370
370
|
version: '0'
|
371
371
|
requirements: []
|
372
372
|
rubygems_version: 3.2.33
|
373
|
-
signing_key:
|
373
|
+
signing_key:
|
374
374
|
specification_version: 4
|
375
375
|
summary: Statsig server SDK for Ruby
|
376
376
|
test_files: []
|