splitclient-rb 8.3.1 → 8.3.2.pre.rc1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8499a9c444cca9d65f9fc68c76f6072a2457d53c4dbf6cb0b17ee719412f79f
|
4
|
+
data.tar.gz: 5275c99f99855c1959c6dac21a0a9060ca0dbde7b579b6ea503ecaf1e4af92bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfcb9bfaab059299bedf42b8c9e4b92593b04d32963c2207a62bb19665695f2bfaf685064d29a25b1ab107836e534158e6a07feb787a834073ab7c7718072176
|
7
|
+
data.tar.gz: 695324cac37fa3c1ab917d93dfe182be081646c7ad4f93f0430cdabf172fe2339647df26ce7330e70987ce9e9fa864bbd4e0fbe2bfee26e711b225fdb9219f0f
|
@@ -5,7 +5,32 @@ module SplitIoClient
|
|
5
5
|
module Repositories
|
6
6
|
class SplitsRepository < Repository
|
7
7
|
attr_reader :adapter
|
8
|
-
|
8
|
+
DEFAULT_CONDITIONS_TEMPLATE = [{
|
9
|
+
conditionType: "ROLLOUT",
|
10
|
+
matcherGroup: {
|
11
|
+
combiner: "AND",
|
12
|
+
matchers: [
|
13
|
+
{
|
14
|
+
keySelector: nil,
|
15
|
+
matcherType: "ALL_KEYS",
|
16
|
+
negate: false,
|
17
|
+
userDefinedSegmentMatcherData: nil,
|
18
|
+
whitelistMatcherData: nil,
|
19
|
+
unaryNumericMatcherData: nil,
|
20
|
+
betweenMatcherData: nil,
|
21
|
+
dependencyMatcherData: nil,
|
22
|
+
booleanMatcherData: nil,
|
23
|
+
stringMatcherData: nil
|
24
|
+
}]
|
25
|
+
},
|
26
|
+
partitions: [
|
27
|
+
{
|
28
|
+
treatment: "control",
|
29
|
+
size: 100
|
30
|
+
}
|
31
|
+
],
|
32
|
+
label: "unsupported matcher type"
|
33
|
+
}]
|
9
34
|
def initialize(config, flag_sets_repository, flag_set_filter)
|
10
35
|
super(config)
|
11
36
|
@tt_cache = {}
|
@@ -155,6 +180,10 @@ module SplitIoClient
|
|
155
180
|
remove_from_flag_sets(existing_split)
|
156
181
|
end
|
157
182
|
|
183
|
+
if check_undefined_matcher(split)
|
184
|
+
@config.logger.warn("Feature Flag #{split[:name]} has undefined matcher, setting conditions to default template.")
|
185
|
+
split[:conditions] = SplitsRepository::DEFAULT_CONDITIONS_TEMPLATE
|
186
|
+
end
|
158
187
|
if !split[:sets].nil?
|
159
188
|
for flag_set in split[:sets]
|
160
189
|
if !@flag_sets.flag_set_exist?(flag_set)
|
@@ -170,6 +199,18 @@ module SplitIoClient
|
|
170
199
|
@adapter.set_string(namespace_key(".split.#{split[:name]}"), split.to_json)
|
171
200
|
end
|
172
201
|
|
202
|
+
def check_undefined_matcher(split)
|
203
|
+
for condition in split[:conditions]
|
204
|
+
for matcher in condition[:matcherGroup][:matchers]
|
205
|
+
if !SplitIoClient::Condition.instance_methods(false).map(&:to_s).include?("matcher_#{matcher[:matcherType].downcase}")
|
206
|
+
@config.logger.error("Detected undefined matcher #{matcher[:matcherType].downcase} in feature flag #{split[:name]}")
|
207
|
+
return true
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
return false
|
212
|
+
end
|
213
|
+
|
173
214
|
def remove_feature_flag(split)
|
174
215
|
decrease_tt_name_count(split[:trafficTypeName])
|
175
216
|
remove_from_flag_sets(split)
|
@@ -14,8 +14,8 @@ module SplitIoClient
|
|
14
14
|
@telemetry_runtime_producer = telemetry_runtime_producer
|
15
15
|
@status_queue = status_queue
|
16
16
|
@publisher_available = Concurrent::AtomicBoolean.new(true)
|
17
|
-
@publishers_pri = Concurrent::AtomicFixnum.new
|
18
|
-
@publishers_sec = Concurrent::AtomicFixnum.new
|
17
|
+
@publishers_pri = Concurrent::AtomicFixnum.new(2)
|
18
|
+
@publishers_sec = Concurrent::AtomicFixnum.new(2)
|
19
19
|
end
|
20
20
|
|
21
21
|
def handle_incoming_occupancy_event(event)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splitclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.3.
|
4
|
+
version: 8.3.2.pre.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allocation_stats
|
@@ -583,9 +583,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
583
583
|
version: 2.5.0
|
584
584
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
585
585
|
requirements:
|
586
|
-
- - "
|
586
|
+
- - ">"
|
587
587
|
- !ruby/object:Gem::Version
|
588
|
-
version:
|
588
|
+
version: 1.3.1
|
589
589
|
requirements: []
|
590
590
|
rubygems_version: 3.2.3
|
591
591
|
signing_key:
|