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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec4346619eb44d6664e80fe3e8466e9c940b20774ff34c7d4fd7bf4dc25953d1
4
- data.tar.gz: 9f73b9a350a8b34d0bb2dc5fe434ec147909fd29f9e74f909804acd588412748
3
+ metadata.gz: 3e7240af788ef7054780bd976e8d568fc5c5deab52c8e448e18097b3ab2f4206
4
+ data.tar.gz: 64fe80390d35ffd7aac25a10ff2c98584a0f74cf353ba4d697503b472e1859ee
5
5
  SHA512:
6
- metadata.gz: a9aa4e33d6e52cb388625dd08d8a0611334be84ee763e3223961c27c3c9406cf3df4da755a820f40233564b06b539577d28e850e49fe39e003545a589a27551e
7
- data.tar.gz: 03dcd1b6fb244752daea1d022a310e547e1f92478ee196a6906dc3fa86299e14d29b1488459b23652930dfff898e44320bb109aa67150efaf09e2318921732f0
6
+ metadata.gz: 63adc1ce6c3381d2261076783610e1e71d04cbc4d925548dc777663d8c996228bd61ce80b3813ecec1a5b98c07ad687953b1bee408d30931a8002b1e5175ea3e
7
+ data.tar.gz: 24954a02c8857733331f5976718e212786e7ce713ca60b3ea329dcbadc5defcd28d6c5cf02f684cc1f285573d972374b718653885b98daf7e05df4ecb386f6cd
@@ -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>] flag_keys When set, scopes the underlying /flags
611
- # request to only these flag keys (sent as `flag_keys_to_evaluate`).
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
- raise InconclusiveMatchError, 'Operator is_not_set not supported'
631
+ return false
633
632
  end
634
633
 
635
634
  override_value = property_values[key]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostHog
4
- VERSION = '3.23.3'
4
+ VERSION = '3.23.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: posthog-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.23.3
4
+ version: 3.23.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''