splitclient-rb 8.0.1 → 8.1.0

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: 469500866a927df2b947b88009b0db9fa5e0adc626196ea6590f29fb2f39ed2b
4
- data.tar.gz: 8598e211fe2888ce149767915d6fadb419a17ecd85a73e91f6de1bf01c55b7c3
3
+ metadata.gz: e304e437ef6cbdc7601d4ac6cd5742703c1baf015a86b3d7ef5b6958d3a3e867
4
+ data.tar.gz: 13f206da6a357e65c6cbaefca0b90fb6a23fe813a80c64a6c4eef17f5cd1591b
5
5
  SHA512:
6
- metadata.gz: c35f6e581f61aa82a95f096d46fb4d664bbac87b7898c4d473b582ccc5aeeae16bf155e439b575911616e6c9f11f08b1bec31af4c99fd9c8bdaa5f90c0d6b284
7
- data.tar.gz: d45a2ac342c8ebf309e50bdecbe413b0d146b5b44a25ac785425ec3f68e14cf8949827dc59e5f9b697c5edfd154094d25ee416c531e2de77cab8067347798959
6
+ metadata.gz: 8864034ff26d345e5d0714a4d105ecd85c08d177d0d0c6bd44ecf888676aa392e760790e7d4ec6d2e88d41090c42ff30655263d75f32325923a77256e7e9dc46
7
+ data.tar.gz: 1656f587c406c3828712e0eebc56a80892e57ba26ded821e0184ee532246c44e494af600d0234d2ecfb209e8517a24f2a73eb4c8c2be0f94425fd2420a18b7ff
data/CHANGES.txt CHANGED
@@ -1,5 +1,8 @@
1
1
  CHANGES
2
2
 
3
+ 8.1.0 (Oct 5, 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,23 +310,18 @@ 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
319
-
320
- return :debug if adapter == :redis
321
-
322
314
  case impressions_mode
315
+ when :optimized
316
+ return :optimized
317
+ when :none
318
+ return :none
323
319
  when :debug
324
320
  return :debug
325
- # when :none // we not support :none impression mode yet. Defaulting to :optimized mode
326
- # return :none
327
321
  else
328
- @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
- return :optimized
322
+ default = adapter == :redis ? :debug : :optimized
323
+ @logger.error("You passed an invalid impressions_mode, impressions_mode should be one of the following values: :debug, :optimized or :none. Defaulting to #{default} mode")
324
+ return default
330
325
  end
331
326
  end
332
327
 
@@ -455,7 +450,7 @@ module SplitIoClient
455
450
  end
456
451
 
457
452
  def self.default_features_refresh_rate
458
- 5
453
+ 60
459
454
  end
460
455
 
461
456
  def self.default_segments_refresh_rate
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '8.0.1'
2
+ VERSION = '8.1.0'
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
5
5
  platform: ruby
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-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: allocation_stats