posthog-ruby 3.23.2 → 3.23.4
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/lib/posthog/client.rb +10 -5
- data/lib/posthog/send_worker.rb +1 -1
- data/lib/posthog/transport.rb +1 -1
- data/lib/posthog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91b19159933c38b73ae683c8dba00e8e2fc95b3e4281e641146c39626e91a707
|
|
4
|
+
data.tar.gz: ea448084b789cd156c77eed66404eac45ccd88fc003cffeb9f3ceddca7def548
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94d23fe6922e3baa914de8d3964ea89ff21d4802b70f24f3d17b2078c5a2650b0375daae97ab18edbf9abb7b710dd5fba1c30696c7e2ba2c9db46705f5693524
|
|
7
|
+
data.tar.gz: 49989565e733781a37f4e487cf679fa9de3ca34e8258b8f6c0d76c240a9168793baba9eaf9d587dcb0eb29a973dd6fcd5fc334e404468a6b46698ae0d8c39712
|
data/lib/posthog/client.rb
CHANGED
|
@@ -607,10 +607,9 @@ module PostHog
|
|
|
607
607
|
# @param [Boolean] only_evaluate_locally Skip the remote /flags call entirely
|
|
608
608
|
# @param [Boolean, nil] disable_geoip When true, disables GeoIP lookup for remote evaluation and stamps captured
|
|
609
609
|
# access events.
|
|
610
|
-
# @param [Array<String, Symbol
|
|
611
|
-
#
|
|
612
|
-
# Distinct from {FeatureFlagEvaluations#only}, which filters the
|
|
613
|
-
# already-fetched snapshot in memory.
|
|
610
|
+
# @param [Array<String, Symbol>, nil] flag_keys When set, scopes evaluation to only these flag keys.
|
|
611
|
+
# An empty array returns an empty snapshot without evaluating flags; +nil+ evaluates all flags.
|
|
612
|
+
# Distinct from {FeatureFlagEvaluations#only}, which filters the already-fetched snapshot in memory.
|
|
614
613
|
# @return [PostHog::FeatureFlagEvaluations]
|
|
615
614
|
def evaluate_flags(
|
|
616
615
|
distinct_id,
|
|
@@ -629,6 +628,12 @@ module PostHog
|
|
|
629
628
|
|
|
630
629
|
return FeatureFlagEvaluations.new(host: host, distinct_id: distinct_id, flags: {}, groups: groups) if @disabled
|
|
631
630
|
|
|
631
|
+
if flag_keys && flag_keys.empty?
|
|
632
|
+
return FeatureFlagEvaluations.new(
|
|
633
|
+
host: host, distinct_id: distinct_id, flags: {}, groups: groups, disable_geoip: disable_geoip
|
|
634
|
+
)
|
|
635
|
+
end
|
|
636
|
+
|
|
632
637
|
person_properties, group_properties = add_local_person_and_group_properties(
|
|
633
638
|
groups, person_properties, group_properties
|
|
634
639
|
)
|
|
@@ -1179,7 +1184,7 @@ module PostHog
|
|
|
1179
1184
|
|
|
1180
1185
|
@sync_lock.synchronize do
|
|
1181
1186
|
res = @transport.send(@api_key, batch)
|
|
1182
|
-
@on_error.call(res.status, res.error) unless res.status
|
|
1187
|
+
@on_error.call(res.status, res.error) unless res.status.between?(200, 299)
|
|
1183
1188
|
end
|
|
1184
1189
|
end
|
|
1185
1190
|
|
data/lib/posthog/send_worker.rb
CHANGED
|
@@ -154,7 +154,7 @@ module PostHog
|
|
|
154
154
|
|
|
155
155
|
def send_batch
|
|
156
156
|
res = @transport.send @api_key, @batch
|
|
157
|
-
handle_error(res.status, res.error) unless res.status
|
|
157
|
+
handle_error(res.status, res.error) unless res.status.between?(200, 299)
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
def consume_message_from_queue!
|
data/lib/posthog/transport.rb
CHANGED
data/lib/posthog/version.rb
CHANGED