statsig 1.24.0 → 1.24.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spec_store.rb +4 -3
  3. data/lib/statsig.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0f95c8f4ce514c74570b095d81959705153201640821ba25179d24cd34ed4ec
4
- data.tar.gz: c162910dc417b4f7311d91665d7240956a2eb1b58040050503bb8bb22b19cf12
3
+ metadata.gz: 5fe02a7e436da6cb4568a0813914c9d2d31c70b7dd55497fbb77577d7792dffd
4
+ data.tar.gz: 642c10f84b32af9e5065b77e9ff2dd95410fc8c8b60d497e78c814464ce157c1
5
5
  SHA512:
6
- metadata.gz: b1e085f8fbdcfb6020060f331b53767a68bda85f24669b6f710701ca0e9562ff4ca2fa873cce2a0917f48e64767f87c1489e1c792b695933c31a7ed8b71efd17
7
- data.tar.gz: 9cf5e1ead6e76546d24d6042b2fe5f7dcbc5d1f9eae5423b4c7bca839174c1c8992d4c04ce61e21b53162872c99a619f86ea2b8c01f3d8485d9a35b67bcdf2e9
6
+ metadata.gz: 5c97dbcd694bc0a3b95ecf9ff2756c94421bee43e0e4029062acae707c446f0b9b88255d30feb6d7a05b4b3bcf710d8db59c079c030f2ab6cd5e946409fa5568
7
+ data.tar.gz: d4431371a48f9b54deb9ea2ceb9e8ce01fb6840de9952cee26006bd900bd9981aac54cfe58a9cd5e80e05bf101ef6cbf2233320b3b0a8d6f0ae778d802faa14c
data/lib/spec_store.rb CHANGED
@@ -199,7 +199,7 @@ module Statsig
199
199
  unless response.nil?
200
200
  init_diagnostics&.mark("download_config_specs", "start", "process")
201
201
 
202
- if process_specs(response.body)
202
+ if process_specs(response.body.to_s)
203
203
  @init_reason = EvaluationReason::NETWORK
204
204
  @rules_updated_callback.call(response.body.to_s, @last_config_sync_time) unless response.body.nil? or @rules_updated_callback.nil?
205
205
  end
@@ -272,11 +272,11 @@ module Statsig
272
272
  get_id_lists_from_network(init_diagnostics)
273
273
  end
274
274
 
275
- def save_id_lists_to_adapter(id_lists)
275
+ def save_id_lists_to_adapter(id_lists_raw_json)
276
276
  if @options.data_store.nil?
277
277
  return
278
278
  end
279
- @options.data_store.set(Interfaces::IDataStore::CONFIG_SPECS_KEY, JSON.generate(id_lists))
279
+ @options.data_store.set(Interfaces::IDataStore::ID_LISTS_KEY, id_lists_raw_json)
280
280
  end
281
281
 
282
282
  def get_id_lists_from_network(init_diagnostics = nil)
@@ -290,6 +290,7 @@ module Statsig
290
290
  begin
291
291
  server_id_lists = JSON.parse(response)
292
292
  process_id_lists(server_id_lists, init_diagnostics)
293
+ save_id_lists_to_adapter(response)
293
294
  rescue
294
295
  # Ignored, will try again
295
296
  end
data/lib/statsig.rb CHANGED
@@ -227,7 +227,7 @@ module Statsig
227
227
  def self.get_statsig_metadata
228
228
  {
229
229
  'sdkType' => 'ruby-server',
230
- 'sdkVersion' => '1.24.0',
230
+ 'sdkVersion' => '1.24.3',
231
231
  }
232
232
  end
233
233
 
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.24.0
4
+ version: 1.24.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Statsig, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-20 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler