yankov
8/3/2011 - 9:41 PM

Sending message to faye server from ruby

Sending message to faye server from ruby

def notify(message)
  msg = JSON.dump('channel' => "/notifications/channel", 'data' => {'text' => message})
  uri = URI.parse('http://127.0.0.1:3333/faye')
  Net::HTTP.post_form(uri, :message => msg)
end