flagsmith 5.1.0 → 5.3.0
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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +1 -1
- data/lib/flagsmith/engine/features/models.rb +12 -12
- data/lib/flagsmith/engine/mappers/environment.rb +10 -2
- data/lib/flagsmith/engine/mappers/segments.rb +2 -18
- data/lib/flagsmith/sdk/config.rb +15 -1
- data/lib/flagsmith/sdk/event_processor.rb +352 -0
- data/lib/flagsmith/sdk/models/flags.rb +30 -8
- data/lib/flagsmith/version.rb +1 -1
- data/lib/flagsmith.rb +87 -1
- data/renovate.json +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f299cb1871e66890f06f9d889c87efb4c86ac5c46f2ae3fb0ec31cb4c0a3fd9
|
|
4
|
+
data.tar.gz: 2ef2710f183b66e2745f3237a8eef850e586535fd1109a3671cc3c2027231c63
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69ae4cca3593b047e4e534882be4dfd73065c3f84e179d8a5fe1644ed663a8322134d55aafc9d0a7dc3450460691059c9293589e3f8c089a196ff3c57736c8b4
|
|
7
|
+
data.tar.gz: cf9581d4398e4ab476dbf1ca21cf10be896a4173a2d7fe423f2af95a20445de6eea247dfa24e08b9d8b4eb9da752f197b106d5afbf33f2b31c86386f350fdd2b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{".":"5.
|
|
1
|
+
{".":"5.3.0"}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.3.0](https://github.com/Flagsmith/flagsmith-ruby-client/compare/v5.2.0...v5.3.0) (2026-11-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Retry event delivery and flush on close ([#129](https://github.com/Flagsmith/flagsmith-ruby-client/issues/129)) ([5abcc8e](https://github.com/Flagsmith/flagsmith-ruby-client/commit/5abcc8e5bc6a7b7fed6483e5731bc21cae1e3b25))
|
|
9
|
+
|
|
10
|
+
## [5.2.0](https://github.com/Flagsmith/flagsmith-ruby-client/compare/v5.1.0...v5.2.0) (2026-11-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Support `getExperimentFlag`, `trackEvent` and `trackExposure` methods ([#127](https://github.com/Flagsmith/flagsmith-ruby-client/issues/127)) ([670b413](https://github.com/Flagsmith/flagsmith-ruby-client/commit/670b4136f3f198ee7a4ee3c7914f9d44997b919d))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* Serve multivariate segment overrides their variant under local evaluation ([#128](https://github.com/Flagsmith/flagsmith-ruby-client/issues/128)) ([dbb7a83](https://github.com/Flagsmith/flagsmith-ruby-client/commit/dbb7a839168f5155d38aa3d0f018f59f82982a93))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Other
|
|
24
|
+
|
|
25
|
+
* Let Renovate keep updating spec bumps the webhook handler commits to ([#123](https://github.com/Flagsmith/flagsmith-ruby-client/issues/123)) ([a6ccd7f](https://github.com/Flagsmith/flagsmith-ruby-client/commit/a6ccd7f236ebf6804545dab265175cfc38d8a547))
|
|
26
|
+
|
|
3
27
|
## [5.1.0](https://github.com/Flagsmith/flagsmith-ruby-client/compare/v5.0.1...v5.1.0) (2026-10-30)
|
|
4
28
|
|
|
5
29
|
|
data/Gemfile.lock
CHANGED
|
@@ -8,7 +8,7 @@ module Flagsmith
|
|
|
8
8
|
class FeatureState
|
|
9
9
|
include Flagsmith::Engine::Utils::HashFunc
|
|
10
10
|
|
|
11
|
-
attr_reader :feature, :enabled, :django_id, :uuid, :feature_segment
|
|
11
|
+
attr_reader :feature, :enabled, :django_id, :uuid, :feature_segment, :experiment
|
|
12
12
|
attr_accessor :multivariate_feature_state_values
|
|
13
13
|
|
|
14
14
|
def initialize(params = {})
|
|
@@ -19,6 +19,7 @@ module Flagsmith
|
|
|
19
19
|
@feature_state_value = params.fetch(:feature_state_value, nil)
|
|
20
20
|
@uuid = params.fetch(:uuid, SecureRandom.uuid)
|
|
21
21
|
@multivariate_feature_state_values = params.fetch(:multivariate_feature_state_values, [])
|
|
22
|
+
@experiment = params.fetch(:experiment, nil)
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
attr_writer :feature_state_value
|
|
@@ -66,14 +67,12 @@ module Flagsmith
|
|
|
66
67
|
class << self
|
|
67
68
|
def build(json)
|
|
68
69
|
multivariate_feature_state_values = build_multivariate_values(json[:multivariate_feature_state_values])
|
|
69
|
-
attributes = json.slice(:uuid, :enabled, :django_id, :feature_state_value)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
76
|
-
end
|
|
70
|
+
attributes = json.slice(:uuid, :enabled, :django_id, :feature_state_value).merge(
|
|
71
|
+
feature: Flagsmith::Engine::Feature.build(json[:feature]),
|
|
72
|
+
multivariate_feature_state_values: multivariate_feature_state_values,
|
|
73
|
+
experiment: json.dig(:metadata, :experiment)
|
|
74
|
+
)
|
|
75
|
+
attributes[:feature_segment] = Flagsmith::Engine::Features::Segment.new(json[:feature_segment]) unless json[:feature_segment].nil?
|
|
77
76
|
new(**attributes)
|
|
78
77
|
end
|
|
79
78
|
|
|
@@ -113,16 +112,17 @@ module Flagsmith
|
|
|
113
112
|
module Features
|
|
114
113
|
# MultivariateFeatureOptionModel
|
|
115
114
|
class MultivariateOption
|
|
116
|
-
attr_reader :value, :id
|
|
115
|
+
attr_reader :value, :id, :key
|
|
117
116
|
|
|
118
|
-
def initialize(value:, id: nil)
|
|
117
|
+
def initialize(value:, id: nil, key: nil)
|
|
119
118
|
@value = value
|
|
120
119
|
@id = id
|
|
120
|
+
@key = key
|
|
121
121
|
end
|
|
122
122
|
|
|
123
123
|
class << self
|
|
124
124
|
def build(json)
|
|
125
|
-
new(**json.slice(:id, :value))
|
|
125
|
+
new(**json.slice(:id, :value, :key))
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
end
|
|
@@ -26,22 +26,30 @@ module Flagsmith
|
|
|
26
26
|
name: feature_state.feature.name,
|
|
27
27
|
enabled: feature_state.enabled,
|
|
28
28
|
value: feature_state.get_value,
|
|
29
|
-
metadata:
|
|
29
|
+
metadata: build_feature_metadata(feature_state)
|
|
30
30
|
}
|
|
31
31
|
add_variants_to_feature(feature_hash, feature_state)
|
|
32
32
|
add_priority_to_feature(feature_hash, feature_state)
|
|
33
33
|
feature_hash
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# The running experiment a feature state belongs to, if any, is passed through to its flag
|
|
37
|
+
def self.build_feature_metadata(feature_state)
|
|
38
|
+
metadata = { id: feature_state.feature.id }
|
|
39
|
+
metadata[:experiment] = feature_state.experiment if feature_state.experiment
|
|
40
|
+
metadata
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
def self.add_variants_to_feature(feature_hash, feature_state)
|
|
37
44
|
return unless feature_state.multivariate_feature_state_values&.any?
|
|
38
45
|
|
|
39
46
|
feature_hash[:variants] = feature_state.multivariate_feature_state_values.map do |mv|
|
|
40
47
|
{
|
|
41
48
|
value: mv.multivariate_feature_option.value,
|
|
49
|
+
key: mv.multivariate_feature_option.key,
|
|
42
50
|
weight: mv.percentage_allocation,
|
|
43
51
|
priority: mv.id || uuid_to_big_int(mv.mv_fs_value_uuid)
|
|
44
|
-
}
|
|
52
|
+
}.compact
|
|
45
53
|
end
|
|
46
54
|
end
|
|
47
55
|
|
|
@@ -26,24 +26,8 @@ module Flagsmith
|
|
|
26
26
|
}
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
def self.build_overrides(feature_states)
|
|
30
|
-
feature_states.map
|
|
31
|
-
override_hash = {
|
|
32
|
-
key: feature_state.django_id&.to_s || feature_state.uuid,
|
|
33
|
-
name: feature_state.feature.name,
|
|
34
|
-
enabled: feature_state.enabled,
|
|
35
|
-
value: feature_state.get_value,
|
|
36
|
-
metadata: { id: feature_state.feature.id }
|
|
37
|
-
}
|
|
38
|
-
add_priority_to_override(override_hash, feature_state)
|
|
39
|
-
override_hash
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def self.add_priority_to_override(override_hash, feature_state)
|
|
44
|
-
return unless feature_state.feature_segment&.priority
|
|
45
|
-
|
|
46
|
-
override_hash[:priority] = feature_state.feature_segment.priority
|
|
29
|
+
def self.build_overrides(feature_states)
|
|
30
|
+
feature_states.map { |feature_state| Environment.build_feature_hash(feature_state) }
|
|
47
31
|
end
|
|
48
32
|
|
|
49
33
|
def self.map_rule(rule)
|
data/lib/flagsmith/sdk/config.rb
CHANGED
|
@@ -5,12 +5,13 @@ module Flagsmith
|
|
|
5
5
|
class Config
|
|
6
6
|
DEFAULT_API_URL = 'https://edge.api.flagsmith.com/api/v1/'
|
|
7
7
|
DEFAULT_REALTIME_API_URL = 'https://realtime.flagsmith.com/'
|
|
8
|
+
DEFAULT_EVENTS_API_URL = 'https://events.api.flagsmith.com/'
|
|
8
9
|
|
|
9
10
|
OPTIONS = %i[
|
|
10
11
|
environment_key api_url custom_headers request_timeout_seconds enable_local_evaluation
|
|
11
12
|
environment_refresh_interval_seconds retries enable_analytics default_flag_handler
|
|
12
13
|
offline_mode offline_handler polling_manager_failure_limit
|
|
13
|
-
realtime_api_url enable_realtime_updates logger
|
|
14
|
+
realtime_api_url enable_realtime_updates logger enable_events events_api_url
|
|
14
15
|
].freeze
|
|
15
16
|
|
|
16
17
|
# Available Configs
|
|
@@ -47,6 +48,9 @@ module Flagsmith
|
|
|
47
48
|
# non-standard realtime endpoint.
|
|
48
49
|
# +enable_realtime_updates+ - A boolean to enable realtime updates.
|
|
49
50
|
# +logger+ - Pass your logger, default is Logger.new($stdout)
|
|
51
|
+
# +enable_events+ - if enabled, sends tracking and exposure events to the
|
|
52
|
+
# Flagsmith events API to power experiments
|
|
53
|
+
# +events_api_url+ - Override the URL of the Flagsmith events API
|
|
50
54
|
#
|
|
51
55
|
attr_reader(*OPTIONS)
|
|
52
56
|
|
|
@@ -72,6 +76,10 @@ module Flagsmith
|
|
|
72
76
|
@enable_realtime_updates
|
|
73
77
|
end
|
|
74
78
|
|
|
79
|
+
def enable_events?
|
|
80
|
+
@enable_events
|
|
81
|
+
end
|
|
82
|
+
|
|
75
83
|
def environment_flags_url
|
|
76
84
|
'flags/'
|
|
77
85
|
end
|
|
@@ -106,9 +114,15 @@ module Flagsmith
|
|
|
106
114
|
@realtime_api_url << '/' unless @realtime_api_url.end_with? '/'
|
|
107
115
|
@enable_realtime_updates = opts.fetch(:enable_realtime_updates, false)
|
|
108
116
|
@logger = options.fetch(:logger, Logger.new($stdout).tap { |l| l.level = :debug })
|
|
117
|
+
@enable_events = opts.fetch(:enable_events, false)
|
|
118
|
+
@events_api_url = with_trailing_slash(opts.fetch(:events_api_url, Flagsmith::Config::DEFAULT_EVENTS_API_URL))
|
|
109
119
|
end
|
|
110
120
|
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
|
111
121
|
|
|
122
|
+
def with_trailing_slash(url)
|
|
123
|
+
url.end_with?('/') ? url : "#{url}/"
|
|
124
|
+
end
|
|
125
|
+
|
|
112
126
|
class << self
|
|
113
127
|
def environment_key
|
|
114
128
|
ENV.fetch('FLAGSMITH_ENVIRONMENT_KEY', nil)
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'set'
|
|
4
|
+
|
|
5
|
+
module Flagsmith
|
|
6
|
+
# Started event processors, stopped together at exit. A stopped processor leaves, so it is not kept in memory.
|
|
7
|
+
module RunningEventProcessors
|
|
8
|
+
@processors = Set.new
|
|
9
|
+
@mutex = Mutex.new
|
|
10
|
+
at_exit { to_a.each(&:stop) }
|
|
11
|
+
|
|
12
|
+
def self.add(processor)
|
|
13
|
+
@mutex.synchronize { @processors.add(processor) }
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.delete(processor)
|
|
17
|
+
@mutex.synchronize { @processors.delete(processor) }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.to_a
|
|
21
|
+
@mutex.synchronize { @processors.to_a }
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Buffers tracking and exposure events, and sends them to the Flagsmith events API in batches.
|
|
26
|
+
#
|
|
27
|
+
# Events are sent every +flush_interval_seconds+, as soon as +max_buffer_items+ are buffered,
|
|
28
|
+
# or on #flush. Sending events never raises into the application: failures are logged.
|
|
29
|
+
#
|
|
30
|
+
# A batch is sent up to +MAX_ATTEMPTS+ times, one batch at a time, backing off with full jitter between
|
|
31
|
+
# attempts. A batch whose last attempt fails transiently is kept for the next flush, unless that attempt got
|
|
32
|
+
# a 500. A batch the events API rejects is dropped, and an events API refusing the environment key stops
|
|
33
|
+
# event tracking. When the buffer is full, the oldest event is dropped. While a failed batch is kept, a full
|
|
34
|
+
# buffer waits for the next flush rather than starting another round of attempts.
|
|
35
|
+
#
|
|
36
|
+
# Once stopped, tracking and flushing do nothing.
|
|
37
|
+
class EventProcessor # rubocop:disable Metrics/ClassLength
|
|
38
|
+
FLAG_EXPOSURE_EVENT = '$flag_exposure'
|
|
39
|
+
ENDPOINT = 'v1/events'
|
|
40
|
+
FLUSH_INTERVAL_SECONDS = 10
|
|
41
|
+
MAX_BUFFER_ITEMS = 1000
|
|
42
|
+
REQUEST_TIMEOUT_SECONDS = 3
|
|
43
|
+
MAX_ATTEMPTS = 3
|
|
44
|
+
RETRY_BASE_SECONDS = 1
|
|
45
|
+
CLOSE_TIMEOUT_SECONDS = 5
|
|
46
|
+
# Retried along with every server error
|
|
47
|
+
RETRIED_STATUSES = [408, 429].freeze
|
|
48
|
+
REFUSED_STATUSES = [401, 403].freeze
|
|
49
|
+
|
|
50
|
+
def initialize(config, flush_interval_seconds: FLUSH_INTERVAL_SECONDS, max_buffer_items: MAX_BUFFER_ITEMS,
|
|
51
|
+
retry_base_seconds: RETRY_BASE_SECONDS)
|
|
52
|
+
@logger = config.logger
|
|
53
|
+
@flush_interval_seconds = flush_interval_seconds
|
|
54
|
+
@max_buffer_items = max_buffer_items
|
|
55
|
+
@retry_base_seconds = retry_base_seconds
|
|
56
|
+
@connection = build_connection(config)
|
|
57
|
+
initialize_buffer
|
|
58
|
+
initialize_state
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def track_event(event, identifier: nil, value: nil, traits: nil, metadata: nil)
|
|
62
|
+
buffer(payload(event, nil, identifier: identifier, value: value, traits: traits, metadata: metadata))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Equal exposures within one flush interval add no information, so only the first is sent.
|
|
66
|
+
def track_exposure_event(feature_name, identifier:, value: nil, traits: nil, metadata: nil)
|
|
67
|
+
buffer(payload(FLAG_EXPOSURE_EVENT, feature_name,
|
|
68
|
+
identifier: identifier, value: value, traits: traits, metadata: metadata))
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Sends the events tracked so far, and returns once each of them has been delivered, dropped, or kept for
|
|
72
|
+
# the next flush, retries included. Events another flush sent while this one waited are not sent again.
|
|
73
|
+
def flush
|
|
74
|
+
request = @mutex.synchronize { flush_request unless stopping?('flushing events') }
|
|
75
|
+
send_batch(request) if request
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def start
|
|
79
|
+
return if @interval || @stopping
|
|
80
|
+
|
|
81
|
+
@interval = Thread.new { send_batch until wait(@flush_interval_seconds) { @stopping } }
|
|
82
|
+
RunningEventProcessors.add(self)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Stops flushing every interval, and sends the buffered events, waiting for at most +timeout_seconds+.
|
|
86
|
+
# Events not sent by then are not retried, and no batch is taken to send once it returns.
|
|
87
|
+
def stop(timeout_seconds = CLOSE_TIMEOUT_SECONDS)
|
|
88
|
+
RunningEventProcessors.delete(self)
|
|
89
|
+
change_state { @stopping = true }
|
|
90
|
+
@interval = nil
|
|
91
|
+
final_flush = Thread.new { send_batch }
|
|
92
|
+
@logger.warn "Gave up sending events after #{timeout_seconds} seconds while closing" unless final_flush.join(timeout_seconds)
|
|
93
|
+
change_state { @closed = true }
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
private
|
|
97
|
+
|
|
98
|
+
def initialize_buffer
|
|
99
|
+
@events = []
|
|
100
|
+
@buffered_exposures = Set.new
|
|
101
|
+
# Events tracked so far, how many of them were in a batch once sent, and the batches sent
|
|
102
|
+
@tracked_count = 0
|
|
103
|
+
@attempted_count = 0
|
|
104
|
+
@settled_count = 0
|
|
105
|
+
@flush_pending = false
|
|
106
|
+
# Whether the buffer holds a batch whose attempts all failed
|
|
107
|
+
@holding_failed_batch = false
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def initialize_state
|
|
111
|
+
@mutex = Mutex.new
|
|
112
|
+
# Held while a batch is in flight, so that one batch is sent at a time
|
|
113
|
+
@flush_mutex = Mutex.new
|
|
114
|
+
@state_changed = ConditionVariable.new
|
|
115
|
+
@refused = false
|
|
116
|
+
@stopping = false
|
|
117
|
+
@closed = false
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Only the flush scheduled by a full buffer clears +@flush_pending+, once it holds the buffer, so at most one
|
|
121
|
+
# such flush is waiting at a time.
|
|
122
|
+
def scheduled_flush(request)
|
|
123
|
+
send_batch(request) { @flush_pending = false }
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# What a flush requested now asks for: the events tracked so far, unless a batch settled since, including
|
|
127
|
+
# one in flight now, sent them
|
|
128
|
+
def flush_request
|
|
129
|
+
[@tracked_count, @settled_count]
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Sends the buffered events as one batch. Given a +flush_request+, does nothing if a batch settled since the
|
|
133
|
+
# request sent every event tracked up to it.
|
|
134
|
+
def send_batch(...)
|
|
135
|
+
@flush_mutex.synchronize do
|
|
136
|
+
batch, attempted_count = take_batch(...)
|
|
137
|
+
settle(batch, deliver(batch), attempted_count) if batch
|
|
138
|
+
end
|
|
139
|
+
rescue StandardError => e
|
|
140
|
+
@logger.error "Unable to send events to the Flagsmith events API: #{e}"
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def take_batch(request = nil)
|
|
144
|
+
@mutex.synchronize do
|
|
145
|
+
yield if block_given?
|
|
146
|
+
next if @closed || @events.empty? || sent_since?(request)
|
|
147
|
+
|
|
148
|
+
@holding_failed_batch = false
|
|
149
|
+
[clear_buffer, @tracked_count]
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def sent_since?(request)
|
|
154
|
+
return false unless request
|
|
155
|
+
|
|
156
|
+
tracked_count, settled_count = request
|
|
157
|
+
@settled_count > settled_count && @attempted_count >= tracked_count
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the events the buffer held
|
|
161
|
+
def clear_buffer
|
|
162
|
+
events = @events
|
|
163
|
+
@events = []
|
|
164
|
+
@buffered_exposures.clear
|
|
165
|
+
events
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def settle(batch, outcome, attempted_count)
|
|
169
|
+
@mutex.synchronize do
|
|
170
|
+
@attempted_count = attempted_count
|
|
171
|
+
@settled_count += 1
|
|
172
|
+
hold_failed_batch(batch) if outcome == :kept
|
|
173
|
+
next unless outcome == :refused
|
|
174
|
+
|
|
175
|
+
@refused = true
|
|
176
|
+
clear_buffer
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Keeps a failed batch ahead of the events tracked since, with one of each exposure
|
|
181
|
+
def hold_failed_batch(batch)
|
|
182
|
+
@buffered_exposures.clear
|
|
183
|
+
@events = (batch + @events).last(@max_buffer_items).reject { |event| duplicate_exposure?(event) }
|
|
184
|
+
@holding_failed_batch = true
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns :delivered, :dropped, :kept or :refused
|
|
188
|
+
def deliver(batch)
|
|
189
|
+
body = { events: batch }.to_json
|
|
190
|
+
status = nil
|
|
191
|
+
(1..MAX_ATTEMPTS).each do |attempt|
|
|
192
|
+
return keep(batch, 'the client is closed') if attempt > 1 && wait(backoff(attempt)) { @closed }
|
|
193
|
+
|
|
194
|
+
status = post(body, batch, attempt)
|
|
195
|
+
outcome = outcome_of(status, batch)
|
|
196
|
+
return outcome if outcome
|
|
197
|
+
|
|
198
|
+
log_failed_attempt(batch, attempt, "status #{status}") if status
|
|
199
|
+
end
|
|
200
|
+
status == 500 ? drop(batch, 'its last attempt got 500') : keep(batch, 'its last attempt failed')
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Full jitter: any wait up to the backoff, which doubles from +@retry_base_seconds+
|
|
204
|
+
def backoff(attempt)
|
|
205
|
+
rand * @retry_base_seconds * (2**(attempt - 2))
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the response status, or nil when the request got none
|
|
209
|
+
def post(body, batch, attempt)
|
|
210
|
+
@connection.post(ENDPOINT, body).status
|
|
211
|
+
rescue Faraday::Error => e
|
|
212
|
+
log_failed_attempt(batch, attempt, e)
|
|
213
|
+
nil
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def log_failed_attempt(batch, attempt, failure)
|
|
217
|
+
@logger.warn "Unable to send #{batch.length} events to the Flagsmith events API, " \
|
|
218
|
+
"attempt #{attempt} of #{MAX_ATTEMPTS}: #{failure}"
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the outcome of a batch given its response status, or nil to try again
|
|
222
|
+
def outcome_of(status, batch)
|
|
223
|
+
return nil if status.nil? || status >= 500 || RETRIED_STATUSES.include?(status)
|
|
224
|
+
return :delivered if (200..299).cover?(status)
|
|
225
|
+
|
|
226
|
+
if REFUSED_STATUSES.include?(status)
|
|
227
|
+
@logger.error "The Flagsmith events API refused the environment key with #{status}, stopping event tracking"
|
|
228
|
+
return :refused
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
drop(batch, "the events API rejected it with #{status}")
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
def drop(batch, reason)
|
|
235
|
+
@logger.warn "Dropping #{batch.length} events: #{reason}"
|
|
236
|
+
:dropped
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def keep(batch, reason)
|
|
240
|
+
@logger.warn "Keeping #{batch.length} events for the next flush: #{reason}"
|
|
241
|
+
:kept
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
def change_state
|
|
245
|
+
@mutex.synchronize do
|
|
246
|
+
yield
|
|
247
|
+
@state_changed.broadcast
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Waits for at most +seconds+, until the block is true. Returns the block's value.
|
|
252
|
+
def wait(seconds)
|
|
253
|
+
deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + seconds
|
|
254
|
+
@mutex.synchronize do
|
|
255
|
+
until yield
|
|
256
|
+
remaining = deadline - Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
257
|
+
break if remaining <= 0
|
|
258
|
+
|
|
259
|
+
@state_changed.wait(@mutex, remaining)
|
|
260
|
+
end
|
|
261
|
+
yield
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
def build_connection(config)
|
|
266
|
+
Faraday.new(url: config.events_api_url, headers: headers(config)) do |f|
|
|
267
|
+
f.options.timeout = REQUEST_TIMEOUT_SECONDS
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
def headers(config)
|
|
272
|
+
config.custom_headers.merge(
|
|
273
|
+
'Content-Type' => 'application/json; charset=utf-8',
|
|
274
|
+
'X-Environment-Key' => config.environment_key,
|
|
275
|
+
'User-Agent' => Flagsmith::SDK::Utils.user_agent,
|
|
276
|
+
'Flagsmith-SDK-User-Agent' => Flagsmith::SDK::Utils.user_agent
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
def payload(event, feature_name, details)
|
|
281
|
+
{
|
|
282
|
+
event: event,
|
|
283
|
+
feature_name: feature_name,
|
|
284
|
+
identifier: details[:identifier],
|
|
285
|
+
value: details[:value]&.to_s,
|
|
286
|
+
traits: trait_values(details[:traits]),
|
|
287
|
+
metadata: (details[:metadata] || {}).transform_keys(&:to_s).merge('sdk_version' => Flagsmith::VERSION),
|
|
288
|
+
timestamp: (Time.now.to_f * 1000).to_i
|
|
289
|
+
}
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Traits given as { value:, transient: } configurations are sent as their value.
|
|
293
|
+
def trait_values(traits)
|
|
294
|
+
return nil if traits.nil? || traits.empty?
|
|
295
|
+
|
|
296
|
+
traits.to_h { |key, value| [key.to_s, value.is_a?(Hash) ? value[:value] : value] }
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
def buffer(event)
|
|
300
|
+
request = @mutex.synchronize do
|
|
301
|
+
next if stopping?("tracking #{event[:event]} event") || refused?(event) || duplicate_exposure?(event)
|
|
302
|
+
|
|
303
|
+
drop_oldest if @events.length >= @max_buffer_items
|
|
304
|
+
@events << event
|
|
305
|
+
@tracked_count += 1
|
|
306
|
+
next unless full_buffer_flush_due?
|
|
307
|
+
|
|
308
|
+
@flush_pending = true
|
|
309
|
+
flush_request
|
|
310
|
+
end
|
|
311
|
+
Thread.new { scheduled_flush(request) } if request
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# A full buffer is flushed at once, unless such a flush is already waiting, or it holds a failed batch,
|
|
315
|
+
# which waits for the next flush.
|
|
316
|
+
def full_buffer_flush_due?
|
|
317
|
+
!@flush_pending && !@holding_failed_batch && @events.length >= @max_buffer_items
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
def stopping?(action)
|
|
321
|
+
return false unless @stopping
|
|
322
|
+
|
|
323
|
+
@logger.debug "Not #{action}: the client is closed"
|
|
324
|
+
true
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
def refused?(event)
|
|
328
|
+
return false unless @refused
|
|
329
|
+
|
|
330
|
+
@logger.debug "Not tracking #{event[:event]} event: the Flagsmith events API refused the environment key"
|
|
331
|
+
true
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
def drop_oldest
|
|
335
|
+
dropped = @events.shift
|
|
336
|
+
@buffered_exposures.delete(exposure_key(dropped)) if dropped[:event] == FLAG_EXPOSURE_EVENT
|
|
337
|
+
@logger.warn "Event buffer is full, dropping the oldest #{dropped[:event]} event"
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
def exposure_key(event)
|
|
341
|
+
event.values_at(:feature_name, :identifier, :value)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
def duplicate_exposure?(event)
|
|
345
|
+
return false unless event[:event] == FLAG_EXPOSURE_EVENT
|
|
346
|
+
return false if @buffered_exposures.add?(exposure_key(event))
|
|
347
|
+
|
|
348
|
+
@logger.debug "Skipping duplicate #{FLAG_EXPOSURE_EVENT} event for feature #{event[:feature_name]}"
|
|
349
|
+
true
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
@@ -30,15 +30,29 @@ module Flagsmith
|
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# The running experiment an identity's flag was evaluated in, as returned by the API or the environment document
|
|
34
|
+
Experiment = Struct.new(:id, :name, :in_experiment, keyword_init: true) do
|
|
35
|
+
alias_method :in_experiment?, :in_experiment
|
|
36
|
+
|
|
37
|
+
def self.from_api(metadata)
|
|
38
|
+
experiment = metadata&.dig(:experiment)
|
|
39
|
+
return nil unless experiment
|
|
40
|
+
|
|
41
|
+
new(id: experiment[:id], name: experiment[:name], in_experiment: experiment[:in_experiment])
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
33
45
|
# 'live' Flag class as returned by API or local evaluation
|
|
34
46
|
class Flag < BaseFlag
|
|
35
|
-
attr_reader :feature_name, :feature_id, :reason
|
|
47
|
+
attr_reader :feature_name, :feature_id, :reason, :variant, :experiment
|
|
36
48
|
|
|
37
|
-
def initialize(feature_name:, enabled:, value:, feature_id:, reason: nil)
|
|
49
|
+
def initialize(feature_name:, enabled:, value:, feature_id:, reason: nil, variant: nil, experiment: nil) # rubocop:disable Metrics/ParameterLists
|
|
38
50
|
super(enabled: enabled, value: value, default: false)
|
|
39
51
|
@feature_name = feature_name
|
|
40
52
|
@feature_id = feature_id
|
|
41
53
|
@reason = reason
|
|
54
|
+
@variant = variant
|
|
55
|
+
@experiment = experiment
|
|
42
56
|
end
|
|
43
57
|
|
|
44
58
|
def <=>(other)
|
|
@@ -56,7 +70,9 @@ module Flagsmith
|
|
|
56
70
|
value: value,
|
|
57
71
|
enabled: enabled,
|
|
58
72
|
default: default,
|
|
59
|
-
reason: reason
|
|
73
|
+
reason: reason,
|
|
74
|
+
variant: variant,
|
|
75
|
+
experiment: experiment&.to_h
|
|
60
76
|
}
|
|
61
77
|
end
|
|
62
78
|
|
|
@@ -75,7 +91,9 @@ module Flagsmith
|
|
|
75
91
|
enabled: json_flag_data[:enabled],
|
|
76
92
|
value: json_flag_data.fetch(:feature_state_value) { json_flag_data[:value] },
|
|
77
93
|
feature_name: json_flag_data.dig(:feature, :name),
|
|
78
|
-
feature_id: json_flag_data.dig(:feature, :id)
|
|
94
|
+
feature_id: json_flag_data.dig(:feature, :id),
|
|
95
|
+
variant: json_flag_data[:variant],
|
|
96
|
+
experiment: Experiment.from_api(json_flag_data[:metadata])
|
|
79
97
|
)
|
|
80
98
|
end
|
|
81
99
|
end
|
|
@@ -174,7 +192,9 @@ module Flagsmith
|
|
|
174
192
|
)
|
|
175
193
|
end
|
|
176
194
|
|
|
177
|
-
|
|
195
|
+
# Only an identity is enrolled in an experiment, as with remote evaluation: environment flags,
|
|
196
|
+
# evaluated without one, are built with +identity: false+ and carry no experiment.
|
|
197
|
+
def from_evaluation_result(evaluation_result, identity: true, **args)
|
|
178
198
|
to_flag_object = lambda { |flag_result, acc|
|
|
179
199
|
id = flag_result.dig(:metadata, :id)
|
|
180
200
|
if id.nil?
|
|
@@ -182,19 +202,21 @@ module Flagsmith
|
|
|
182
202
|
"FlagResult metadata.id is missing for feature \"#{flag_result[:name]}\". This indicates a bug in the SDK, please report it."
|
|
183
203
|
end
|
|
184
204
|
|
|
185
|
-
acc[flag_result[:name]] = Collection.map_evaluated_flag_to_flag_result(flag_result, id)
|
|
205
|
+
acc[flag_result[:name]] = Collection.map_evaluated_flag_to_flag_result(flag_result, id, identity: identity)
|
|
186
206
|
}
|
|
187
207
|
|
|
188
208
|
new(evaluation_result[:flags].each_value.each_with_object({}, &to_flag_object), **args)
|
|
189
209
|
end
|
|
190
210
|
|
|
191
|
-
def map_evaluated_flag_to_flag_result(flag_result, id)
|
|
211
|
+
def map_evaluated_flag_to_flag_result(flag_result, id, identity: true)
|
|
192
212
|
Flagsmith::Flags::Flag.new(
|
|
193
213
|
feature_name: flag_result[:name],
|
|
194
214
|
enabled: flag_result[:enabled],
|
|
195
215
|
value: flag_result[:value],
|
|
196
216
|
feature_id: id,
|
|
197
|
-
reason: flag_result[:reason]
|
|
217
|
+
reason: flag_result[:reason],
|
|
218
|
+
variant: flag_result[:variant],
|
|
219
|
+
experiment: (Experiment.from_api(flag_result[:metadata]) if identity)
|
|
198
220
|
)
|
|
199
221
|
end
|
|
200
222
|
|
data/lib/flagsmith/version.rb
CHANGED
data/lib/flagsmith.rb
CHANGED
|
@@ -14,6 +14,7 @@ require 'flagsmith/sdk/api_client'
|
|
|
14
14
|
require 'flagsmith/sdk/config'
|
|
15
15
|
require 'flagsmith/sdk/errors'
|
|
16
16
|
require 'flagsmith/sdk/intervals'
|
|
17
|
+
require 'flagsmith/sdk/event_processor'
|
|
17
18
|
require 'flagsmith/sdk/utils'
|
|
18
19
|
require 'flagsmith/sdk/pooling_manager'
|
|
19
20
|
require 'flagsmith/sdk/models/flags'
|
|
@@ -44,13 +45,22 @@ module Flagsmith
|
|
|
44
45
|
# feature_value_for_identity = identity_flags.get_feature_value('foo')
|
|
45
46
|
#
|
|
46
47
|
# identity_segments = flagsmith.get_identity_segments('identifier', {'foo': 'bar'})
|
|
48
|
+
#
|
|
49
|
+
# With enable_events: true, experiment flags record exposures, and events can be tracked:
|
|
50
|
+
#
|
|
51
|
+
# flag = flagsmith.get_experiment_flag('foo', 'identifier', plan: 'premium')
|
|
52
|
+
# flagsmith.track_event('purchase', identifier: 'identifier', value: 42)
|
|
53
|
+
#
|
|
54
|
+
# Close the client before the application stops, so that its buffered events are sent:
|
|
55
|
+
#
|
|
56
|
+
# flagsmith.close
|
|
47
57
|
|
|
48
58
|
# Available Configs.
|
|
49
59
|
#
|
|
50
60
|
# :environment_key, :api_url, :custom_headers, :request_timeout_seconds, :enable_local_evaluation,
|
|
51
61
|
# :environment_refresh_interval_seconds, :retries, :enable_analytics, :default_flag_handler,
|
|
52
62
|
# :offline_mode, :offline_handler, :polling_manager_failure_limit
|
|
53
|
-
# :realtime_api_url, :enable_realtime_updates, :logger
|
|
63
|
+
# :realtime_api_url, :enable_realtime_updates, :logger, :enable_events, :events_api_url
|
|
54
64
|
#
|
|
55
65
|
# You can see full description in the Flagsmith::Config
|
|
56
66
|
|
|
@@ -68,6 +78,7 @@ module Flagsmith
|
|
|
68
78
|
|
|
69
79
|
api_client
|
|
70
80
|
analytics_processor
|
|
81
|
+
event_processor
|
|
71
82
|
environment_data_polling_manager
|
|
72
83
|
load_offline_handler
|
|
73
84
|
end
|
|
@@ -77,6 +88,7 @@ module Flagsmith
|
|
|
77
88
|
raise Flagsmith::ClientError,
|
|
78
89
|
'The offline_mode config param requires a matching offline_handler.'
|
|
79
90
|
end
|
|
91
|
+
raise Flagsmith::ClientError, 'The enable_events config param cannot be used with offline_mode.' if @config.offline_mode? && @config.enable_events?
|
|
80
92
|
return unless @config.offline_handler && @config.default_flag_handler
|
|
81
93
|
|
|
82
94
|
raise Flagsmith::ClientError,
|
|
@@ -109,6 +121,12 @@ module Flagsmith
|
|
|
109
121
|
)
|
|
110
122
|
end
|
|
111
123
|
|
|
124
|
+
def event_processor
|
|
125
|
+
return nil unless @config.enable_events?
|
|
126
|
+
|
|
127
|
+
@event_processor ||= Flagsmith::EventProcessor.new(@config).tap(&:start)
|
|
128
|
+
end
|
|
129
|
+
|
|
112
130
|
def load_offline_handler
|
|
113
131
|
@environment = offline_handler.environment if offline_handler
|
|
114
132
|
end
|
|
@@ -205,6 +223,61 @@ module Flagsmith
|
|
|
205
223
|
flag.value
|
|
206
224
|
end
|
|
207
225
|
|
|
226
|
+
# Get a flag for an identity, taking the same traits as get_identity_flags, and record the
|
|
227
|
+
# identity's exposure to the variant it was served when it is in the feature's running experiment.
|
|
228
|
+
# Requires enable_events.
|
|
229
|
+
def get_experiment_flag(feature_name, identifier, **traits)
|
|
230
|
+
require_events!
|
|
231
|
+
flag = get_identity_flags(identifier, **traits)[feature_name]
|
|
232
|
+
skip_reason = exposure_skip_reason(flag)
|
|
233
|
+
if skip_reason
|
|
234
|
+
@config.logger.debug "Not sending #{Flagsmith::EventProcessor::FLAG_EXPOSURE_EVENT} for feature #{feature_name}: #{skip_reason}."
|
|
235
|
+
else
|
|
236
|
+
track_exposure_event(feature_name, identifier: identifier, value: flag.variant, traits: traits,
|
|
237
|
+
metadata: { experiment_id: flag.experiment.id })
|
|
238
|
+
end
|
|
239
|
+
flag
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Send an application event, e.g. a conversion, to Flagsmith. Requires enable_events.
|
|
243
|
+
def track_event(event, identifier: nil, value: nil, traits: nil, metadata: nil)
|
|
244
|
+
require_events!
|
|
245
|
+
if event.start_with?('$')
|
|
246
|
+
raise Flagsmith::ClientError,
|
|
247
|
+
"Event name \"#{event}\" uses the \"$\" prefix, which is reserved for events sent by the SDK."
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
event_processor.track_event(event, identifier: identifier, value: value, traits: traits, metadata: metadata)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Record that an identity was shown a variant of a feature. Requires enable_events.
|
|
254
|
+
def track_exposure_event(feature_name, identifier:, value: nil, traits: nil, metadata: nil)
|
|
255
|
+
require_events!
|
|
256
|
+
if identifier.to_s.empty?
|
|
257
|
+
@config.logger.warn "Not sending #{Flagsmith::EventProcessor::FLAG_EXPOSURE_EVENT} for feature #{feature_name}: " \
|
|
258
|
+
'an exposure requires an identifier to reconcile with conversion events.'
|
|
259
|
+
return
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
event_processor.track_exposure_event(feature_name, identifier: identifier, value: value, traits: traits,
|
|
263
|
+
metadata: metadata)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Send the events tracked so far, and return once each of them has been delivered, dropped, or kept for the
|
|
267
|
+
# next flush, retries included. Requires enable_events.
|
|
268
|
+
def flush_events
|
|
269
|
+
require_events!
|
|
270
|
+
event_processor.flush
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Stop the client's background work, and send the buffered events, waiting for at most +timeout_seconds+.
|
|
274
|
+
# Events not sent by then are lost.
|
|
275
|
+
def close(timeout_seconds: Flagsmith::EventProcessor::CLOSE_TIMEOUT_SECONDS)
|
|
276
|
+
@environment_data_polling_manager&.stop
|
|
277
|
+
@realtime_client&.running = false
|
|
278
|
+
@event_processor&.stop(timeout_seconds)
|
|
279
|
+
end
|
|
280
|
+
|
|
208
281
|
def get_identity_segments(identifier, traits = {})
|
|
209
282
|
raise Flagsmith::ClientError, 'Local evaluation or offline handler is required to obtain identity segments.' unless environment
|
|
210
283
|
|
|
@@ -221,6 +294,18 @@ module Flagsmith
|
|
|
221
294
|
|
|
222
295
|
private
|
|
223
296
|
|
|
297
|
+
def require_events!
|
|
298
|
+
raise Flagsmith::ClientError, 'The enable_events config param is required to send events.' unless event_processor
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
def exposure_skip_reason(flag)
|
|
302
|
+
return 'feature not found' unless flag.is_a?(Flagsmith::Flags::Flag)
|
|
303
|
+
return 'feature is disabled' unless flag.enabled?
|
|
304
|
+
return 'identity is not in a running experiment' unless flag.experiment&.in_experiment?
|
|
305
|
+
|
|
306
|
+
'flag has no variant' if flag.variant.nil?
|
|
307
|
+
end
|
|
308
|
+
|
|
224
309
|
def environment_flags_from_document # rubocop:disable Metrics/MethodLength
|
|
225
310
|
unless environment
|
|
226
311
|
raise Flagsmith::ClientError,
|
|
@@ -232,6 +317,7 @@ module Flagsmith
|
|
|
232
317
|
|
|
233
318
|
Flagsmith::Flags::Collection.from_evaluation_result(
|
|
234
319
|
evaluation_result,
|
|
320
|
+
identity: false,
|
|
235
321
|
analytics_processor: analytics_processor,
|
|
236
322
|
default_flag_handler: default_flag_handler,
|
|
237
323
|
offline_handler: offline_handler
|
data/renovate.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"gitIgnoredAuthors": ["216534828+flagsmith-engineering[bot]@users.noreply.github.com"],
|
|
3
4
|
"extends": ["config:recommended", ":semanticCommitScopeDisabled"],
|
|
4
5
|
"ignorePresets": [":semanticPrefixFixDepsChoreOthers"],
|
|
5
6
|
"semanticCommitType": "deps",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flagsmith
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Stuart
|
|
@@ -241,6 +241,7 @@ files:
|
|
|
241
241
|
- lib/flagsmith/sdk/api_client.rb
|
|
242
242
|
- lib/flagsmith/sdk/config.rb
|
|
243
243
|
- lib/flagsmith/sdk/errors.rb
|
|
244
|
+
- lib/flagsmith/sdk/event_processor.rb
|
|
244
245
|
- lib/flagsmith/sdk/intervals.rb
|
|
245
246
|
- lib/flagsmith/sdk/models/flags.rb
|
|
246
247
|
- lib/flagsmith/sdk/models/segments.rb
|