ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

private_pub.js changes: only load faye.js if Faye object is not present and use module pattern to prevent pollution of global namespace #51

Open vollnhals opened 12 years ago

vollnhals commented 12 years ago

Allow loading of faye-browser.js directly through asset pipeline, so that only one request is made for .js files in production mode. This also allows easy serving of faye-browser.js through nginx or apache instead of thin.

Also change creation of PrivatePub variable to use module pattern. There is no need to export the buildPrivatePub function into the global namespace.

nfm commented 11 years ago

As this pull request had a bunch of other commits added to it, I've split it up into a couple of separate pull requests (#69 - conditionally load faye.js, and #70 - only subscribe once to a channel).

I'll look into the Redis related commits shortly.