From 99a289abb818bfe1f2fd430a895d9ee82034a5c5 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Mon, 31 Jan 2022 16:26:01 +0300 Subject: [PATCH] fix(tmp): add hack to restore methods visibility after Sentry patch --- lib/anycable/rails/railtie.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/anycable/rails/railtie.rb b/lib/anycable/rails/railtie.rb index 6045e87..5a4e4d5 100644 --- a/lib/anycable/rails/railtie.rb +++ b/lib/anycable/rails/railtie.rb @@ -60,6 +60,13 @@ class Railtie < ::Rails::Railtie # :nodoc: end end + # Temp hack to fix Sentry vs AnyCable incompatibility + # See https://github.com/anycable/anycable-rails/issues/165 + initializer "anycable.sentry_hack", after: :"sentry.extend_action_cable" do + next unless defined?(::Sentry::Rails::ActionCableExtensions::Connection) + Sentry::Rails::ActionCableExtensions::Connection.send :public, :handle_open, :handle_close + end + # Since Rails 6.1 if respond_to?(:server) server do