optimizely-sdk 3.10.0 → 3.10.1
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: f6a2a4abf7984fbba2d78c4c8cf39c39b66d3cd9e2d381b5d0e8ab0cc9ea0324
|
4
|
+
data.tar.gz: 62e9a6d0a44a5d83fcb4f574905cd64873c53d052503d135df6eb83b93c91b41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 807fe5ee0c7ab987ca2e273ea340aace86170295b0746f69b4ca5fb8e4d389093a43f1a8d625efd2e55c29960baa7dbc3b747111bd98bcf7e1e011da753cafff
|
7
|
+
data.tar.gz: 44fa786ddcc047608c8b3cac34c01c7f15822f9f33db0fd9cadedc2b4440a3b6b52177e94708223ae5e16d4ae5b46553e3c1820bb9b083dfcaee889e64ea3e8f
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright 2019-2020, Optimizely and contributors
|
4
|
+
# Copyright 2019-2020, 2022, Optimizely and contributors
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -33,7 +33,7 @@ module Optimizely
|
|
33
33
|
class HTTPProjectConfigManager < ProjectConfigManager
|
34
34
|
# Config manager that polls for the datafile and updated ProjectConfig based on an update interval.
|
35
35
|
|
36
|
-
attr_reader :stopped
|
36
|
+
attr_reader :stopped
|
37
37
|
|
38
38
|
# Initialize config manager. One of sdk_key or url has to be set to be able to use.
|
39
39
|
#
|
@@ -80,8 +80,8 @@ module Optimizely
|
|
80
80
|
@last_modified = nil
|
81
81
|
@skip_json_validation = skip_json_validation
|
82
82
|
@notification_center = notification_center.is_a?(Optimizely::NotificationCenter) ? notification_center : NotificationCenter.new(@logger, @error_handler)
|
83
|
+
@optimizely_config = nil
|
83
84
|
@config = datafile.nil? ? nil : DatafileProjectConfig.create(datafile, @logger, @error_handler, @skip_json_validation)
|
84
|
-
@optimizely_config = @config.nil? ? nil : OptimizelyConfig.new(@config).config
|
85
85
|
@mutex = Mutex.new
|
86
86
|
@resource = ConditionVariable.new
|
87
87
|
@async_scheduler = AsyncScheduler.new(method(:fetch_datafile_config), @polling_interval, auto_update, @logger)
|
@@ -140,6 +140,12 @@ module Optimizely
|
|
140
140
|
@config
|
141
141
|
end
|
142
142
|
|
143
|
+
def optimizely_config
|
144
|
+
@optimizely_config = OptimizelyConfig.new(@config).config if @optimizely_config.nil?
|
145
|
+
|
146
|
+
@optimizely_config
|
147
|
+
end
|
148
|
+
|
143
149
|
private
|
144
150
|
|
145
151
|
def fetch_datafile_config
|
@@ -209,7 +215,9 @@ module Optimizely
|
|
209
215
|
end
|
210
216
|
|
211
217
|
@config = config
|
212
|
-
|
218
|
+
|
219
|
+
# clearing old optimizely config so that a fresh one is generated on the next api call.
|
220
|
+
@optimizely_config = nil
|
213
221
|
|
214
222
|
@notification_center.send_notifications(NotificationCenter::NOTIFICATION_TYPES[:OPTIMIZELY_CONFIG_UPDATE])
|
215
223
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright 2019-2020, Optimizely and contributors
|
4
|
+
# Copyright 2019-2020, 2022, Optimizely and contributors
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -23,7 +23,7 @@ require_relative 'project_config_manager'
|
|
23
23
|
module Optimizely
|
24
24
|
class StaticProjectConfigManager < ProjectConfigManager
|
25
25
|
# Implementation of ProjectConfigManager interface.
|
26
|
-
attr_reader :config
|
26
|
+
attr_reader :config
|
27
27
|
|
28
28
|
def initialize(datafile, logger, error_handler, skip_json_validation)
|
29
29
|
# Looks up and sets datafile and config based on response body.
|
@@ -40,8 +40,13 @@ module Optimizely
|
|
40
40
|
error_handler,
|
41
41
|
skip_json_validation
|
42
42
|
)
|
43
|
+
@optimizely_config = nil
|
44
|
+
end
|
45
|
+
|
46
|
+
def optimizely_config
|
47
|
+
@optimizely_config = OptimizelyConfig.new(@config).config if @optimizely_config.nil?
|
43
48
|
|
44
|
-
@optimizely_config
|
49
|
+
@optimizely_config
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/optimizely/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optimizely-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Optimizely
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -185,7 +185,7 @@ homepage: https://www.optimizely.com/
|
|
185
185
|
licenses:
|
186
186
|
- Apache-2.0
|
187
187
|
metadata: {}
|
188
|
-
post_install_message:
|
188
|
+
post_install_message:
|
189
189
|
rdoc_options: []
|
190
190
|
require_paths:
|
191
191
|
- lib
|
@@ -200,8 +200,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
- !ruby/object:Gem::Version
|
201
201
|
version: '0'
|
202
202
|
requirements: []
|
203
|
-
rubygems_version: 3.
|
204
|
-
signing_key:
|
203
|
+
rubygems_version: 3.0.1
|
204
|
+
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Ruby SDK for Optimizely's testing framework
|
207
207
|
test_files: []
|