scratch

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 124  →  ?path2? @ 125
/bower_components/yaml.js/lib/Dumper.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Dumper, Inline, Utils;
 
Utils = require('./Utils');
/bower_components/yaml.js/lib/Escaper.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Escaper, Pattern;
 
Pattern = require('./Pattern');
/bower_components/yaml.js/lib/Exception/DumpException.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var DumpException,
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;
/bower_components/yaml.js/lib/Exception/ParseException.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var ParseException,
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;
/bower_components/yaml.js/lib/Exception/ParseMore.js
@@ -0,0 +1,27 @@
// Generated by CoffeeScript 1.12.4
var ParseMore,
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;
 
ParseMore = (function(superClass) {
extend(ParseMore, superClass);
 
function ParseMore(message, parsedLine, snippet) {
this.message = message;
this.parsedLine = parsedLine;
this.snippet = snippet;
}
 
ParseMore.prototype.toString = function() {
if ((this.parsedLine != null) && (this.snippet != null)) {
return '<ParseMore> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')';
} else {
return '<ParseMore> ' + this.message;
}
};
 
return ParseMore;
 
})(Error);
 
module.exports = ParseMore;
/bower_components/yaml.js/lib/Inline.js
@@ -1,5 +1,5 @@
// Generated by CoffeeScript 1.10.0
var DumpException, Escaper, Inline, ParseException, Pattern, Unescaper, Utils,
// Generated by CoffeeScript 1.12.4
var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
Pattern = require('./Pattern');
@@ -12,6 +12,8 @@
 
ParseException = require('./Exception/ParseException');
 
ParseMore = require('./Exception/ParseMore');
 
DumpException = require('./Exception/DumpException');
 
Inline = (function() {
@@ -113,7 +115,7 @@
return (type === 'string' ? "'" + value + "'" : String(parseFloat(value)));
}
if (type === 'number') {
return (value === Infinity ? '.Inf' : (value === -Infinity ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
return (value === 2e308 ? '.Inf' : (value === -2e308 ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
}
if (Escaper.requiresDoubleQuoting(value)) {
return Escaper.escapeWithDoubleQuotes(value);
@@ -220,7 +222,7 @@
var i, match, output;
i = context.i;
if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) {
throw new ParseException('Malformed inline YAML string (' + scalar.slice(i) + ').');
throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').');
}
output = match[0].substr(1, match[0].length - 2);
if ('"' === scalar.charAt(i)) {
@@ -234,7 +236,7 @@
};
 
Inline.parseSequence = function(sequence, context) {
var e, error, i, isQuoted, len, output, ref, value;
var e, i, isQuoted, len, output, ref, value;
output = [];
len = sequence.length;
i = context.i;
@@ -272,7 +274,7 @@
}
++i;
}
throw new ParseException('Malformed inline YAML string ' + sequence);
throw new ParseMore('Malformed inline YAML string ' + sequence);
};
 
Inline.parseMapping = function(mapping, context) {
@@ -340,7 +342,7 @@
}
}
}
throw new ParseException('Malformed inline YAML string ' + mapping);
throw new ParseMore('Malformed inline YAML string ' + mapping);
};
 
Inline.evaluateScalar = function(scalar, context) {
@@ -357,11 +359,11 @@
case 'false':
return false;
case '.inf':
return Infinity;
return 2e308;
case '.nan':
return NaN;
return 0/0;
case '-.inf':
return Infinity;
return 2e308;
default:
firstChar = scalarLower.charAt(0);
switch (firstChar) {
/bower_components/yaml.js/lib/Parser.js
@@ -1,5 +1,5 @@
// Generated by CoffeeScript 1.10.0
var Inline, ParseException, Parser, Pattern, Utils;
// Generated by CoffeeScript 1.12.4
var Inline, ParseException, ParseMore, Parser, Pattern, Utils;
 
Inline = require('./Inline');
 
@@ -9,6 +9,8 @@
 
ParseException = require('./Exception/ParseException');
 
ParseMore = require('./Exception/ParseMore');
 
Parser = (function() {
Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$');
 
@@ -28,13 +30,13 @@
 
Parser.prototype.PATTERN_TRAILING_LINES = new Pattern('(\n*)$');
 
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n');
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm');
 
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+');
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm');
 
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n');
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm');
 
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$');
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm');
 
Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {};
 
@@ -53,7 +55,7 @@
}
 
Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) {
var alias, allowOverwrite, block, c, context, data, e, error, error1, error2, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
var alias, allowOverwrite, block, c, context, data, e, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
if (exceptionOnInvalidType == null) {
exceptionOnInvalidType = false;
}
@@ -230,8 +232,8 @@
if (1 === lineCount || (2 === lineCount && Utils.isEmpty(this.lines[1]))) {
try {
value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder);
} catch (error1) {
e = error1;
} catch (error) {
e = error;
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
@@ -258,8 +260,8 @@
} else if ((ref2 = Utils.ltrim(value).charAt(0)) === '[' || ref2 === '{') {
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error2) {
e = error2;
} catch (error) {
e = error;
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
@@ -323,18 +325,16 @@
if (indent === newIndent) {
removeComments = !removeCommentsPattern.test(this.currentLine);
}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
if (removeComments && this.isCurrentLineComment()) {
continue;
}
if (this.isCurrentLineBlank()) {
data.push(this.currentLine.slice(newIndent));
continue;
}
if (removeComments && this.isCurrentLineComment()) {
if (indent === newIndent) {
continue;
}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
}
if (indent >= newIndent) {
data.push(this.currentLine.slice(newIndent));
@@ -363,7 +363,7 @@
};
 
Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) {
var e, error, error1, foldedIndent, matches, modifiers, pos, ref, ref1, val;
var e, foldedIndent, matches, modifiers, pos, ref, ref1, val;
if (0 === value.indexOf('*')) {
pos = value.indexOf('#');
if (pos !== -1) {
@@ -390,25 +390,26 @@
return val;
}
}
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error) {
e = error;
if (((ref1 = value.charAt(0)) === '[' || ref1 === '{') && e instanceof ParseException && this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") {
while (true) {
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error1) {
e = error1;
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
} catch (error) {
e = error;
if (e instanceof ParseMore && this.moveToNextLine()) {
value += "\n" + Utils.trim(this.currentLine, ' ');
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
}
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
} else {
if (this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
}
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
}
};
 
/bower_components/yaml.js/lib/Pattern.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Pattern;
 
Pattern = (function() {
@@ -106,7 +106,7 @@
count = 0;
while (this.regex.test(str) && (limit === 0 || count < limit)) {
this.regex.lastIndex = 0;
str = str.replace(this.regex, '');
str = str.replace(this.regex, replacement);
count++;
}
return [str, count];
/bower_components/yaml.js/lib/Unescaper.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Pattern, Unescaper, Utils;
 
Utils = require('./Utils');
/bower_components/yaml.js/lib/Utils.js
@@ -1,5 +1,6 @@
// Generated by CoffeeScript 1.10.0
var Pattern, Utils;
// Generated by CoffeeScript 1.12.4
var Pattern, Utils,
hasProp = {}.hasOwnProperty;
 
Pattern = require('./Pattern');
 
@@ -27,7 +28,6 @@
if (_char == null) {
_char = '\\s';
}
return str.trim();
regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char];
if (regexLeft == null) {
this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*');
@@ -68,9 +68,22 @@
};
 
Utils.isEmpty = function(value) {
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0);
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value);
};
 
Utils.isEmptyObject = function(value) {
var k;
return value instanceof Object && ((function() {
var results;
results = [];
for (k in value) {
if (!hasProp.call(value, k)) continue;
results.push(k);
}
return results;
})()).length === 0;
};
 
Utils.subStrCount = function(string, subString, start, length) {
var c, i, j, len, ref, sublen;
c = 0;
@@ -200,7 +213,7 @@
}
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
if (tz_offset) {
date.setTime(date.getTime() + tz_offset);
date.setTime(date.getTime() - tz_offset);
}
return date;
};
@@ -231,7 +244,7 @@
name = ref[j];
try {
xhr = new ActiveXObject(name);
} catch (undefined) {}
} catch (error) {}
}
}
}
/bower_components/yaml.js/lib/Yaml.js
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Dumper, Parser, Utils, Yaml;
 
Parser = require('./Parser');
@@ -70,17 +70,6 @@
return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder);
};
 
Yaml.register = function() {
var require_handler;
require_handler = function(module, filename) {
return module.exports = YAML.parseFile(filename);
};
if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) {
require.extensions['.yml'] = require_handler;
return require.extensions['.yaml'] = require_handler;
}
};
 
Yaml.stringify = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) {
return this.dump(input, inline, indent, exceptionOnInvalidType, objectEncoder);
};