posthog-rails 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 +4 -4
- data/lib/posthog/rails/railtie.rb +6 -6
- 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: ec0f2d75e41e549493253977a5e98eb4ae0ca57f80fceda6beec1bd683562a5a
|
|
4
|
+
data.tar.gz: e8d1208f8174c553f05d7ae43dc4e1d9a1eb019dc5a0f1abd559016821b04084
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d6cb2a1158500f273f7c524cbca0d1ee6901e18ef4f843a47c78ebb89b9f79e7911cb8112c441a83476be39bd9be7e7b1cc860cde4072780092d189b6fd64f9
|
|
7
|
+
data.tar.gz: 84873843f9fc8d5f09dea8bbd261c82721bd37dbaba76a4a48572aca0191de81ff478fd7eae4519fdce9d404c6eb1e007e67a1120386e35f33efcd9ed4ca1c4a
|
|
@@ -54,10 +54,10 @@ module PostHog
|
|
|
54
54
|
# Fallback for any client methods not explicitly defined.
|
|
55
55
|
#
|
|
56
56
|
# @api private
|
|
57
|
-
# rubocop:disable Lint/RedundantSafeNavigation
|
|
58
57
|
def method_missing(method_name, ...)
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
ensure_initialized!
|
|
59
|
+
|
|
60
|
+
if client.respond_to?(method_name)
|
|
61
61
|
client.public_send(method_name, ...)
|
|
62
62
|
else
|
|
63
63
|
super
|
|
@@ -66,16 +66,16 @@ module PostHog
|
|
|
66
66
|
|
|
67
67
|
# @api private
|
|
68
68
|
def respond_to_missing?(method_name, include_private = false)
|
|
69
|
-
|
|
69
|
+
ensure_initialized!
|
|
70
|
+
client.respond_to?(method_name, include_private) || super
|
|
70
71
|
end
|
|
71
|
-
# rubocop:enable Lint/RedundantSafeNavigation
|
|
72
72
|
|
|
73
73
|
private
|
|
74
74
|
|
|
75
75
|
def ensure_initialized!
|
|
76
76
|
return if initialized?
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
@client = PostHog::Client.new(api_key: nil, silence_disabled_client_error: true)
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
end
|