amplitude-experiment 1.1.0 → 1.1.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: ff36301b51f9c519b85c5361aa6e50e45d0e55738ee6d36e10b3599e6b91b98b
4
- data.tar.gz: 6e03119d4dd2b6f33c4f0ba312043aac2eb688f211cf827a046d90457a40dcdb
3
+ metadata.gz: 1f1a1506a90fa83f40415c6524e7f298ed5173128ff646e11e414f108c8e2f17
4
+ data.tar.gz: 869a2a9b4f6ff51d0bacf68539e2840d6d229dba821c04419edfe90e383cf638
5
5
  SHA512:
6
- metadata.gz: cf4ab1ee2bdc9dc1d40c0b95cbb2a6f4559a7473fa64997045bbb7b0bc9ac3a5c05cc5826a3f411198e3807f41e57de9c491cf44bbe2409c02fd368174d425a5
7
- data.tar.gz: 9fb0b7f55cde6e6e51774b5dc434c8f9ec4707b94a03576636a5bec115c23f4e60d09a93fb855595f41be65b8a9ef0b912c671587df16bbe5587950b267e3a5a
6
+ metadata.gz: bb65907db678517994db78e505f511a9b1d757fe1a9da95a7aa1455e1aae3b830494be51b3b72076fc90d57654f33756c146efd5385a98c79e5b50944962c102
7
+ data.tar.gz: b85101341b8edf212426689aaf23a2ebbed40fc17ab76ca419add6714c6c2a1019438fb05f203ed49037b0552e5e4b1b99cf433ed5ff655e567ffea84915b478
@@ -20,7 +20,7 @@ module AmplitudeExperiment
20
20
  else
21
21
  Logger::INFO
22
22
  end
23
- @fetcher = LocalEvaluationFetcher.new(api_key, @config.debug, @config.server_url)
23
+ @fetcher = LocalEvaluationFetcher.new(api_key, @logger, @config.server_url)
24
24
  raise ArgumentError, 'Experiment API key is empty' if @api_key.nil? || @api_key.empty?
25
25
  end
26
26
 
@@ -5,11 +5,11 @@ module AmplitudeExperiment
5
5
  class LocalEvaluationFetcher
6
6
  FLAG_CONFIG_TIMEOUT = 5000
7
7
 
8
- def initialize(api_key, debug, server_url = 'https://api.lab.amplitude.com')
8
+ def initialize(api_key, logger, server_url = 'https://api.lab.amplitude.com')
9
9
  @api_key = api_key
10
10
  @server_url = server_url
11
- @debug = debug
12
- @http = PersistentHttpClient.get(server_url, { read_timeout: FLAG_CONFIG_TIMEOUT })
11
+ @logger = logger
12
+ @http = PersistentHttpClient.get(server_url, { read_timeout: FLAG_CONFIG_TIMEOUT })
13
13
  end
14
14
 
15
15
  # Fetch local evaluation mode flag configs from the Experiment API server.
@@ -27,7 +27,7 @@ module AmplitudeExperiment
27
27
  response = @http.request(request)
28
28
  raise "flagConfigs - received error response: #{response.code}: #{response.body}" unless response.is_a?(Net::HTTPOK)
29
29
 
30
- @logger.debug("[Experiment] Fetch flag configs: #{response.body}") if @debug
30
+ @logger.debug("[Experiment] Fetch flag configs: #{response.body}")
31
31
  response.body
32
32
  end
33
33
 
@@ -47,7 +47,7 @@ module AmplitudeExperiment
47
47
  raise "flagConfigs - received error response: #{response.code}: #{response.body}" unless response.is_a?(Net::HTTPOK)
48
48
 
49
49
  flag_configs = parse(response.body)
50
- @logger.debug("[Experiment] Fetch flag configs: #{request.body}") if @debug
50
+ @logger.debug("[Experiment] Fetch flag configs: #{request.body}")
51
51
  flag_configs
52
52
  end
53
53
 
@@ -1,3 +1,3 @@
1
1
  module AmplitudeExperiment
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amplitude-experiment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amplitude
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-14 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake