Sha256: 314f436a4cf6b5cd85905670cc4068493af362b33c40880379062dd727952789
Contents?: true
Size: 771 Bytes
Versions: 13
Compression:
Stored size: 771 Bytes
Contents
class ForeignOffice::Busses::PusherBus < ForeignOffice::Busses::GenericBus def self.config(config) # Pusher now pulls config directly from the ENV Pusher.encrypted = true end def self.app_id=(app_id) @app_id = app_id end def self.app_id @app_id end def self.key=(key) @key = key end def self.key @key end def self.secret=(secret) @secret = secret end def self.secret @secret end def self.connection @pusher ||= Pusher end def self.publish(message) message.symbolize_keys! channel = sanitize_channel(message[:channel]) self.connection.trigger( channel, 'publish', message ) end def self.sanitize_channel(channel) channel.gsub(/::/,'.') end end
Version data entries
13 entries across 13 versions & 1 rubygems