Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents af2a18f + f29d1ce commit 3259e1f3768710226c83054d544eed71562a2a3d @Sutto committed Jul 28, 2011
Showing with 9 additions and 2 deletions.
  1. +3 −1 lib/pebble/base.js
  2. +6 −1 lib/pebble/broadcaster.js
View
4 lib/pebble/base.js
@@ -1,6 +1,7 @@
(function() {
- var Base, sys;
+ var Base, sys, uuid;
sys = require('sys');
+ uuid = require('node-uuid');
Base = (function() {
Base.prototype.name = "unknown";
function Base(runner) {
@@ -39,6 +40,7 @@
message = key;
key = this.namespace;
}
+ message._id = uuid();
this.runner.broadcast.broadcast(key, message);
return this.runner.redis.addHistory(key, JSON.stringify(message));
};
View
7 lib/pebble/broadcaster.js
@@ -1,5 +1,6 @@
(function() {
var Broadcaster, io;
+ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
io = require('socket.io');
Broadcaster = (function() {
function Broadcaster(runner) {
@@ -18,7 +19,11 @@
};
Broadcaster.prototype.setupClient = function() {
this.io = io.listen(this.runner.web.app);
- return this.io.set('log level', 0);
+ this.io.set('log level', 0);
+ return this.io.configure('production', __bind(function() {
+ this.io.enable('browser client minification');
+ return this.io.enable('browser client etag');
+ }, this));
};
Broadcaster.prototype.setupPubSub = function() {
if (this.mode === 'client') {

0 comments on commit 3259e1f

Please sign in to comment.