From 24c08bd6fef2c5e01e09ece88d3d820bbb98a4fa Mon Sep 17 00:00:00 2001 From: Petru-Sebastian Toader Date: Sat, 1 Aug 2015 16:03:13 +0300 Subject: [PATCH] Add travis and compiled JS --- .travis.yml | 11 +++++++++++ lib/apiTools.js | 4 ++-- lib/association.js | 10 +++++----- lib/common.js | 2 +- lib/controller.js | 2 +- lib/index.js | 10 +++++----- lib/manager.js | 4 ++-- 7 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7cb39a3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: node_js + +node_js: + - "0.10" + - "0.12" + +sudo: false + +cache: + directories: + - node_modules diff --git a/lib/apiTools.js b/lib/apiTools.js index 276b404..de4e5b8 100644 --- a/lib/apiTools.js +++ b/lib/apiTools.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { - var jsError2apiError, other2apiError, sendResponse, string2apiError, string2phyCode, _; + var _, jsError2apiError, other2apiError, sendResponse, string2apiError, string2phyCode; _ = require('underscore'); diff --git a/lib/association.js b/lib/association.js index f00edfd..d80442d 100644 --- a/lib/association.js +++ b/lib/association.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { var associateModels, async, attempt, inflect; @@ -9,10 +9,10 @@ associateModels = function(targetModels, sourceData, sourceModel, next) { var processAssociation; processAssociation = function(targetModelData, done) { - var associator, query, targetMethod, targetModel, _ref; + var associator, query, ref, targetMethod, targetModel; targetModel = sourceModel.sequelize.models[targetModelData.name.singular] || sourceModel.sequelize.models[targetModelData.name.plural]; associator = sourceModel.associations[targetModelData.name.plural] || sourceModel.associations[targetModelData.name.singular]; - targetMethod = ((_ref = associator.accessors) != null ? _ref[targetModelData.method] : void 0) || (associator != null ? associator[targetModelData.method] : void 0); + targetMethod = ((ref = associator.accessors) != null ? ref[targetModelData.method] : void 0) || (associator != null ? associator[targetModelData.method] : void 0); query = {}; query.where = {}; query.where[targetModel.primaryKeyField] = targetModelData.value; @@ -46,9 +46,9 @@ return (sourceModel.associations[modelName] != null) || (sourceModel.associations[inflect.pluralize(modelName)] != null); }); targetModels = filteredValues.map(function(value) { - var data, name, queryValue, _ref; + var data, name, queryValue, ref; data = value.split('.'); - name = (_ref = sourceModel.associations[data[0]]) != null ? _ref.options.name : void 0; + name = (ref = sourceModel.associations[data[0]]) != null ? ref.options.name : void 0; if (name == null) { throw new Error(data[0] + ' does not exist, try singularizing or pluralizing it!'); } diff --git a/lib/common.js b/lib/common.js index 6b40cdf..bc73734 100644 --- a/lib/common.js +++ b/lib/common.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { var async, makeOperation, sendResponse; diff --git a/lib/controller.js b/lib/controller.js index 21a924e..997b62b 100644 --- a/lib/controller.js +++ b/lib/controller.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { var sendResponse; diff --git a/lib/index.js b/lib/index.js index 9315bba..f760b45 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { var Bald, controller, inflect, manager; @@ -9,9 +9,9 @@ controller = require('./controller'); Bald = (function() { - function Bald(_arg) { + function Bald(arg) { var app, sequelize; - app = _arg.app, sequelize = _arg.sequelize; + app = arg.app, sequelize = arg.sequelize; if ((app == null) || (sequelize == null)) { throw new Error('Arguments invalid.'); } @@ -19,9 +19,9 @@ this.sequelize = sequelize; } - Bald.prototype.resource = function(_arg) { + Bald.prototype.resource = function(arg) { var eagerLoading, endpoints, middleware, model, modelManager, plural; - model = _arg.model, endpoints = _arg.endpoints, middleware = _arg.middleware, eagerLoading = _arg.eagerLoading; + model = arg.model, endpoints = arg.endpoints, middleware = arg.middleware, eagerLoading = arg.eagerLoading; if (model == null) { throw new Error('Invalid model.'); } diff --git a/lib/manager.js b/lib/manager.js index f7018f3..0ae4683 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -1,6 +1,6 @@ -// Generated by CoffeeScript 1.8.0 +// Generated by CoffeeScript 1.9.3 (function() { - var Association, async, handleError, makeOperation, _; + var Association, _, async, handleError, makeOperation; async = require('async');