statsig 2.5.3 → 2.5.4
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 +10 -16
- 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: 18141eb6b0169f1e1f2a1cb9fac6a249b49c422bab8ced2c7dc09de0a023c2ce
|
4
|
+
data.tar.gz: 7328411125b434f4e90c8e9900f2f6a9cd5fb811a9089ed677e3cf248f23bb73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a022ec077aa7ae5e661add0ba003cca65b74521de6f2da467322913a267a47376c2e6a52474b97bab634be0a00e7a0a0cbc9d385a8b8718f3478a46d28fc4045
|
7
|
+
data.tar.gz: b33efac15e9d651b47140fdeb299188fd0df2a23865014de309f13178e33f11363da0bf766c08b7b8ec2f941984d800929e1ed69b7543286a89e7f7aeecc5bbd
|
@@ -31,7 +31,6 @@ module Statsig
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def self.to_response(config_name, config_spec, evaluator, user, client_sdk_key, hash_algo, include_exposures, include_local_overrides)
|
34
|
-
config_name_str = config_name.to_s
|
35
34
|
category = config_spec[:type]
|
36
35
|
entity_type = config_spec[:entity]
|
37
36
|
if entity_type == Const::TYPE_SEGMENT || entity_type == Const::TYPE_HOLDOUT
|
@@ -47,6 +46,7 @@ module Statsig
|
|
47
46
|
end
|
48
47
|
end
|
49
48
|
|
49
|
+
config_name_str = config_name.to_s
|
50
50
|
if local_override.nil?
|
51
51
|
eval_result = ConfigResult.new(
|
52
52
|
name: config_name,
|
@@ -124,14 +124,6 @@ module Statsig
|
|
124
124
|
|
125
125
|
result[:is_in_layer] = true
|
126
126
|
result[:explicit_parameters] = config_spec[:explicitParameters] || []
|
127
|
-
|
128
|
-
layer_name = evaluator.spec_store.experiment_to_layer[config_name]
|
129
|
-
if layer_name.nil? || evaluator.spec_store.layers[layer_name].nil?
|
130
|
-
return
|
131
|
-
end
|
132
|
-
|
133
|
-
layer = evaluator.spec_store.layers[layer_name]
|
134
|
-
result[:value] = layer[:defaultValue].merge(result[:value])
|
135
127
|
end
|
136
128
|
|
137
129
|
def self.populate_layer_fields(config_spec, eval_result, result, evaluator, hash_algo, include_exposures)
|
@@ -153,13 +145,15 @@ module Statsig
|
|
153
145
|
end
|
154
146
|
|
155
147
|
def self.hash_name(name, hash_algo)
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
148
|
+
Statsig::Memo.for_global(:hash_name, "#{hash_algo}|#{name}") do
|
149
|
+
case hash_algo
|
150
|
+
when Statsig::Const::NONE
|
151
|
+
name
|
152
|
+
when Statsig::Const::DJB2
|
153
|
+
Statsig::HashUtils.djb2(name)
|
154
|
+
else
|
155
|
+
Statsig::HashUtils.sha256(name)
|
156
|
+
end
|
163
157
|
end
|
164
158
|
end
|
165
159
|
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.4
|
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-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|