splitclient-rb 8.0.1-java → 8.1.0.pre.rc1-java

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
  SHA1:
3
- metadata.gz: a32ab3387865509e36920b5fdad6628b801d6022
4
- data.tar.gz: 03171c8afda405b04f367c0933be63ecb83ee4d2
3
+ metadata.gz: 94b56b28dcd6009d9449f37727d5f1d04f4a7383
4
+ data.tar.gz: ece8b59ec6f9a453ce6cdd613e9b7a9d6653ce51
5
5
  SHA512:
6
- metadata.gz: 1f1500e87cd4200c7ee7afa7375bb8879116f65a79f1414dc5009f63e12c2f4ff6792bdbb706b4a82dc184e83ecfab2dc3b0fef58fd7184fbed8cafb4d26817a
7
- data.tar.gz: bd8805f46629a25eca16ba1c7d66be129d4649687a4a4248b75735f807dd1af4069bf18be9fafaa58817693ab246b64b4d20c788525432d3496524c53cb1e805
6
+ metadata.gz: eb5efc14d860c845eb3a40d3717b2abfa138f2a1cd9163c6bb91e27fdfdb03cd4435957a2740d2941f836f579d58d119c27da6cce91272207859d17f15560904
7
+ data.tar.gz: d449a63d948099d3cafb182cd848da73b1178972aa837721fdfaa03f376d9d1bd34ecedd04973838808edbd580df42bb0d82af83424b4b544cdbe73bd179b43e
data/CHANGES.txt CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGES
2
2
 
3
+ 8.1.0 (Oct 3, 2022)
4
+ - Added a new impressions mode for the SDK called NONE , to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
5
+
3
6
  8.0.1 (Jul 20, 2022)
4
7
  - Updated dependencies to support faraday > 2.0
5
8
 
@@ -49,9 +52,10 @@ CHANGES
49
52
  - Updated ably error handling.
50
53
 
51
54
  7.2.0 (Sep 25, 2020)
52
- - Added deduplication logic for impressions data.
53
- - Now there are two modes for Impressions when the SDK is in standalone mode, OPTIMIZED (default) that only ships unique impressions and DEBUG for times where you need to send ALL impressions to debug an integration.
54
- - Impression listener remains unchanged and will still get all impressions.
55
+ - Added impressions dedupe logic to avoid sending duplicated impressions:
56
+ - Added `OPTIMIZED` and `DEBUG` modes in order to enabling/disabling how impressions are going to be sent into Split servers,
57
+ - `OPTIMIZED`: will send unique impressions in a timeframe in order to reduce how many times impressions are posted to Split.
58
+ - `DEBUG`: will send every impression generated to Split.
55
59
 
56
60
  7.1.3 (Jul 31, 2020)
57
61
  - Updated rake development dependency to ~> 12.3.3.
@@ -12,7 +12,9 @@ module SplitIoClient
12
12
  end
13
13
 
14
14
  def record_uniques_key(uniques)
15
- formatted = uniques_formatter(uniques)
15
+ return if uniques.nil? || uniques == {}
16
+
17
+ formatted = uniques_formatter(uniques).to_json
16
18
 
17
19
  unless formatted.nil?
18
20
  size = @adapter.add_to_queue(unique_keys_key, formatted)
@@ -30,7 +30,8 @@ module SplitIoClient
30
30
  @unique_keys_tracker.track(split_name, matching_key)
31
31
  else # In OPTIMIZED mode we should track the total amount of evaluations and deduplicate the impressions.
32
32
  impression_data[:pt] = @impression_observer.test_and_set(impression_data)
33
- @impression_counter.inc(split_name, impression_data[:m])
33
+
34
+ @impression_counter.inc(split_name, impression_data[:m]) unless impression_data[:pt].nil?
34
35
  end
35
36
  rescue StandardError => e
36
37
  @config.log_found_exception(__method__.to_s, e)
@@ -310,20 +310,29 @@ module SplitIoClient
310
310
  10
311
311
  end
312
312
 
313
- def self.default_impressions_mode
314
- :optimized
315
- end
316
-
317
313
  def init_impressions_mode(impressions_mode, adapter)
318
- impressions_mode ||= SplitConfig.default_impressions_mode
314
+ if adapter == :redis
315
+ impressions_mode ||= :debug
316
+
317
+ case impressions_mode
318
+ when :optimized
319
+ return :optimized
320
+ when :none
321
+ return :none
322
+ else
323
+ @logger.error('You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug or :optimized. Defaulting to :optimized mode') unless impressions_mode == :optimized
324
+ return :debug
325
+ end
326
+ end
319
327
 
320
328
  return :debug if adapter == :redis
321
329
 
330
+ impressions_mode ||= :optimized
322
331
  case impressions_mode
323
332
  when :debug
324
333
  return :debug
325
- # when :none // we not support :none impression mode yet. Defaulting to :optimized mode
326
- # return :none
334
+ when :none
335
+ return :none
327
336
  else
328
337
  @logger.error('You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug or :optimized. Defaulting to :optimized mode') unless impressions_mode == :optimized
329
338
  return :optimized
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.0.1'
2
+ VERSION = '8.1.0.pre.rc1'
3
3
  end
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.0.1
4
+ version: 8.1.0.pre.rc1
5
5
  platform: java
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2022-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -556,9 +556,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
556
556
  version: 2.5.0
557
557
  required_rubygems_version: !ruby/object:Gem::Requirement
558
558
  requirements:
559
- - - ">="
559
+ - - ">"
560
560
  - !ruby/object:Gem::Version
561
- version: '0'
561
+ version: 1.3.1
562
562
  requirements: []
563
563
  rubyforge_project:
564
564
  rubygems_version: 2.6.14