File tree Expand file tree Collapse file tree 3 files changed +10
-27
lines changed Expand file tree Collapse file tree 3 files changed +10
-27
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ gem 'sorcery'
5252gem 'sprockets-rails'
5353gem 'telegraf'
5454gem 'terser' , require : false
55- gem 'tubesock'
55+ gem 'tubesock' , github : 'openhpi/tubesock'
5656gem 'turbolinks'
5757gem 'whenever' , require : false
5858gem 'zxcvbn-ruby' , require : 'zxcvbn'
Original file line number Diff line number Diff line change 1+ GIT
2+ remote: https://github.com/openhpi/tubesock.git
3+ revision: 6952050f00e795c3d96eb0a5ee163784de41cd8b
4+ specs:
5+ tubesock (0.2.9 )
6+ rack (>= 1.5.0 )
7+ websocket (>= 1.1.0 )
8+
19GEM
210 remote: https://rubygems.org/
311 specs:
551559 thor (1.3.2 )
552560 tilt (2.4.0 )
553561 timeout (0.4.1 )
554- tubesock (0.2.9 )
555- rack (>= 1.5.0 )
556- websocket (>= 1.1.0 )
557562 turbo-rails (2.0.10 )
558563 actionpack (>= 6.0.0 )
559564 railties (>= 6.0.0 )
@@ -671,7 +676,7 @@ DEPENDENCIES
671676 stackprof
672677 telegraf
673678 terser
674- tubesock
679+ tubesock !
675680 turbolinks
676681 web-console
677682 webmock
Original file line number Diff line number Diff line change @@ -28,25 +28,3 @@ module InstanceMethods
2828 end
2929 end
3030end
31-
32- # Tubesock uses a deprecated method to clear active connections with ActiveRecord.
33- # Hence, we update the method call to the new method name (including `connection_handler`).
34- module Tubesock ::Hijack
35- extend ActiveSupport ::Concern
36-
37- # First, we need to remove the old `included` definition.
38- # Otherwise, we would get an `ActiveSupport::Concern::MultipleIncludedBlocks` exception.
39- remove_instance_variable :@_included_block
40-
41- included do
42- def hijack
43- sock = Tubesock . hijack ( request . env )
44- yield sock
45- sock . onclose do
46- ActiveRecord ::Base . connection_handler . clear_active_connections! if defined? ActiveRecord
47- end
48- sock . listen
49- render plain : nil , status : -1
50- end
51- end
52- end
You can’t perform that action at this time.
0 commit comments