amplitude-experiment 1.2.3 → 1.2.5

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: be0a173d9b7f4a54d8a800741ff6801d1ba62a64f33b8e8539be84ab5f91303d
4
- data.tar.gz: 4b7afd4ffec350c766f0001c9b6a0a01910d2bba780f034c64dbdcdeaa05b702
3
+ metadata.gz: 39fff5d1285490313a587d9df46b1cf68bb84c5672d9927871ba83b195bbf613
4
+ data.tar.gz: 8f26de2e9de3585d5696646cd384841a732e9c0944520b479dc42ab423f5f168
5
5
  SHA512:
6
- metadata.gz: 9db6116fe99732edb6f15f4e4adb9df4f58ab9fa9ceea9f21c25e54b05bbdc7f1bfbb1cce15b65f53b22896ab0bf5edac4ef1969668fa7ffaf3280be10811551
7
- data.tar.gz: cb6aec3974925f334a7a769ea24fbc67a7060d39ddc697af8f9e2d388da7cde447775440e41c0fa15d9bef921c4e9ead381477cbbdfb5350128ece95455a4a13
6
+ metadata.gz: 96bb141478ceb429381894466cd63fd937ddd8e27d4d5ac4ee4b02ed6bacfef34750f151fbfffbc088fb5562e3ee2aef23e4da9ed8907f591a37a9195fc5e8b9
7
+ data.tar.gz: 631d94a409a81132540504f135b56b2b6ccdfb407e9e11f250486ee9cf6d74e481e5a2dc3e23e652ed07b42abde9ffb9d2cbd9f17e1128c4248b1e55e53e2d61
@@ -88,9 +88,13 @@ module AmplitudeExperiment
88
88
 
89
89
  def run
90
90
  @is_running = true
91
- flags = @fetcher.fetch_v1
92
- @flags_mutex.synchronize do
93
- @flags = flags
91
+ begin
92
+ flags = @fetcher.fetch_v1
93
+ @flags_mutex.synchronize do
94
+ @flags = flags
95
+ end
96
+ rescue StandardError => e
97
+ @logger.error("[Experiment] Flag poller - error: #{e.message}")
94
98
  end
95
99
  @poller_thread = Thread.new do
96
100
  sleep(@config.flag_config_polling_interval_millis / 1000.to_f)
@@ -28,6 +28,10 @@ module AmplitudeExperiment
28
28
  # @return [String, nil] the value of dma
29
29
  attr_accessor :dma
30
30
 
31
+ # Predefined field, must be manually provided
32
+ # @return [String, nil] the value of ip address
33
+ attr_accessor :ip_address
34
+
31
35
  # Predefined field, must be manually provided
32
36
  # @return [String, nil] the value of language
33
37
  attr_accessor :language
@@ -74,6 +78,7 @@ module AmplitudeExperiment
74
78
  # @param [String, nil] city Predefined field, must be manually provided
75
79
  # @param [String, nil] region Predefined field, must be manually provided
76
80
  # @param [String, nil] dma Predefined field, must be manually provided
81
+ # @param [String, nil] ip_address Predefined field, must be manually provided
77
82
  # @param [String, nil] language Predefined field, must be manually provided
78
83
  # @param [String, nil] platform Predefined field, must be manually provided
79
84
  # @param [String, nil] version Predefined field, must be manually provided
@@ -84,7 +89,7 @@ module AmplitudeExperiment
84
89
  # @param [String, nil] carrier Predefined field, must be manually provided
85
90
  # @param [String, nil] library Predefined field, auto populated, can be manually overridden
86
91
  # @param [Hash, nil] user_properties Custom user properties
87
- def initialize(device_id: nil, user_id: nil, country: nil, city: nil, region: nil, dma: nil, language: nil,
92
+ def initialize(device_id: nil, user_id: nil, country: nil, city: nil, region: nil, dma: nil, ip_address: nil, language: nil,
88
93
  platform: nil, version: nil, os: nil, device_manufacturer: nil, device_brand: nil,
89
94
  device_model: nil, carrier: nil, library: nil, user_properties: nil)
90
95
  @device_id = device_id
@@ -93,6 +98,7 @@ module AmplitudeExperiment
93
98
  @city = city
94
99
  @region = region
95
100
  @dma = dma
101
+ @ip_address = ip_address
96
102
  @language = language
97
103
  @platform = platform
98
104
  @version = version
@@ -115,6 +121,7 @@ module AmplitudeExperiment
115
121
  city: @city,
116
122
  region: @region,
117
123
  dma: @dma,
124
+ ip_address: @ip_address,
118
125
  language: @language,
119
126
  platform: @platform,
120
127
  version: @version,
@@ -1,3 +1,3 @@
1
1
  module AmplitudeExperiment
2
- VERSION = '1.2.3'.freeze
2
+ VERSION = '1.2.5'.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.2.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amplitude
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2023-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby