splitclient-rb 7.1.0 → 7.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25448aa0706bb01d755d39f0f37672188323fba39113b46cdbc290547acd4406
4
- data.tar.gz: 2f7504d7b5a5d8ba5721676978aa59a53657a0044652d0e7219660195cd6350e
3
+ metadata.gz: 6d4a66be49c3e76dca3343d6c793662aa700fc46e2370a162bca83197e4afa8e
4
+ data.tar.gz: 0f7ad8697267da9ec9fd022e4d0cea613a8dbc8ccdc467d4eaa778a21985249f
5
5
  SHA512:
6
- metadata.gz: 4bcdd298815c7e9a1c489de12b407de87559714d7da4fe20c6b573cda7938ccb67f279d0b633aefc103b900116991cbdd87f1280d19766869441db62c4b2d38b
7
- data.tar.gz: e59d85956893850f14a1819628d314700e6022d433694fc13ba6f0be88792ea63d09eb35b8386456936d0edc4c8aed150453b041f68c23779b74c441508eebc4
6
+ metadata.gz: ceb49c50e01e0b12bfe0a868f1aacf7703a9938a365d5a0cb37485ef4064ef0c9abf9192428df386fda6f2a39cd151619f1abe616d0c5ae6afc09776f4d3d8b0
7
+ data.tar.gz: b556e373646c4c8e49b5312bb09ea4c13554910c51870a5a5b29681a9dd4caf2ad995f0792b30ce903539df28c3b28a3fc21eba748b4da483f0962b6f41de979
@@ -16,6 +16,7 @@ Metrics/LineLength:
16
16
  - spec/sse/**/*
17
17
  - spec/integrations/**/*
18
18
  - spec/engine/sync_manager_spec.rb
19
+ - spec/engine/auth_api_client_spec.rb
19
20
 
20
21
  Style/BracesAroundHashParameters:
21
22
  Exclude:
@@ -1,3 +1,12 @@
1
+ CHANGES
2
+
3
+ 7.1.2 (Jun 15, 2020)
4
+ - Fixed uninitialized constant LocalhostSplitStore::YAML for console apps.
5
+ - Updated default_streaming_enabled to true.
6
+
7
+ 7.1.1 (May 19, 2020)
8
+ - Updated streaming domain.
9
+
1
10
  7.1.0 (Apr 30, 2020)
2
11
  - Added support for the new Split streaming architecture. When enabled, the SDK will not poll for updates but instead receive notifications every time there's a change in your environments, allowing to process those much quicker. If disabled (default) or in the event of an issue, the SDK will fallback to the known polling mechanism to provide a seamless experience.
3
12
 
@@ -4,6 +4,7 @@ module SplitIoClient
4
4
  module Cache
5
5
  module Stores
6
6
  class LocalhostSplitStore
7
+ require 'yaml'
7
8
  attr_reader :splits_repository
8
9
 
9
10
  def initialize(splits_repository, config, sdk_blocker = nil)
@@ -24,16 +24,18 @@ module SplitIoClient
24
24
 
25
25
  @config.logger.debug("Error connecting to: #{@config.auth_service_url}. Response status: #{response.status}")
26
26
  { push_enabled: false, retry: true }
27
+ rescue StandardError => e
28
+ @config.logger.debug("AuthApiClient error: #{e.inspect}.")
29
+ { push_enabled: false, retry: false }
27
30
  end
28
31
 
29
32
  private
30
33
 
31
34
  def expiration(token_decoded)
32
35
  exp = token_decoded[0]['exp']
36
+ issued_at = token_decoded[0]['iat']
33
37
 
34
- (exp - SplitIoClient::Constants::EXPIRATION_RATE) - Time.now.getutc.to_i unless exp.nil?
35
- rescue StandardError => e
36
- @config.logger.error("Error getting token expiration: #{e.inspect}")
38
+ exp - issued_at - SplitIoClient::Constants::EXPIRATION_RATE
37
39
  end
38
40
 
39
41
  def channels(token_decoded)
@@ -271,11 +271,11 @@ module SplitIoClient
271
271
  attr_accessor :streaming_enabled
272
272
 
273
273
  def self.default_streaming_enabled
274
- false
274
+ true
275
275
  end
276
276
 
277
277
  def self.default_streaming_service_url
278
- 'https://split-realtime.ably.io/event-stream'
278
+ 'https://streaming.split.io/event-stream'
279
279
  end
280
280
 
281
281
  def self.default_auth_service_url
@@ -1,3 +1,3 @@
1
1
  module SplitIoClient
2
- VERSION = '7.1.0'
2
+ VERSION = '7.1.2'
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: 7.1.0
4
+ version: 7.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Split Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: allocation_stats