posthog-ruby 3.9.3 → 3.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89fab2ec7ac4caec58095c06aacdc2ccc4a283cec328672291bfbed58a8ebf31
4
- data.tar.gz: 4a8a95003bb34a4ddbeee89c2cd3d41daf1d1df4026de52f2f776f04a5225fef
3
+ metadata.gz: fa0374a1bdfa7b8d76b8f2ffeee64e868883148c50ab714ed3072db48862ee42
4
+ data.tar.gz: b2729eb5375aea69389ff2fb7ba012a5644e60723fda3b2bc60647161cca11b8
5
5
  SHA512:
6
- metadata.gz: bc3a513fabd5d515ae95bb716a58ea28ecb0b303db57ac91d50e0c0d14995af3da2de6a0f6a121cd0601e3e161535410f54b4b2fa765d858a89174cdbb067c94
7
- data.tar.gz: a1528a5562c611c1a1a9115bd7bf64ac772f0cc2207c4a27326c44be4190221d168035e17954cc86d363f307f2c32ab079922ba7851326eae5bc27c6feed3415
6
+ metadata.gz: 7287da0e6624013013c6bddc1565791be27486cfdb9bf7f196c0fc5663fd5f963375d1d3d7f5b8b6cf6e2f57c515991cf605c9abf44dba197a4f85f8f0e352af
7
+ data.tar.gz: 7e16531f9ca40884c42ef54eff1507efec2b64c09b0f9cd09da7e16186d9e337846699fde96792b4d1ed75c403d95222e37a8de5ec768b8fbd1f16882ecb2225
@@ -106,7 +106,9 @@ module PostHog
106
106
  @feature_flags_poller = nil
107
107
  @personal_api_key = opts[:personal_api_key]
108
108
 
109
- logger.error('api_key is missing or empty after trimming whitespace; check your project API key') if @disabled
109
+ if @disabled && !opts[:silence_disabled_client_error]
110
+ logger.error('api_key is missing or empty after trimming whitespace; check your project API key')
111
+ end
110
112
 
111
113
  # Warn when multiple clients are created with the same API key (can cause dropped events)
112
114
  unless @disabled || opts[:test_mode] || opts[:disable_singleton_warning]
@@ -284,6 +286,8 @@ module PostHog
284
286
  # same `$feature/<key>` and `$active_feature_flags` properties as the snapshot.
285
287
  # @return [Boolean, nil] Whether the exception event was queued or sent, or nil if the input could not be parsed.
286
288
  def capture_exception(exception, distinct_id = nil, additional_properties = {}, flags: nil)
289
+ return false if @disabled
290
+
287
291
  exception_info = ExceptionCapture.build_parsed_exception(exception)
288
292
 
289
293
  return if exception_info.nil?
@@ -310,6 +314,8 @@ module PostHog
310
314
  # @return [Boolean] Whether the identify event was queued or sent.
311
315
  # @macro common_attrs
312
316
  def identify(attrs)
317
+ return false if @disabled
318
+
313
319
  symbolize_keys! attrs
314
320
  enqueue(FieldParser.parse_for_identify(attrs))
315
321
  end
@@ -325,6 +331,8 @@ module PostHog
325
331
  # @return [Boolean] Whether the group identify event was queued or sent.
326
332
  # @macro common_attrs
327
333
  def group_identify(attrs)
334
+ return false if @disabled
335
+
328
336
  symbolize_keys! attrs
329
337
  enqueue(FieldParser.parse_for_group_identify(attrs))
330
338
  end
@@ -337,6 +345,8 @@ module PostHog
337
345
  # @return [Boolean] Whether the alias event was queued or sent.
338
346
  # @macro common_attrs
339
347
  def alias(attrs)
348
+ return false if @disabled
349
+
340
350
  symbolize_keys! attrs
341
351
  enqueue(FieldParser.parse_for_alias(attrs))
342
352
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostHog
4
- VERSION = '3.9.3'
4
+ VERSION = '3.9.4'
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.9.3
4
+ version: 3.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''