spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.5.2 vs spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.5.3
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357971343.144897:@value"Z{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1359169927.856522:@value"'ˆ{I"
class:EFI"BundledAsset; FI"logical_path; FI"teabag/mocha.js; FI"
pathname; FI"P/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/mocha.coffee; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2013-01-11T23:15:01-07:00; FI"length; FiEXI"digest; F"%9fdd07e5bc8e36bddfe6ccf6af2560a1I"source; FI"EX;(function(){
+mtime; FI"2013-01-25T20:11:53-07:00; FI"length; FiU†I"digest; F"%d98c46e40354c65abf100704cd722a4bI"source; FI"U†;(function(){
// CommonJS require()
function require(p){
@@ -58,11 +58,298 @@
}
};
}); // module: browser/debug.js
require.register("browser/diff.js", function(module, exports, require){
+ /* See license.txt for terms of usage */
+ /*
+ * Text diff implementation.
+ *
+ * This library supports the following APIS:
+ * JsDiff.diffChars: Character by character diff
+ * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
+ * JsDiff.diffLines: Line based diff
+ *
+ * JsDiff.diffCss: Diff targeted at CSS content
+ *
+ * These methods are based on the implementation proposed in
+ * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
+ * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
+ */
+ var JsDiff = (function() {
+ function clonePath(path) {
+ return { newPos: path.newPos, components: path.components.slice(0) };
+ }
+ function removeEmpty(array) {
+ var ret = [];
+ for (var i = 0; i < array.length; i++) {
+ if (array[i]) {
+ ret.push(array[i]);
+ }
+ }
+ return ret;
+ }
+ function escapeHTML(s) {
+ var n = s;
+ n = n.replace(/&/g, "&");
+ n = n.replace(/</g, "<");
+ n = n.replace(/>/g, ">");
+ n = n.replace(/"/g, """);
+
+ return n;
+ }
+
+
+ var fbDiff = function(ignoreWhitespace) {
+ this.ignoreWhitespace = ignoreWhitespace;
+ };
+ fbDiff.prototype = {
+ diff: function(oldString, newString) {
+ // Handle the identity case (this is due to unrolling editLength == 0
+ if (newString == oldString) {
+ return [{ value: newString }];
+ }
+ if (!newString) {
+ return [{ value: oldString, removed: true }];
+ }
+ if (!oldString) {
+ return [{ value: newString, added: true }];
+ }
+
+ newString = this.tokenize(newString);
+ oldString = this.tokenize(oldString);
+
+ var newLen = newString.length, oldLen = oldString.length;
+ var maxEditLength = newLen + oldLen;
+ var bestPath = [{ newPos: -1, components: [] }];
+
+ // Seed editLength = 0
+ var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+ if (bestPath[0].newPos+1 >= newLen && oldPos+1 >= oldLen) {
+ return bestPath[0].components;
+ }
+
+ for (var editLength = 1; editLength <= maxEditLength; editLength++) {
+ for (var diagonalPath = -1*editLength; diagonalPath <= editLength; diagonalPath+=2) {
+ var basePath;
+ var addPath = bestPath[diagonalPath-1],
+ removePath = bestPath[diagonalPath+1];
+ oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
+ if (addPath) {
+ // No one else is going to attempt to use this value, clear it
+ bestPath[diagonalPath-1] = undefined;
+ }
+
+ var canAdd = addPath && addPath.newPos+1 < newLen;
+ var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;
+ if (!canAdd && !canRemove) {
+ bestPath[diagonalPath] = undefined;
+ continue;
+ }
+
+ // Select the diagonal that we want to branch from. We select the prior
+ // path whose position in the new string is the farthest from the origin
+ // and does not pass the bounds of the diff graph
+ if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {
+ basePath = clonePath(removePath);
+ this.pushComponent(basePath.components, oldString[oldPos], undefined, true);
+ } else {
+ basePath = clonePath(addPath);
+ basePath.newPos++;
+ this.pushComponent(basePath.components, newString[basePath.newPos], true, undefined);
+ }
+
+ var oldPos = this.extractCommon(basePath, newString, oldString, diagonalPath);
+
+ if (basePath.newPos+1 >= newLen && oldPos+1 >= oldLen) {
+ return basePath.components;
+ } else {
+ bestPath[diagonalPath] = basePath;
+ }
+ }
+ }
+ },
+
+ pushComponent: function(components, value, added, removed) {
+ var last = components[components.length-1];
+ if (last && last.added === added && last.removed === removed) {
+ // We need to clone here as the component clone operation is just
+ // as shallow array clone
+ components[components.length-1] =
+ {value: this.join(last.value, value), added: added, removed: removed };
+ } else {
+ components.push({value: value, added: added, removed: removed });
+ }
+ },
+ extractCommon: function(basePath, newString, oldString, diagonalPath) {
+ var newLen = newString.length,
+ oldLen = oldString.length,
+ newPos = basePath.newPos,
+ oldPos = newPos - diagonalPath;
+ while (newPos+1 < newLen && oldPos+1 < oldLen && this.equals(newString[newPos+1], oldString[oldPos+1])) {
+ newPos++;
+ oldPos++;
+
+ this.pushComponent(basePath.components, newString[newPos], undefined, undefined);
+ }
+ basePath.newPos = newPos;
+ return oldPos;
+ },
+
+ equals: function(left, right) {
+ var reWhitespace = /\S/;
+ if (this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right)) {
+ return true;
+ } else {
+ return left == right;
+ }
+ },
+ join: function(left, right) {
+ return left + right;
+ },
+ tokenize: function(value) {
+ return value;
+ }
+ };
+
+ var CharDiff = new fbDiff();
+
+ var WordDiff = new fbDiff(true);
+ WordDiff.tokenize = function(value) {
+ return removeEmpty(value.split(/(\s+|\b)/));
+ };
+
+ var CssDiff = new fbDiff(true);
+ CssDiff.tokenize = function(value) {
+ return removeEmpty(value.split(/([{}:;,]|\s+)/));
+ };
+
+ var LineDiff = new fbDiff();
+ LineDiff.tokenize = function(value) {
+ return value.split(/^/m);
+ };
+
+ return {
+ diffChars: function(oldStr, newStr) { return CharDiff.diff(oldStr, newStr); },
+ diffWords: function(oldStr, newStr) { return WordDiff.diff(oldStr, newStr); },
+ diffLines: function(oldStr, newStr) { return LineDiff.diff(oldStr, newStr); },
+
+ diffCss: function(oldStr, newStr) { return CssDiff.diff(oldStr, newStr); },
+
+ createPatch: function(fileName, oldStr, newStr, oldHeader, newHeader) {
+ var ret = [];
+
+ ret.push("Index: " + fileName);
+ ret.push("===================================================================");
+ ret.push("--- " + fileName + (typeof oldHeader === "undefined" ? "" : "\t" + oldHeader));
+ ret.push("+++ " + fileName + (typeof newHeader === "undefined" ? "" : "\t" + newHeader));
+
+ var diff = LineDiff.diff(oldStr, newStr);
+ if (!diff[diff.length-1].value) {
+ diff.pop(); // Remove trailing newline add
+ }
+ diff.push({value: "", lines: []}); // Append an empty value to make cleanup easier
+
+ function contextLines(lines) {
+ return lines.map(function(entry) { return ' ' + entry; });
+ }
+ function eofNL(curRange, i, current) {
+ var last = diff[diff.length-2],
+ isLast = i === diff.length-2,
+ isLastOfType = i === diff.length-3 && (current.added === !last.added || current.removed === !last.removed);
+
+ // Figure out if this is the last line for the given file and missing NL
+ if (!/\n$/.test(current.value) && (isLast || isLastOfType)) {
+ curRange.push('\\ No newline at end of file');
+ }
+ }
+
+ var oldRangeStart = 0, newRangeStart = 0, curRange = [],
+ oldLine = 1, newLine = 1;
+ for (var i = 0; i < diff.length; i++) {
+ var current = diff[i],
+ lines = current.lines || current.value.replace(/\n$/, "").split("\n");
+ current.lines = lines;
+
+ if (current.added || current.removed) {
+ if (!oldRangeStart) {
+ var prev = diff[i-1];
+ oldRangeStart = oldLine;
+ newRangeStart = newLine;
+
+ if (prev) {
+ curRange = contextLines(prev.lines.slice(-4));
+ oldRangeStart -= curRange.length;
+ newRangeStart -= curRange.length;
+ }
+ }
+ curRange.push.apply(curRange, lines.map(function(entry) { return (current.added?"+":"-") + entry; }));
+ eofNL(curRange, i, current);
+
+ if (current.added) {
+ newLine += lines.length;
+ } else {
+ oldLine += lines.length;
+ }
+ } else {
+ if (oldRangeStart) {
+ // Close out any changes that have been output (or join overlapping)
+ if (lines.length <= 8 && i < diff.length-2) {
+ // Overlapping
+ curRange.push.apply(curRange, contextLines(lines));
+ } else {
+ // end the range and output
+ var contextSize = Math.min(lines.length, 4);
+ ret.push(
+ "@@ -" + oldRangeStart + "," + (oldLine-oldRangeStart+contextSize)
+ + " +" + newRangeStart + "," + (newLine-newRangeStart+contextSize)
+ + " @@");
+ ret.push.apply(ret, curRange);
+ ret.push.apply(ret, contextLines(lines.slice(0, contextSize)));
+ if (lines.length <= 4) {
+ eofNL(ret, i, current);
+ }
+
+ oldRangeStart = 0; newRangeStart = 0; curRange = [];
+ }
+ }
+ oldLine += lines.length;
+ newLine += lines.length;
+ }
+ }
+
+ return ret.join('\n') + '\n';
+ },
+
+ convertChangesToXML: function(changes){
+ var ret = [];
+ for ( var i = 0; i < changes.length; i++) {
+ var change = changes[i];
+ if (change.added) {
+ ret.push("<ins>");
+ } else if (change.removed) {
+ ret.push("<del>");
+ }
+
+ ret.push(escapeHTML(change.value));
+
+ if (change.added) {
+ ret.push("</ins>");
+ } else if (change.removed) {
+ ret.push("</del>");
+ }
+ }
+ return ret.join("");
+ }
+ };
+ })();
+
+ if (typeof module !== "undefined") {
+ module.exports = JsDiff;
+ }
+
}); // module: browser/diff.js
require.register("browser/events.js", function(module, exports, require){
/**
@@ -494,11 +781,13 @@
/**
* Inherit from `Runnable.prototype`.
*/
- Hook.prototype = new Runnable;
+ function F(){};
+ F.prototype = Runnable.prototype;
+ Hook.prototype = new F;
Hook.prototype.constructor = Hook;
/**
* Get or set the test `err`.
@@ -1005,10 +1294,11 @@
*
* - `ui` name "bdd", "tdd", "exports" etc
* - `reporter` reporter instance, defaults to `mocha.reporters.Dot`
* - `globals` array of accepted globals
* - `timeout` timeout in milliseconds
+ * - `bail` bail on the first test failure
* - `slow` milliseconds to wait before considering a test slow
* - `ignoreLeaks` ignore global leaks
* - `grep` string or regexp to filter tests with
*
* @param {Object} options
@@ -1020,16 +1310,30 @@
this.files = [];
this.options = options;
this.grep(options.grep);
this.suite = new exports.Suite('', new exports.Context);
this.ui(options.ui);
+ this.bail(options.bail);
this.reporter(options.reporter);
if (options.timeout) this.timeout(options.timeout);
if (options.slow) this.slow(options.slow);
}
/**
+ * Enable or disable bailing on the first failure.
+ *
+ * @param {Boolean} [bail]
+ * @api public
+ */
+
+ Mocha.prototype.bail = function(bail){
+ if (0 == arguments.length) bail = true;
+ this.suite.bail(bail);
+ return this;
+ };
+
+ /**
* Add test `file`.
*
* @param {String} file
* @api public
*/
@@ -1040,11 +1344,11 @@
};
/**
* Set reporter to `reporter`, defaults to "dot".
*
- * @param {String|Function} reporter name of a reporter or a reporter constructor
+ * @param {String|Function} reporter name or constructor
* @api public
*/
Mocha.prototype.reporter = function(reporter){
if ('function' == typeof reporter) {
@@ -1846,11 +2150,13 @@
/**
* Inherit from `Base.prototype`.
*/
- Dot.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ Dot.prototype = new F;
Dot.prototype.constructor = Dot;
}); // module: reporters/dot.js
require.register("reporters/html-cov.js", function(module, exports, require){
@@ -2073,11 +2379,11 @@
if (!test.pending) {
var h2 = el.getElementsByTagName('h2')[0];
on(h2, 'click', function(){
pre.style.display = 'none' == pre.style.display
- ? 'inline-block'
+ ? 'block'
: 'none';
});
var pre = fragment('<pre><code>%e</code></pre>', utils.clean(test.fn.toString()));
el.appendChild(pre);
@@ -2578,11 +2884,13 @@
/**
* Inherit from `Base.prototype`.
*/
- Landing.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ Landing.prototype = new F;
Landing.prototype.constructor = Landing;
}); // module: reporters/landing.js
require.register("reporters/list.js", function(module, exports, require){
@@ -2647,11 +2955,13 @@
/**
* Inherit from `Base.prototype`.
*/
- List.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ List.prototype = new F;
List.prototype.constructor = List;
}); // module: reporters/list.js
@@ -2679,11 +2989,10 @@
function Markdown(runner) {
Base.call(this, runner);
var self = this
, stats = this.stats
- , total = runner.total
, level = 0
, buf = '';
function title(str) {
return Array(level).join('#') + ' ' + str;
@@ -2786,11 +3095,13 @@
/**
* Inherit from `Base.prototype`.
*/
- Min.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ Min.prototype = new F;
Min.prototype.constructor = Min;
}); // module: reporters/min.js
require.register("reporters/nyan.js", function(module, exports, require){
@@ -3050,11 +3361,13 @@
/**
* Inherit from `Base.prototype`.
*/
- NyanCat.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ NyanCat.prototype = new F;
NyanCat.prototype.constructor = NyanCat;
}); // module: reporters/nyan.js
@@ -3142,11 +3455,13 @@
/**
* Inherit from `Base.prototype`.
*/
- Progress.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ Progress.prototype = new F;
Progress.prototype.constructor = Progress;
}); // module: reporters/progress.js
@@ -3235,11 +3550,13 @@
/**
* Inherit from `Base.prototype`.
*/
- Spec.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ Spec.prototype = new F;
Spec.prototype.constructor = Spec;
}); // module: reporters/spec.js
@@ -3271,11 +3588,11 @@
var self = this
, stats = this.stats
, n = 1
, passes = 0
- , failures = 1;
+ , failures = 0;
runner.on('start', function(){
var total = runner.grepTotal(runner.suite);
console.log('%d..%d', 1, total);
});
@@ -3294,11 +3611,11 @@
});
runner.on('fail', function(test, err){
failures++;
console.log('not ok %d %s', n, title(test));
- console.log(err.stack.replace(/^/gm, ' '));
+ if (err.stack) console.log(err.stack.replace(/^/gm, ' '));
});
runner.on('end', function(){
console.log('# tests ' + (passes + failures));
console.log('# pass ' + passes);
@@ -3454,11 +3771,13 @@
/**
* Inherit from `Base.prototype`.
*/
- XUnit.prototype = new Base;
+ function F(){};
+ F.prototype = Base.prototype;
+ XUnit.prototype = new F;
XUnit.prototype.constructor = XUnit;
/**
* Output tag for the given `test.`
@@ -3562,11 +3881,13 @@
/**
* Inherit from `EventEmitter.prototype`.
*/
- Runnable.prototype = new EventEmitter;
+ function F(){};
+ F.prototype = EventEmitter.prototype;
+ Runnable.prototype = new F;
Runnable.prototype.constructor = Runnable;
/**
* Set & get timeout `ms`.
@@ -3707,11 +4028,11 @@
// async
if (this.async) {
try {
this.fn.call(ctx, function(err){
- if (toString.call(err) === "[object Error]") return done(err);
+ if (err instanceof Error || toString.call(err) === "[object Error]") return done(err);
if (null != err) return done(new Error('done() invoked with non-Error: ' + err));
done();
});
} catch (err) {
done(err);
@@ -3801,11 +4122,13 @@
/**
* Inherit from `EventEmitter.prototype`.
*/
- Runner.prototype = new EventEmitter;
+ function F(){};
+ F.prototype = EventEmitter.prototype;
+ Runner.prototype = new F;
Runner.prototype.constructor = Runner;
/**
* Run tests with full titles matching `re`. Updates runner.total
@@ -4341,11 +4664,13 @@
/**
* Inherit from `EventEmitter.prototype`.
*/
- Suite.prototype = new EventEmitter;
+ function F(){};
+ F.prototype = EventEmitter.prototype;
+ Suite.prototype = new F;
Suite.prototype.constructor = Suite;
/**
* Return a clone of this `Suite`.
@@ -4606,11 +4931,13 @@
/**
* Inherit from `Runnable.prototype`.
*/
- Test.prototype = new Runnable;
+ function F(){};
+ F.prototype = Runnable.prototype;
+ Test.prototype = new F;
Test.prototype.constructor = Test;
}); // module: test.js
@@ -6230,6 +6557,6 @@
})(Teabag.fixture);
env = mocha.setup("bdd");
}).call(this);
-; TI"required_assets_digest; F"%6c6b35b8a015013e28d04926dd12c9a0I"
_version; F"%6776f581a4329e299531e1d52aa59832
+; TI"required_assets_digest; F"%d4a8556aaa28f530f6ed239ba0eab0e2I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file