diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-01-16 10:33:50 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-01-18 19:37:25 -0500 |
commit | ae31da20cd250154c951b67d5625fc71ac27e2f1 (patch) | |
tree | 8f9bf6275f9e52c3b8a8b674d0bfd2a941f5bdf9 /actioncable/lib/action_cable/channel | |
parent | 980e01eb100b38e39791f7f930a038ecaf7c02da (diff) | |
download | rails-ae31da20cd250154c951b67d5625fc71ac27e2f1.tar.gz rails-ae31da20cd250154c951b67d5625fc71ac27e2f1.tar.bz2 rails-ae31da20cd250154c951b67d5625fc71ac27e2f1.zip |
Fix code review comments
- adapter -> pubsub (re)rename internally
- Change variable names to match method names
- Add EventMachine `~> 1.0` as a runtime dependency of ActionCable
- Refactor dependency loading for adapters
Diffstat (limited to 'actioncable/lib/action_cable/channel')
-rw-r--r-- | actioncable/lib/action_cable/channel/streams.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actioncable/lib/action_cable/channel/streams.rb b/actioncable/lib/action_cable/channel/streams.rb index 89dcbdfa27..589946c3db 100644 --- a/actioncable/lib/action_cable/channel/streams.rb +++ b/actioncable/lib/action_cable/channel/streams.rb @@ -76,7 +76,7 @@ module ActionCable streams << [ broadcasting, callback ] EM.next_tick do - adapter.subscribe(broadcasting, callback, lambda do |reply| + pubsub.subscribe(broadcasting, callback, lambda do |reply| transmit_subscription_confirmation logger.info "#{self.class.name} is streaming from #{broadcasting}" end) @@ -92,13 +92,13 @@ module ActionCable def stop_all_streams streams.each do |broadcasting, callback| - adapter.unsubscribe broadcasting, callback + pubsub.unsubscribe broadcasting, callback logger.info "#{self.class.name} stopped streaming from #{broadcasting}" end.clear end private - delegate :adapter, to: :connection + delegate :pubsub, to: :connection def streams @_streams ||= [] |