Foreign-office

A light browser push framework that provides listeners on web clients and publishers on Rails servers. If you can keep all your business logic on the server and maintain a dumb client, life is serene. If you can do that while offering a live, interactive page with real-time updates, you're a rock star.

View the Project on GitHub edraut/foreign-office

Rather Use Pubnub? We don't judge.

ForeignOffice.config(
  bus: {
    klass: ForeignOffice::Busses::PubnubBus,
    publish_key: <YOUR PUBNUB_PUBLISH_KEY>,
    subscribe_key: <YOUR PUBNUB_SUBSCRIBE_KEY>,
    secret_key: <YOUR PUBNUB_SECRET_KEY>
    }
)

in your javascript manifest...

//= require foreign_office

in any javscript file you like:

foreign_office.config({
  bus_name: 'PubnubBus',
  publish_key: '<YOUR PUBNUB PUBLISH KEY>',
  subscribe_key: '<YOUR PUBNUB SUBSCRIBE KEY>',
  ssl: true
});