diff --git a/app/initializers/ziniki.js b/app/initializers/ziniki.js index d7f5528..bf56c55 100644 --- a/app/initializers/ziniki.js +++ b/app/initializers/ziniki.js @@ -9,7 +9,6 @@ var initializer = { after: 'store', initialize: function (container, application) { - Ember.Logger.log("Should be an initializer"); Ziniki.init(host + "/resources", host + "/adapter"); var dashboard = ZinikiSerializer.mapType(Glazier.Dashboard, "dashboard", "us.yapp.glazier.Dashboard", "us.yapp.glazier.dashboard"); // Glazier's rails server stupidly uses non-standard ids diff --git a/app/routes/application.js b/app/routes/application.js index 2d9c887..2a87df0 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -5,14 +5,12 @@ var ApplicationRoute = Ember.Route.extend({ var userController = this.controllerFor('user'); var login = this.container.lookup('behavior:login'); - login().then(function(user){ + return login().then(function(user){ // null object pattern might be better. if (user) { userController.set('content', user); } }); - - return null; // Ziniki related race condition }, setupController: function(data) { this.controllerFor('application').set('isReady', true); diff --git a/glazier-server b/glazier-server index daae008..50b5cfb 160000 --- a/glazier-server +++ b/glazier-server @@ -1 +1 @@ -Subproject commit daae0082c25bef6e9d79cfb3cd9f6f9f198ca5b3 +Subproject commit 50b5cfb37534fe23be21b4858510bdb1a45dca3c diff --git a/vendor/ziniki-ea.js b/vendor/ziniki-ea.js deleted file mode 100644 index 5fb9b4b..0000000 --- a/vendor/ziniki-ea.js +++ /dev/null @@ -1,352 +0,0 @@ -define("ziniki/ea", - ["ziniki", "ziniki/sr"], function (Ziniki, ZinikiSerializer) { - - "use strict"; - - /** When issuing requests to the server, we need to keep a record of - * what we expected them to do and any other contextual information so - * that we can handle the response. - * - * We issue requests in a batch and expect to get a response which is the - * same "shape" (i.e. an array with the same number of entries and compatible - * with the answers). - */ - function Batch(webSocket) { - this.requests = []; - this.payload = []; - - /** Add a request to the batch. Append the actual request object - * to requests, and its serialization into payload - * - * request - any suitable request object (Find, FindAll, Create, etc) - */ - this.add = function(request) { - this.requests.push(request); - this.payload.push(request.serialize()); - } - - /** When the batch is ready, send it across to the server - */ - this.send = function() { - webSocket.send(this.payload, this, this.respond); - } - - /** Handle the incoming batch response by processing each of the request elements in turn - * and calling the original request with the slice of response. - * - * json - the JSON object which comprises the response - */ - this.respond = function(json) { - if (json.length != this.requests.length) - throw "The response had a different number of entries to the request (" + json.length + "!=" + this.requests.length + ")"; - for (var i=0;i