update dependency and test in node 0.12

This commit is contained in:
Mohsen Azimi
2015-02-28 08:59:32 -08:00
parent 9b9802cd4c
commit 98eaa42820
4 changed files with 147 additions and 146 deletions

View File

@@ -1,6 +1,7 @@
language: node_js language: node_js
node_js: node_js:
- '0.10' - '0.10'
- '0.12'
install: install:
- export DISPLAY=:99.0 - export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start - sh -e /etc/init.d/xvfb start

262
dist/swagger-ui.js vendored
View File

@@ -5,11 +5,11 @@
* @license Apache 2.0 * @license Apache 2.0
*/ */
var SwaggerUi, var SwaggerUi,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
SwaggerUi = (function(_super) { SwaggerUi = (function(superClass) {
__extends(SwaggerUi, _super); extend(SwaggerUi, superClass);
function SwaggerUi() { function SwaggerUi() {
return SwaggerUi.__super__.constructor.apply(this, arguments); return SwaggerUi.__super__.constructor.apply(this, arguments);
@@ -82,9 +82,9 @@ SwaggerUi = (function(_super) {
}; };
SwaggerUi.prototype.load = function() { SwaggerUi.prototype.load = function() {
var url, _ref; var ref, url;
if ((_ref = this.mainView) != null) { if ((ref = this.mainView) != null) {
_ref.clear(); ref.clear();
} }
url = this.options.url; url = this.options.url;
if (url && url.indexOf("http") !== 0) { if (url && url.indexOf("http") !== 0) {
@@ -969,11 +969,11 @@ this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler"
return buffer + "</td>\n<td width='50%'><span class=\"model-signature\" /></td>"; return buffer + "</td>\n<td width='50%'><span class=\"model-signature\" /></td>";
},"useData":true}); },"useData":true});
var ApiKeyButton, var ApiKeyButton,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ApiKeyButton = (function(_super) { ApiKeyButton = (function(superClass) {
__extends(ApiKeyButton, _super); extend(ApiKeyButton, superClass);
function ApiKeyButton() { function ApiKeyButton() {
return ApiKeyButton.__super__.constructor.apply(this, arguments); return ApiKeyButton.__super__.constructor.apply(this, arguments);
@@ -1022,11 +1022,11 @@ ApiKeyButton = (function(_super) {
})(Backbone.View); })(Backbone.View);
var BasicAuthButton, var BasicAuthButton,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
BasicAuthButton = (function(_super) { BasicAuthButton = (function(superClass) {
__extends(BasicAuthButton, _super); extend(BasicAuthButton, superClass);
function BasicAuthButton() { function BasicAuthButton() {
return BasicAuthButton.__super__.constructor.apply(this, arguments); return BasicAuthButton.__super__.constructor.apply(this, arguments);
@@ -1077,11 +1077,11 @@ BasicAuthButton = (function(_super) {
})(Backbone.View); })(Backbone.View);
var ContentTypeView, var ContentTypeView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ContentTypeView = (function(_super) { ContentTypeView = (function(superClass) {
__extends(ContentTypeView, _super); extend(ContentTypeView, superClass);
function ContentTypeView() { function ContentTypeView() {
return ContentTypeView.__super__.constructor.apply(this, arguments); return ContentTypeView.__super__.constructor.apply(this, arguments);
@@ -1106,11 +1106,11 @@ ContentTypeView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var HeaderView, var HeaderView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
HeaderView = (function(_super) { HeaderView = (function(superClass) {
__extends(HeaderView, _super); extend(HeaderView, superClass);
function HeaderView() { function HeaderView() {
return HeaderView.__super__.constructor.apply(this, arguments); return HeaderView.__super__.constructor.apply(this, arguments);
@@ -1171,13 +1171,13 @@ HeaderView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var MainView, var MainView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
MainView = (function(_super) { MainView = (function(superClass) {
var sorters; var sorters;
__extends(MainView, _super); extend(MainView, superClass);
function MainView() { function MainView() {
return MainView.__super__.constructor.apply(this, arguments); return MainView.__super__.constructor.apply(this, arguments);
@@ -1193,14 +1193,14 @@ MainView = (function(_super) {
}; };
MainView.prototype.initialize = function(opts) { MainView.prototype.initialize = function(opts) {
var auth, key, value, _ref; var auth, key, ref, value;
if (opts == null) { if (opts == null) {
opts = {}; opts = {};
} }
this.model.auths = []; this.model.auths = [];
_ref = this.model.securityDefinitions; ref = this.model.securityDefinitions;
for (key in _ref) { for (key in ref) {
value = _ref[key]; value = ref[key];
auth = { auth = {
name: key, name: key,
type: value.type, type: value.type,
@@ -1220,7 +1220,7 @@ MainView = (function(_super) {
}; };
MainView.prototype.render = function() { MainView.prototype.render = function() {
var auth, button, counter, id, name, resource, resources, _i, _len, _ref; var auth, button, counter, i, id, len, name, ref, resource, resources;
if (this.model.securityDefinitions) { if (this.model.securityDefinitions) {
for (name in this.model.securityDefinitions) { for (name in this.model.securityDefinitions) {
auth = this.model.securityDefinitions[name]; auth = this.model.securityDefinitions[name];
@@ -1241,9 +1241,9 @@ MainView = (function(_super) {
$(this.el).html(Handlebars.templates.main(this.model)); $(this.el).html(Handlebars.templates.main(this.model));
resources = {}; resources = {};
counter = 0; counter = 0;
_ref = this.model.apisArray; ref = this.model.apisArray;
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (i = 0, len = ref.length; i < len; i++) {
resource = _ref[_i]; resource = ref[i];
id = resource.name; id = resource.name;
while (typeof resources[id] !== 'undefined') { while (typeof resources[id] !== 'undefined') {
id = id + "_" + counter; id = id + "_" + counter;
@@ -1284,11 +1284,11 @@ MainView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var OperationView, var OperationView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
OperationView = (function(_super) { OperationView = (function(superClass) {
__extends(OperationView, _super); extend(OperationView, superClass);
function OperationView() { function OperationView() {
return OperationView.__super__.constructor.apply(this, arguments); return OperationView.__super__.constructor.apply(this, arguments);
@@ -1350,7 +1350,7 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.render = function() { OperationView.prototype.render = function() {
var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, modelAuths, o, param, ref, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4; var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value;
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0; isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
if (!isMethodSubmissionSupported) { if (!isMethodSubmissionSupported) {
this.model.isReadOnly = true; this.model.isReadOnly = true;
@@ -1363,8 +1363,8 @@ OperationView = (function(_super) {
modelAuths = this.model.authorizations || this.model.security; modelAuths = this.model.authorizations || this.model.security;
if (modelAuths) { if (modelAuths) {
if (Array.isArray(modelAuths)) { if (Array.isArray(modelAuths)) {
for (_i = 0, _len = modelAuths.length; _i < _len; _i++) { for (l = 0, len = modelAuths.length; l < len; l++) {
auths = modelAuths[_i]; auths = modelAuths[l];
for (key in auths) { for (key in auths) {
auth = auths[key]; auth = auths[key];
for (a in this.auths) { for (a in this.auths) {
@@ -1372,9 +1372,9 @@ OperationView = (function(_super) {
if (auth.type === 'oauth2') { if (auth.type === 'oauth2') {
this.model.oauth = {}; this.model.oauth = {};
this.model.oauth.scopes = []; this.model.oauth.scopes = [];
_ref = auth.value.scopes; ref1 = auth.value.scopes;
for (k in _ref) { for (k in ref1) {
v = _ref[k]; v = ref1[k];
scopeIndex = auths[key].indexOf(k); scopeIndex = auths[key].indexOf(k);
if (scopeIndex >= 0) { if (scopeIndex >= 0) {
o = { o = {
@@ -1398,8 +1398,8 @@ OperationView = (function(_super) {
if (this.model.oauth.scopes === void 0) { if (this.model.oauth.scopes === void 0) {
this.model.oauth.scopes = []; this.model.oauth.scopes = [];
} }
for (_j = 0, _len1 = v.length; _j < _len1; _j++) { for (m = 0, len1 = v.length; m < len1; m++) {
o = v[_j]; o = v[m];
this.model.oauth.scopes.push(o); this.model.oauth.scopes.push(o);
} }
} }
@@ -1408,9 +1408,9 @@ OperationView = (function(_super) {
} }
if (typeof this.model.responses !== 'undefined') { if (typeof this.model.responses !== 'undefined') {
this.model.responseMessages = []; this.model.responseMessages = [];
_ref1 = this.model.responses; ref2 = this.model.responses;
for (code in _ref1) { for (code in ref2) {
value = _ref1[code]; value = ref2[code];
schema = null; schema = null;
schemaObj = this.model.responses[code].schema; schemaObj = this.model.responses[code].schema;
if (schemaObj && schemaObj['$ref']) { if (schemaObj && schemaObj['$ref']) {
@@ -1466,9 +1466,9 @@ OperationView = (function(_super) {
}; };
contentTypeModel.consumes = this.model.consumes; contentTypeModel.consumes = this.model.consumes;
contentTypeModel.produces = this.model.produces; contentTypeModel.produces = this.model.produces;
_ref2 = this.model.parameters; ref3 = this.model.parameters;
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { for (n = 0, len2 = ref3.length; n < len2; n++) {
param = _ref2[_k]; param = ref3[n];
type = param.type || param.dataType || ''; type = param.type || param.dataType || '';
if (typeof type === 'undefined') { if (typeof type === 'undefined') {
schema = param.schema; schema = param.schema;
@@ -1492,14 +1492,14 @@ OperationView = (function(_super) {
model: contentTypeModel model: contentTypeModel
}); });
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el); $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
_ref3 = this.model.parameters; ref4 = this.model.parameters;
for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { for (p = 0, len3 = ref4.length; p < len3; p++) {
param = _ref3[_l]; param = ref4[p];
this.addParameter(param, contentTypeModel.consumes); this.addParameter(param, contentTypeModel.consumes);
} }
_ref4 = this.model.responseMessages; ref5 = this.model.responseMessages;
for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) { for (q = 0, len4 = ref5.length; q < len4; q++) {
statusCode = _ref4[_m]; statusCode = ref5[q];
this.addStatusCode(statusCode); this.addStatusCode(statusCode);
} }
return this; return this;
@@ -1526,7 +1526,7 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.submitOperation = function(e) { OperationView.prototype.submitOperation = function(e) {
var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2; var error_free, form, isFileUpload, l, len, len1, len2, m, map, n, o, opts, ref1, ref2, ref3, val;
if (e != null) { if (e != null) {
e.preventDefault(); e.preventDefault();
} }
@@ -1566,9 +1566,9 @@ OperationView = (function(_super) {
parent: this parent: this
}; };
isFileUpload = false; isFileUpload = false;
_ref = form.find("input"); ref1 = form.find("input");
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (l = 0, len = ref1.length; l < len; l++) {
o = _ref[_i]; o = ref1[l];
if ((o.value != null) && jQuery.trim(o.value).length > 0) { if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value; map[o.name] = o.value;
} }
@@ -1577,16 +1577,16 @@ OperationView = (function(_super) {
isFileUpload = true; isFileUpload = true;
} }
} }
_ref1 = form.find("textarea"); ref2 = form.find("textarea");
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { for (m = 0, len1 = ref2.length; m < len1; m++) {
o = _ref1[_j]; o = ref2[m];
if ((o.value != null) && jQuery.trim(o.value).length > 0) { if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value; map[o.name] = o.value;
} }
} }
_ref2 = form.find("select"); ref3 = form.find("select");
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { for (n = 0, len2 = ref3.length; n < len2; n++) {
o = _ref2[_k]; o = ref3[n];
val = this.getSelectedValue(o); val = this.getSelectedValue(o);
if ((val != null) && jQuery.trim(val).length > 0) { if ((val != null) && jQuery.trim(val).length > 0) {
map[o.name] = val; map[o.name] = val;
@@ -1608,19 +1608,19 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.handleFileUpload = function(map, form) { OperationView.prototype.handleFileUpload = function(map, form) {
var bodyParam, el, headerParams, o, obj, param, params, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3; var bodyParam, el, headerParams, l, len, len1, len2, len3, m, n, o, obj, p, param, params, ref1, ref2, ref3, ref4;
_ref = form.serializeArray(); ref1 = form.serializeArray();
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (l = 0, len = ref1.length; l < len; l++) {
o = _ref[_i]; o = ref1[l];
if ((o.value != null) && jQuery.trim(o.value).length > 0) { if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value; map[o.name] = o.value;
} }
} }
bodyParam = new FormData(); bodyParam = new FormData();
params = 0; params = 0;
_ref1 = this.model.parameters; ref2 = this.model.parameters;
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { for (m = 0, len1 = ref2.length; m < len1; m++) {
param = _ref1[_j]; param = ref2[m];
if (param.paramType === 'form' || param["in"] === 'formData') { if (param.paramType === 'form' || param["in"] === 'formData') {
if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) { if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) {
bodyParam.append(param.name, map[param.name]); bodyParam.append(param.name, map[param.name]);
@@ -1628,16 +1628,16 @@ OperationView = (function(_super) {
} }
} }
headerParams = {}; headerParams = {};
_ref2 = this.model.parameters; ref3 = this.model.parameters;
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { for (n = 0, len2 = ref3.length; n < len2; n++) {
param = _ref2[_k]; param = ref3[n];
if (param.paramType === 'header') { if (param.paramType === 'header') {
headerParams[param.name] = map[param.name]; headerParams[param.name] = map[param.name];
} }
} }
_ref3 = form.find('input[type~="file"]'); ref4 = form.find('input[type~="file"]');
for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { for (p = 0, len3 = ref4.length; p < len3; p++) {
el = _ref3[_l]; el = ref4[p];
if (typeof el.files[0] !== 'undefined') { if (typeof el.files[0] !== 'undefined') {
bodyParam.append($(el).attr('name'), el.files[0]); bodyParam.append($(el).attr('name'), el.files[0]);
params += 1; params += 1;
@@ -1681,11 +1681,11 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.wrap = function(data) { OperationView.prototype.wrap = function(data) {
var h, headerArray, headers, i, o, _i, _len; var h, headerArray, headers, i, l, len, o;
headers = {}; headers = {};
headerArray = data.getAllResponseHeaders().split("\r"); headerArray = data.getAllResponseHeaders().split("\r");
for (_i = 0, _len = headerArray.length; _i < _len; _i++) { for (l = 0, len = headerArray.length; l < len; l++) {
i = headerArray[_i]; i = headerArray[l];
h = i.match(/^([^:]*?):(.*)$/); h = i.match(/^([^:]*?):(.*)$/);
if (!h) { if (!h) {
h = []; h = [];
@@ -1706,14 +1706,14 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.getSelectedValue = function(select) { OperationView.prototype.getSelectedValue = function(select) {
var opt, options, _i, _len, _ref; var l, len, opt, options, ref1;
if (!select.multiple) { if (!select.multiple) {
return select.value; return select.value;
} else { } else {
options = []; options = [];
_ref = select.options; ref1 = select.options;
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (l = 0, len = ref1.length; l < len; l++) {
opt = _ref[_i]; opt = ref1[l];
if (opt.selected) { if (opt.selected) {
options.push(opt.value); options.push(opt.value);
} }
@@ -1749,7 +1749,7 @@ OperationView = (function(_super) {
}; };
OperationView.prototype.formatXml = function(xml) { OperationView.prototype.formatXml = function(xml) {
var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len; var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;
reg = /(>)(<)(\/*)/g; reg = /(>)(<)(\/*)/g;
wsexp = /[ ]*(.*)[ ]+\n/g; wsexp = /[ ]*(.*)[ ]+\n/g;
contexp = /(<.+>)(.+\n)/g; contexp = /(<.+>)(.+\n)/g;
@@ -1777,7 +1777,7 @@ OperationView = (function(_super) {
'other->opening': 0, 'other->opening': 0,
'other->other': 0 'other->other': 0
}; };
_fn = function(ln) { fn = function(ln) {
var fromTo, j, key, padding, type, types, value; var fromTo, j, key, padding, type, types, value;
types = { types = {
single: Boolean(ln.match(/<.+\/>/)), single: Boolean(ln.match(/<.+\/>/)),
@@ -1785,15 +1785,15 @@ OperationView = (function(_super) {
opening: Boolean(ln.match(/<[^!?].*>/)) opening: Boolean(ln.match(/<[^!?].*>/))
}; };
type = ((function() { type = ((function() {
var _results; var results;
_results = []; results = [];
for (key in types) { for (key in types) {
value = types[key]; value = types[key];
if (value) { if (value) {
_results.push(key); results.push(key);
} }
} }
return _results; return results;
})())[0]; })())[0];
type = type === void 0 ? 'other' : type; type = type === void 0 ? 'other' : type;
fromTo = lastType + '->' + type; fromTo = lastType + '->' + type;
@@ -1801,12 +1801,12 @@ OperationView = (function(_super) {
padding = ''; padding = '';
indent += transitions[fromTo]; indent += transitions[fromTo];
padding = ((function() { padding = ((function() {
var _j, _ref, _results; var m, ref1, results;
_results = []; results = [];
for (j = _j = 0, _ref = indent; 0 <= _ref ? _j < _ref : _j > _ref; j = 0 <= _ref ? ++_j : --_j) { for (j = m = 0, ref1 = indent; 0 <= ref1 ? m < ref1 : m > ref1; j = 0 <= ref1 ? ++m : --m) {
_results.push(' '); results.push(' ');
} }
return _results; return results;
})()).join(''); })()).join('');
if (fromTo === 'opening->closing') { if (fromTo === 'opening->closing') {
return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n'; return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';
@@ -1814,9 +1814,9 @@ OperationView = (function(_super) {
return formatted += padding + ln + '\n'; return formatted += padding + ln + '\n';
} }
}; };
for (_i = 0, _len = lines.length; _i < _len; _i++) { for (l = 0, len = lines.length; l < len; l++) {
ln = lines[_i]; ln = lines[l];
_fn(ln); fn(ln);
} }
return formatted; return formatted;
}; };
@@ -1898,11 +1898,11 @@ OperationView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var ParameterContentTypeView, var ParameterContentTypeView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ParameterContentTypeView = (function(_super) { ParameterContentTypeView = (function(superClass) {
__extends(ParameterContentTypeView, _super); extend(ParameterContentTypeView, superClass);
function ParameterContentTypeView() { function ParameterContentTypeView() {
return ParameterContentTypeView.__super__.constructor.apply(this, arguments); return ParameterContentTypeView.__super__.constructor.apply(this, arguments);
@@ -1927,11 +1927,11 @@ ParameterContentTypeView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var ParameterView, var ParameterView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ParameterView = (function(_super) { ParameterView = (function(superClass) {
__extends(ParameterView, _super); extend(ParameterView, superClass);
function ParameterView() { function ParameterView() {
return ParameterView.__super__.constructor.apply(this, arguments); return ParameterView.__super__.constructor.apply(this, arguments);
@@ -2036,11 +2036,11 @@ ParameterView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var ResourceView, var ResourceView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ResourceView = (function(_super) { ResourceView = (function(superClass) {
__extends(ResourceView, _super); extend(ResourceView, superClass);
function ResourceView() { function ResourceView() {
return ResourceView.__super__.constructor.apply(this, arguments); return ResourceView.__super__.constructor.apply(this, arguments);
@@ -2060,12 +2060,12 @@ ResourceView = (function(_super) {
}; };
ResourceView.prototype.render = function() { ResourceView.prototype.render = function() {
var counter, id, methods, operation, _i, _len, _ref; var counter, i, id, len, methods, operation, ref;
methods = {}; methods = {};
$(this.el).html(Handlebars.templates.resource(this.model)); $(this.el).html(Handlebars.templates.resource(this.model));
_ref = this.model.operationsArray; ref = this.model.operationsArray;
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (i = 0, len = ref.length; i < len; i++) {
operation = _ref[_i]; operation = ref[i];
counter = 0; counter = 0;
id = operation.nickname; id = operation.nickname;
while (typeof methods[id] !== 'undefined') { while (typeof methods[id] !== 'undefined') {
@@ -2107,11 +2107,11 @@ ResourceView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var ResponseContentTypeView, var ResponseContentTypeView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
ResponseContentTypeView = (function(_super) { ResponseContentTypeView = (function(superClass) {
__extends(ResponseContentTypeView, _super); extend(ResponseContentTypeView, superClass);
function ResponseContentTypeView() { function ResponseContentTypeView() {
return ResponseContentTypeView.__super__.constructor.apply(this, arguments); return ResponseContentTypeView.__super__.constructor.apply(this, arguments);
@@ -2136,11 +2136,11 @@ ResponseContentTypeView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var SignatureView, var SignatureView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
SignatureView = (function(_super) { SignatureView = (function(superClass) {
__extends(SignatureView, _super); extend(SignatureView, superClass);
function SignatureView() { function SignatureView() {
return SignatureView.__super__.constructor.apply(this, arguments); return SignatureView.__super__.constructor.apply(this, arguments);
@@ -2208,11 +2208,11 @@ SignatureView = (function(_super) {
})(Backbone.View); })(Backbone.View);
var StatusCodeView, var StatusCodeView,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__hasProp = {}.hasOwnProperty; hasProp = {}.hasOwnProperty;
StatusCodeView = (function(_super) { StatusCodeView = (function(superClass) {
__extends(StatusCodeView, _super); extend(StatusCodeView, superClass);
function StatusCodeView() { function StatusCodeView() {
return StatusCodeView.__super__.constructor.apply(this, arguments); return StatusCodeView.__super__.constructor.apply(this, arguments);

File diff suppressed because one or more lines are too long

View File

@@ -22,28 +22,28 @@
}, },
"devDependencies": { "devDependencies": {
"chai": "^1.10.0", "chai": "^1.10.0",
"cors": "2.1.1", "cors": "^2.1.1",
"docco": "0.4.x", "docco": "^0.4.0",
"event-stream": "^3.2.1", "event-stream": "^3.2.2",
"express": "3.x", "express": "^3.20.0",
"gulp": "^3.8.10", "gulp": "^3.8.11",
"gulp-clean": "^0.3.1", "gulp-clean": "^0.3.1",
"gulp-coffee": "^2.2.0", "gulp-coffee": "^2.3.1",
"gulp-concat": "^2.4.3", "gulp-concat": "^2.5.2",
"gulp-connect": "^2.2.0", "gulp-connect": "^2.2.0",
"gulp-declare": "^0.3.0", "gulp-declare": "^0.3.0",
"gulp-handlebars": "^3.0.1", "gulp-handlebars": "^3.0.1",
"gulp-header": "1.2.2", "gulp-header": "1.2.2",
"gulp-less": "^2.0.1", "gulp-less": "^3.0.1",
"gulp-order": "^1.1.1", "gulp-order": "^1.1.1",
"gulp-rename": "^1.2.0", "gulp-rename": "^1.2.0",
"gulp-uglify": "^1.1.0", "gulp-uglify": "^1.1.0",
"gulp-util": "^3.0.2", "gulp-util": "^3.0.4",
"gulp-watch": "^4.1.0", "gulp-watch": "^4.1.1",
"gulp-wrap": "^0.10.1", "gulp-wrap": "^0.10.1",
"http-server": "^0.7.4", "http-server": "^0.7.5",
"less": "~1.4.2", "less": "^1.4.2",
"mocha": "^2.1.0", "mocha": "^2.1.0",
"selenium-webdriver": "^2.44.0" "selenium-webdriver": "^2.45.0"
} }
} }