posthog-ruby 3.23.3 → 3.23.5
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 +9 -4
- data/lib/posthog/feature_flags.rb +1 -2
- 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: 3e7240af788ef7054780bd976e8d568fc5c5deab52c8e448e18097b3ab2f4206
|
|
4
|
+
data.tar.gz: 64fe80390d35ffd7aac25a10ff2c98584a0f74cf353ba4d697503b472e1859ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 63adc1ce6c3381d2261076783610e1e71d04cbc4d925548dc777663d8c996228bd61ce80b3813ecec1a5b98c07ad687953b1bee408d30931a8002b1e5175ea3e
|
|
7
|
+
data.tar.gz: 24954a02c8857733331f5976718e212786e7ce713ca60b3ea329dcbadc5defcd28d6c5cf02f684cc1f285573d972374b718653885b98daf7e05df4ecb386f6cd
|
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
|
)
|
|
@@ -614,7 +614,6 @@ module PostHog
|
|
|
614
614
|
|
|
615
615
|
def self.match_property(property, property_values, cohort_properties = {})
|
|
616
616
|
# only looks for matches where key exists in property_values
|
|
617
|
-
# doesn't support operator is_not_set
|
|
618
617
|
|
|
619
618
|
PostHog::Utils.symbolize_keys! property
|
|
620
619
|
PostHog::Utils.symbolize_keys! property_values
|
|
@@ -629,7 +628,7 @@ module PostHog
|
|
|
629
628
|
if !property_values.key?(key)
|
|
630
629
|
raise InconclusiveMatchError, "Property #{key} not found in property_values"
|
|
631
630
|
elsif operator == 'is_not_set'
|
|
632
|
-
|
|
631
|
+
return false
|
|
633
632
|
end
|
|
634
633
|
|
|
635
634
|
override_value = property_values[key]
|
data/lib/posthog/version.rb
CHANGED