Permalink
Browse files

upgrade dependencies

add unregisterHandler(s)
  • Loading branch information...
1 parent b1ca992 commit 2f03b982435d31b6823ade44b7ecd23dd0870296 @smaldini committed Jan 15, 2013
@@ -26,7 +26,7 @@ import org.springframework.util.ClassUtils
class EventsPushGrailsPlugin {
// the plugin version
- def version = "1.0.M4-SNAPSHOT"
+ def version = "1.0.M4"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "2.0 > *"
// the other plugins this plugin depends on
View
@@ -1,4 +1,4 @@
#Grails Metadata file
-#Wed Sep 26 22:34:17 BST 2012
-app.grails.version=2.2.0.RC2
-app.name=events-push
+#Tue Jan 15 20:50:19 GMT 2013
+app.grails.version=2.2.0
+app.name=events-push
@@ -33,7 +33,7 @@ grails.project.dependency.resolution = {
}
plugins {
- runtime(":jquery:1.8.0", ":hibernate:$grailsVersion") {
+ runtime(":jquery:1.8.3", ":hibernate:$grailsVersion") {
export = false
}
@@ -43,6 +43,6 @@ grails.project.dependency.resolution = {
) {
export = false
}
- compile (':platform-core:1.0.RC2')
+ compile (':platform-core:1.0.RC4')
}
}
@@ -89,17 +89,21 @@ var grails = grails || {};
rq = jQuery.extend(rq, options);
rq = jQuery.extend(rq, request);
- if (!that.globalTopicSocket) {
- return socket.subscribe(rq);
- } else {
+ if (that.globalTopicSocket) {
socket.unsubscribe();
- that.globalTopicSocket = socket.subscribe(rq);
- return that.globalTopicSocket;
}
+ that.globalTopicSocket = socket.subscribe(rq);
} else {
handlers[handlers.length] = handler;
}
- return that.globalTopicSocket;
+ return handler;
+ };
+
+ that.unregisterHandlers = function (topic) {
+ checkSpecified("topic", 'string', topic);
+ delete handlerMap[topic];
+ socket.unsubscribeUrl(that.root + '/' + that.path + '/' + that.globalTopicName);
+ init();
};
that.unregisterHandler = function (topic, handler) {
@@ -111,10 +115,7 @@ var grails = grails || {};
var idx = handlers.indexOf(handler);
if (idx != -1) handlers.splice(idx, 1);
if (handlers.length == 0) {
- // No more local handlers so we should unregister the connection
- socket.unsubscribeUrl(that.root + '/' + that.path + '/' + that.globalTopicName);
- init();
- delete handlerMap[topic];
+ that.unregisterHandlers(topic);
}
}
};
Oops, something went wrong.

0 comments on commit 2f03b98

Please sign in to comment.