statsig 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/evaluator.rb +10 -0
- data/lib/network.rb +1 -1
- data/lib/statsig.rb +1 -1
- data/lib/statsig_logger.rb +7 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2536756538598d9f75c2b8920c90b7be1ab91ab05b416aedb5b05f325a6f5fde
|
4
|
+
data.tar.gz: 045e5cc822c2355b5fd4c1cb9386425df3d85930c3f56735f96816b2242ae3a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39494460ee50c89666dad6962a023dc7a954a24d386621855d219789a749e8ae58c40f19f4c8f472c46e5d3df33e28d5e3e05b9e44ccbf6569560353ae34670c
|
7
|
+
data.tar.gz: 24b455140fcd7a4d628ce3780d19ee0ce7824fe41b799f39a015c8cf98f5124796d060f27ff65b353c0c9895fbadb6add845c2b09a3b0d3b2d68c3c8810a30be
|
data/lib/evaluator.rb
CHANGED
@@ -92,6 +92,15 @@ module Statsig
|
|
92
92
|
|
93
93
|
formatter = ClientInitializeHelpers::ResponseFormatter.new(self, user)
|
94
94
|
|
95
|
+
evaluated_keys = {}
|
96
|
+
if user.user_id.nil? == false
|
97
|
+
evaluated_keys['userID'] = user.user_id
|
98
|
+
end
|
99
|
+
|
100
|
+
if user.custom_ids.nil? == false
|
101
|
+
evaluated_keys['customIDs'] = user.custom_ids
|
102
|
+
end
|
103
|
+
|
95
104
|
{
|
96
105
|
"feature_gates" => formatter.get_responses(:gates),
|
97
106
|
"dynamic_configs" => formatter.get_responses(:configs),
|
@@ -99,6 +108,7 @@ module Statsig
|
|
99
108
|
"sdkParams" => {},
|
100
109
|
"has_updates" => true,
|
101
110
|
"generator" => "statsig-ruby-sdk",
|
111
|
+
"evaluated_keys" => evaluated_keys,
|
102
112
|
"time" => 0,
|
103
113
|
}
|
104
114
|
end
|
data/lib/network.rb
CHANGED
@@ -66,7 +66,7 @@ module Statsig
|
|
66
66
|
def post_logs(events)
|
67
67
|
begin
|
68
68
|
json_body = JSON.generate({'events' => events, 'statsigMetadata' => Statsig.get_statsig_metadata})
|
69
|
-
post_helper('log_event', json_body,
|
69
|
+
post_helper('log_event', json_body, 5)
|
70
70
|
rescue
|
71
71
|
end
|
72
72
|
end
|
data/lib/statsig.rb
CHANGED
data/lib/statsig_logger.rb
CHANGED
@@ -94,7 +94,13 @@ module Statsig
|
|
94
94
|
@events = []
|
95
95
|
flush_events = events_clone.map { |e| e.serialize }
|
96
96
|
|
97
|
-
|
97
|
+
if closing
|
98
|
+
@network.post_logs(flush_events)
|
99
|
+
else
|
100
|
+
Thread.new do
|
101
|
+
@network.post_logs(flush_events)
|
102
|
+
end
|
103
|
+
end
|
98
104
|
end
|
99
105
|
|
100
106
|
def maybe_restart_background_threads
|
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: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Statsig, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
158
|
+
rubygems_version: 3.3.11
|
159
159
|
signing_key:
|
160
160
|
specification_version: 4
|
161
161
|
summary: Statsig server SDK for Ruby
|