class RenderSync::Clients::Pusher

Public Instance Methods

batch_publish(*args) click to toggle source
# File lib/render_sync/clients/pusher.rb, line 24
def batch_publish(*args)
  Message.batch_publish(*args)
end
build_message(*args) click to toggle source
# File lib/render_sync/clients/pusher.rb, line 28
def build_message(*args)
  Message.new(*args)
end
normalize_channel(channel) click to toggle source

Public: Normalize channel to adapter supported format

channel - The string channel name

Returns The normalized channel prefixed with supported format for Pusher

# File lib/render_sync/clients/pusher.rb, line 37
def normalize_channel(channel)
  channel
end
setup() click to toggle source
# File lib/render_sync/clients/pusher.rb, line 5
def setup
  require 'pusher'
  ::Pusher.app_id = RenderSync.app_id
  ::Pusher.key    = RenderSync.api_key
  ::Pusher.secret = RenderSync.auth_token

  if RenderSync.pusher_api_scheme
    ::Pusher.scheme = RenderSync.pusher_api_scheme
  end

  if RenderSync.pusher_api_host
    ::Pusher.host = RenderSync.pusher_api_host
  end

  if RenderSync.pusher_api_port
    ::Pusher.port = RenderSync.pusher_api_port
  end
end