{:uriI"¨file://app/assets/javascripts/push_routes_socket_io.js.erb?type=application/javascript&pipeline=self&id=7d0536ea58a88b3e31fdab0d9859eec7bb9c9dc5b2d4f10694391ed7e05be290:ET:load_pathI"app/assets/javascripts;T: filenameI"8app/assets/javascripts/push_routes_socket_io.js.erb;T: nameI"push_routes_socket_io;T:logical_pathI""push_routes_socket_io.self.js;T:content_typeI"application/javascript;T: sourceI")var PushRoutes = { socket: null, init: function(server,user_id,auth_token,callback) { var self = this; this.socket = io.connect(server, {secure: true}); this.socket.on('connect', function() { self.socket.connected = true; console.log("Connecting Socket"); this.socket.on('disconnect',function() { this.socket.connected = false; console.log('Socket Disconnected'); }); this.socket.on('unauthorized', function(err){ console.log("Authentication was rejected:", err.message); }); this.socket.on('authenticated', function() { console.log("Authentication successful"); }); this.socket.emit("authentication",{user_id: user_id, authentication_token: auth_token}, function(error,message) { console.log(error); console.log(message); }); }) }, subscriptions: {}, subscribe: function(route,on_update) { this.subscriptions[route] = on_update; register_subscription(route,on_update); }, register_subscription: function(route,on_update) { if(this.socket.connected) { this.socket.on(route,function(message) { on_update(message); }); this.socket.emit("subscribe",route); } }, unsubscribe: function(route) { delete this.subscriptions[route]; } } ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"gprocessors:type=application/javascript&file_type=application/javascript&engines=.erb&pipeline=self;TTI"Ffile-digest://app/assets/javascripts/push_routes_socket_io.js.erb;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%õÓ¦(ÿßp4÷§9U6~ãÌŸ¼m/Øæø§A: lengthi):dependencies_digest"%g/V¡)é»ÜP‰`¢ˆÜŽð³¸úKü¾9…ÊCÆÉ2ÓOã:idI"E7d0536ea58a88b3e31fdab0d9859eec7bb9c9dc5b2d4f10694391ed7e05be290;F: mtimel+ÿV