Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove client-side Action Cable debugging code #22872

Merged
merged 1 commit into from
Dec 31, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,3 @@ class ActionCable.Connection
return if @disconnected
@disconnected = true
@consumer.subscriptions.notifyAll("disconnected")

toJSON: ->
state: @getState()
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ class ActionCable.ConnectionMonitor
@consumer.connection.reopen()
, 200

toJSON: ->
interval = @getInterval()
connectionIsStale = @connectionIsStale()
{@startedAt, @stoppedAt, @pingedAt, @reconnectAttempts, connectionIsStale, interval}

now = ->
new Date().getTime()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@ class ActionCable.Consumer

send: (data) ->
@connection.send(data)

inspect: ->
JSON.stringify(this, null, 2)

toJSON: ->
{@url, @subscriptions, @connection, @connectionMonitor}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
class ActionCable.Subscriptions
constructor: (@consumer) ->
@subscriptions = []
@history = []

create: (channelName, mixin) ->
channel = channelName
Expand Down Expand Up @@ -57,22 +56,9 @@ class ActionCable.Subscriptions
for subscription in subscriptions
subscription[callbackName]?(args...)

if callbackName in ["initialized", "connected", "disconnected", "rejected"]
{identifier} = subscription
@record(notification: {identifier, callbackName, args})

sendCommand: (subscription, command) ->
{identifier} = subscription
if identifier is ActionCable.INTERNAL.identifiers.ping
@consumer.connection.isOpen()
else
@consumer.send({command, identifier})

record: (data) ->
data.time = new Date()
@history = @history.slice(-19)
@history.push(data)

toJSON: ->
history: @history
identifiers: (subscription.identifier for subscription in @subscriptions)