spec/dummy/tmp/cache/assets/D6A/950/sprockets%2F429b1806cb7580ebf29f9a12c33cbea6 in teabag-0.7.0 vs spec/dummy/tmp/cache/assets/D6A/950/sprockets%2F429b1806cb7580ebf29f9a12c33cbea6 in teabag-0.7.1

- old
+ new

@@ -1,8 +1,8 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1362446134.245218: @value"{¬{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1365828769.7870662: @value"¥­{I" class:EFI"BundledAsset;FI"logical_path;FI"teabag-jasmine.js;FI" pathname;FI"N/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag-jasmine.js;FI"content_type;FI"application/javascript;FI" -mtime;FI"2013-03-04T18:14:44-07:00;FI" length;Fi©ªI" digest;F"%f01eb95eb22b928ac36cd5e7b2ab81fdI" source;FI"©ªvar isCommonJS = typeof window == "undefined" && typeof exports == "object"; +mtime;FI"2013-04-03T10:24:08-06:00;FI" length;FiÓ«I" digest;F"%57dffe6818c59c75325ab7c03824812bI" source;FI"Ó«var isCommonJS = typeof window == "undefined" && typeof exports == "object"; /** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * * @namespace @@ -2601,13 +2601,11 @@ "minor": 3, "build": 1, "revision": 1354556913 }; (function() { - this.Teabag = (function() { - function Teabag() {} Teabag.defer = false; Teabag.slow = 75; @@ -2635,10 +2633,11 @@ return new Teabag.Runner(); }; Teabag.resolveDependenciesFromParams = function(all) { var dep, deps, file, parts, path, paths, _i, _j, _len, _len1; + if (all == null) { all = []; } deps = []; if ((paths = this.location.search.match(/[\?&]file(\[\])?=[^&\?]*/gi)) === null) { @@ -2660,20 +2659,24 @@ } return deps; }; Teabag.log = function() { + var e; + this.messages.push(arguments[0]); try { return console.log.apply(console, arguments); - } catch (e) { + } catch (_error) { + e = _error; throw new Error("Unable to use console.log for logging"); } }; Teabag.getMessages = function() { var messages; + messages = this.messages; this.messages = []; return messages; }; @@ -2681,13 +2684,11 @@ })(); }).call(this); (function() { - Teabag.Runner = (function() { - Runner.run = false; function Runner() { if (this.constructor.run) { return; @@ -2698,10 +2699,11 @@ this.setup(); } Runner.prototype.getParams = function() { var name, param, params, value, _i, _len, _ref, _ref1; + params = {}; _ref = Teabag.location.search.substring(1).split("&"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { param = _ref[_i]; _ref1 = param.split("="), name = _ref1[0], value = _ref1[1]; @@ -2744,10 +2746,11 @@ fixture.json = []; fixture.preload = function() { var url, urls, _i, _len, _results; + urls = 1 <= arguments.length ? __slice.call(arguments, 0) : []; _results = []; for (_i = 0, _len = urls.length; _i < _len; _i++) { url = urls[_i]; _results.push(preload(url)); @@ -2755,10 +2758,11 @@ return _results; }; fixture.load = function() { var append, index, url, urls, _i, _j, _len, _results; + urls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { @@ -2773,10 +2777,11 @@ return _results; }; fixture.set = function() { var append, html, htmls, index, _i, _j, _len, _results; + htmls = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), append = arguments[_i++]; if (append == null) { append = false; } if (typeof append !== "boolean") { @@ -2805,10 +2810,11 @@ return load(url, false, true); }; load = function(url, append, preload) { var cached, value; + if (preload == null) { preload = false; } if (cached = Teabag.fixture.cache[url]) { return loadComplete(url, cached.type, cached.content, append, preload); @@ -2866,40 +2872,45 @@ return Teabag.fixture.el.innerHTML += content; }; create = function() { var _ref; + Teabag.fixture.el = document.createElement("div"); if (typeof window.$ === 'function') { Teabag.fixture.$el = $(Teabag.fixture.el); } Teabag.fixture.el.id = "teabag-fixtures"; return (_ref = document.body) != null ? _ref.appendChild(Teabag.fixture.el) : void 0; }; cleanup = function() { var _base, _ref, _ref1; + (_base = Teabag.fixture).el || (_base.el = document.getElementById("teabag-fixtures")); if ((_ref = Teabag.fixture.el) != null) { if ((_ref1 = _ref.parentNode) != null) { _ref1.removeChild(Teabag.fixture.el); } } return Teabag.fixture.el = null; }; xhrRequest = function(url, callback) { + var e; + if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { + } catch (_error) { + e = _error; try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - + } catch (_error) { + e = _error; } } } if (!xhr) { throw "Unable to make Ajax Request"; @@ -2913,13 +2924,11 @@ }).call(this); }).call(this); (function() { - Teabag.Reporters.BaseView = (function() { - function BaseView() { this.elements = {}; this.build(); } @@ -2935,32 +2944,36 @@ return this.el.appendChild(el); }; BaseView.prototype.createEl = function(type, className) { var el; + if (className == null) { className = ""; } el = document.createElement(type); el.className = className; return el; }; BaseView.prototype.findEl = function(id) { var _base; + this.elements || (this.elements = {}); return (_base = this.elements)[id] || (_base[id] = document.getElementById("teabag-" + id)); }; BaseView.prototype.setText = function(id, value) { var el; + el = this.findEl(id); return el.innerHTML = value; }; BaseView.prototype.setHtml = function(id, value, add) { var el; + if (add == null) { add = false; } el = this.findEl(id); if (add) { @@ -2970,16 +2983,18 @@ } }; BaseView.prototype.setClass = function(id, value) { var el; + el = this.findEl(id); return el.className = value; }; BaseView.prototype.htmlSafe = function(str) { var el; + el = document.createElement("div"); el.appendChild(document.createTextNode(str)); return el.innerHTML; }; @@ -2992,18 +3007,15 @@ var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __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; }; Teabag.Reporters.HTML = (function(_super) { - __extends(HTML, _super); function HTML() { this.toggleConfig = __bind(this.toggleConfig, this); - - this.reportRunnerResults = __bind(this.reportRunnerResults, this); - this.start = new Teabag.Date().getTime(); + this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date().getTime(); this.config = { "use-catch": true, "build-full-report": false, "display-progress": true }; @@ -3024,10 +3036,11 @@ HTML.__super__.constructor.apply(this, arguments); } HTML.prototype.build = function() { var _ref; + this.buildLayout(); this.setText("env-info", this.envInfo()); this.setText("version", Teabag.version); this.findEl("toggles").onclick = this.toggleConfig; this.findEl("suites").innerHTML = this.buildSuiteSelect(); @@ -3041,18 +3054,20 @@ return this.buildFilters(); }; HTML.prototype.buildLayout = function() { var el; + el = this.createEl("div"); el.id = "teabag-interface"; el.innerHTML = Teabag.Reporters.HTML.template; return document.body.appendChild(el); }; HTML.prototype.buildSuiteSelect = function() { var options, suite, _i, _len, _ref; + if (Teabag.suites.all.length === 1) { return ""; } options = []; _ref = Teabag.suites.all; @@ -3125,10 +3140,11 @@ return this.setText("stats-" + name, value); }; HTML.prototype.updateStatus = function(spec) { var elapsed, result, _ref, _ref1; + spec = new Teabag.Spec(spec); result = spec.result(); if (result.skipped || result.status === "pending") { this.updateStat("skipped", this.total.skipped += 1); return; @@ -3153,10 +3169,11 @@ return this.progress.update(this.total.exist, this.total.run); }; HTML.prototype.showConfiguration = function() { var key, value, _ref, _results; + _ref = this.config; _results = []; for (key in _ref) { value = _ref[key]; _results.push(this.setClass(key, value ? "active" : "")); @@ -3168,10 +3185,11 @@ return document.body.className = "teabag-" + status; }; HTML.prototype.setFilters = function() { var link; + link = [Teabag.root, Teabag.suites.active].join('/'); if (Teabag.params["file"]) { this.filters.push("<a href='" + link + "'>remove</a> by file: " + Teabag.params["file"]); } if (Teabag.params["grep"]) { @@ -3179,17 +3197,19 @@ } }; HTML.prototype.readConfig = function() { var config; + if (config = this.cookie("teabag")) { return this.config = config; } }; HTML.prototype.toggleConfig = function(e) { var button, name; + button = e.target; if (button.tagName.toLowerCase() !== "button") { return; } name = button.getAttribute("id").replace(/^teabag-/, ""); @@ -3206,10 +3226,11 @@ return window.location.href = window.location.href; }; HTML.prototype.cookie = function(name, value) { var date, match; + if (value == null) { value = void 0; } if (value === void 0) { name = name.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); @@ -3226,19 +3247,20 @@ })(Teabag.Reporters.BaseView); }).call(this); (function() { - var __hasProp = {}.hasOwnProperty, + var _ref, _ref1, _ref2, + __hasProp = {}.hasOwnProperty, __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; }; Teabag.Reporters.HTML.ProgressView = (function(_super) { - __extends(ProgressView, _super); function ProgressView() { - return ProgressView.__super__.constructor.apply(this, arguments); + _ref = ProgressView.__super__.constructor.apply(this, arguments); + return _ref; } ProgressView.create = function(displayProgress) { if (displayProgress == null) { displayProgress = true; @@ -3262,64 +3284,67 @@ return ProgressView; })(Teabag.Reporters.BaseView); Teabag.Reporters.HTML.SimpleProgressView = (function(_super) { - __extends(SimpleProgressView, _super); function SimpleProgressView() { - return SimpleProgressView.__super__.constructor.apply(this, arguments); + _ref1 = SimpleProgressView.__super__.constructor.apply(this, arguments); + return _ref1; } SimpleProgressView.prototype.build = function() { this.el = this.createEl("div", "simple-progress"); return this.el.innerHTML = "<em id=\"teabag-progress-percent\">0%</em>\n<span id=\"teabag-progress-span\" class=\"teabag-indicator\"></span>"; }; SimpleProgressView.prototype.update = function(total, run) { var percent; + percent = total ? Math.ceil((run * 100) / total) : 0; return this.setHtml("progress-percent", "" + percent + "%"); }; return SimpleProgressView; })(Teabag.Reporters.HTML.ProgressView); Teabag.Reporters.HTML.RadialProgressView = (function(_super) { - __extends(RadialProgressView, _super); function RadialProgressView() { - return RadialProgressView.__super__.constructor.apply(this, arguments); + _ref2 = RadialProgressView.__super__.constructor.apply(this, arguments); + return _ref2; } RadialProgressView.supported = !!document.createElement("canvas").getContext; RadialProgressView.prototype.build = function() { this.el = this.createEl("div", "teabag-indicator radial-progress"); return this.el.innerHTML = "<canvas id=\"teabag-progress-canvas\"></canvas>\n<em id=\"teabag-progress-percent\">0%</em>"; }; RadialProgressView.prototype.appendTo = function() { - var canvas; + var canvas, e; + RadialProgressView.__super__.appendTo.apply(this, arguments); this.size = 80; try { canvas = this.findEl("progress-canvas"); canvas.width = canvas.height = canvas.style.width = canvas.style.height = this.size; this.ctx = canvas.getContext("2d"); this.ctx.strokeStyle = "#fff"; return this.ctx.lineWidth = 1.5; - } catch (e) { - + } catch (_error) { + e = _error; } }; RadialProgressView.prototype.update = function(total, run) { var half, percent; + percent = total ? Math.ceil((run * 100) / total) : 0; this.setHtml("progress-percent", "" + percent + "%"); if (!this.ctx) { return; } @@ -3355,10 +3380,11 @@ SpecView.__super__.constructor.apply(this, arguments); } SpecView.prototype.build = function() { var classes; + classes = ["spec"]; if (this.spec.pending) { classes.push("state-pending"); } SpecView.__super__.build.call(this, classes.join(" ")); @@ -3367,10 +3393,11 @@ return this.parentView.append(this.el); }; SpecView.prototype.buildParent = function() { var parent, view; + parent = this.spec.parent; if (parent.viewId) { return this.views.suites[parent.viewId]; } else { view = new Teabag.Reporters.HTML.SuiteView(parent, this.reporter); @@ -3378,10 +3405,11 @@ } }; SpecView.prototype.buildErrors = function() { var div, error, html, _i, _len, _ref; + div = this.createEl("div"); html = ""; _ref = this.spec.errors(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { error = _ref[_i]; @@ -3391,10 +3419,11 @@ return this.append(div); }; SpecView.prototype.updateState = function(state, elapsed) { var classes, result, _base; + result = this.spec.result(); classes = ["state-" + state]; if (elapsed > Teabag.slow) { classes.push("slow"); } @@ -3416,20 +3445,20 @@ (function() { var __hasProp = {}.hasOwnProperty, __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; }; Teabag.Reporters.HTML.FailureView = (function(_super) { - __extends(FailureView, _super); function FailureView(spec) { this.spec = spec; FailureView.__super__.constructor.apply(this, arguments); } FailureView.prototype.build = function() { var error, html, _i, _len, _ref; + FailureView.__super__.build.call(this, "spec"); html = "<h1 class=\"teabag-clearfix\"><a href=\"" + this.spec.link + "\">" + this.spec.fullDescription + "</a></h1>"; _ref = this.spec.errors(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { error = _ref[_i]; @@ -3471,10 +3500,11 @@ return this.parentView.append(this.el); }; SuiteView.prototype.buildParent = function() { var parent, view; + parent = this.suite.parent; if (!parent) { return this.reporter; } if (parent.viewId) { @@ -3492,10 +3522,11 @@ return this.ol.appendChild(el); }; SuiteView.prototype.updateState = function(state) { var _base; + if (this.state === "failed") { return; } this.el.className = "" + (this.el.className.replace(/\s?state-\w+/, "")) + " state-" + state; if (typeof (_base = this.parentView).updateState === "function") { @@ -3508,22 +3539,19 @@ })(Teabag.Reporters.BaseView); }).call(this); (function() { - Teabag.Reporters.HTML.template = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1><a href=\"\" id=\"teabag-root-link\">Teabag</a></h1>\n <ul>\n <li>version: <b id=\"teabag-version\"></b></li>\n <li id=\"teabag-env-info\"></li>\n </ul>\n </div>\n <div id=\"teabag-progress\"></div>\n <ul id=\"teabag-stats\">\n <li>passes: <b id=\"teabag-stats-passes\">0</b></li>\n <li>failures: <b id=\"teabag-stats-failures\">0</b></li>\n <li>skipped: <b id=\"teabag-stats-skipped\">0</b></li>\n <li>duration: <b id=\"teabag-stats-duration\">&infin;</b></li>\n </ul>\n</div>\n\n<div id=\"teabag-controls\" class=\"teabag-clearfix\">\n <div id=\"teabag-toggles\">\n <button id=\"teabag-use-catch\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n</div>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>"; }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; Teabag.Reporters.Console = (function() { - function Console() { - this.reportRunnerResults = __bind(this.reportRunnerResults, this); - this.start = new Teabag.Date(); + this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teabag.Date(); this.suites = {}; } Console.prototype.reportRunnerStarting = function(runner) { return this.log({ @@ -3533,10 +3561,11 @@ }); }; Console.prototype.reportSuites = function() { var index, suite, _i, _len, _ref, _results; + _ref = this.spec.getParents(); _results = []; for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) { suite = _ref[index]; if (this.suites[suite.fullDescription]) { @@ -3552,10 +3581,11 @@ return _results; }; Console.prototype.reportSpecResults = function(spec) { var result; + this.spec = new Teabag.Spec(spec); result = this.spec.result(); if (result.skipped) { return; } @@ -3576,10 +3606,11 @@ } }; Console.prototype.trackPending = function() { var result; + result = this.spec.result(); return this.log({ type: "spec", suite: this.spec.suiteName, label: this.spec.description, @@ -3588,10 +3619,11 @@ }); }; Console.prototype.trackFailure = function() { var error, result, _i, _len, _ref, _results; + result = this.spec.result(); _ref = this.spec.errors(); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { error = _ref[_i]; @@ -3630,28 +3662,30 @@ })(); }).call(this); (function() { - var __hasProp = {}.hasOwnProperty, + var _ref, + __hasProp = {}.hasOwnProperty, __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; }; Teabag.Reporters.HTML = (function(_super) { - __extends(HTML, _super); function HTML() { - return HTML.__super__.constructor.apply(this, arguments); + _ref = HTML.__super__.constructor.apply(this, arguments); + return _ref; } HTML.prototype.readConfig = function() { HTML.__super__.readConfig.apply(this, arguments); return jasmine.CATCH_EXCEPTIONS = this.config["use-catch"]; }; HTML.prototype.envInfo = function() { var ver, verString; + ver = jasmine.getEnv().version(); verString = [ver.major, ver.minor, ver.build].join("."); return "jasmine " + verString + " revision " + ver.revision; }; @@ -3659,25 +3693,25 @@ })(Teabag.Reporters.HTML); }).call(this); (function() { - var env, + var env, _ref, __hasProp = {}.hasOwnProperty, __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; }; Teabag.Runner = (function(_super) { - __extends(Runner, _super); function Runner() { Runner.__super__.constructor.apply(this, arguments); env.execute(); } Runner.prototype.setup = function() { var grep, reporter; + env.updateInterval = 1000; if (grep = this.params["grep"]) { env.specFilter = function(spec) { return spec.getFullName().indexOf(grep) === 0; }; @@ -3700,11 +3734,10 @@ return Runner; })(Teabag.Runner); Teabag.Spec = (function() { - function Spec(spec) { this.spec = spec; this.fullDescription = this.spec.getFullName(); this.description = this.spec.description; this.link = "?grep=" + (encodeURIComponent(this.fullDescription)); @@ -3714,10 +3747,11 @@ this.pending = this.spec.pending; } Spec.prototype.errors = function() { var item, _i, _len, _ref, _results; + if (!this.spec.results) { return []; } _ref = this.spec.results().getItems(); _results = []; @@ -3734,10 +3768,11 @@ return _results; }; Spec.prototype.getParents = function() { var parent; + if (this.parents) { return this.parents; } this.parents || (this.parents = []); parent = this.parent; @@ -3749,10 +3784,11 @@ return this.parents; }; Spec.prototype.result = function() { var results, status; + results = this.spec.results(); status = "failed"; if (results.passed()) { status = "passed"; } @@ -3768,11 +3804,10 @@ return Spec; })(); Teabag.Suite = (function() { - function Suite(suite) { this.suite = suite; this.fullDescription = this.suite.getFullName(); this.description = this.suite.description; this.link = "?grep=" + (encodeURIComponent(this.fullDescription)); @@ -3783,22 +3818,23 @@ return Suite; })(); Teabag.fixture = (function(_super) { - __extends(fixture, _super); function fixture() { - return fixture.__super__.constructor.apply(this, arguments); + _ref = fixture.__super__.constructor.apply(this, arguments); + return _ref; } window.fixture = fixture; fixture.load = function() { var args, _this = this; + args = arguments; if (!(env.currentSuite || env.currentSpec)) { throw "Teabag can't load fixtures outside of describe."; } if (env.currentSuite) { @@ -3818,10 +3854,11 @@ }; fixture.set = function() { var args, _this = this; + args = arguments; if (!(env.currentSuite || env.currentSpec)) { throw "Teabag can't load fixtures outside of describe."; } if (env.currentSuite) { @@ -3845,6 +3882,6 @@ })(Teabag.fixture); env = jasmine.getEnv(); }).call(this); -;FI"required_assets_digest;F"%e646cb2ced8df32fe17ae37cd681a9c3I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91 +;FI"required_assets_digest;F"%e8734b8e211ee9f90f0746ce7c4c7eeeI" _version;F"%ffd318ca8b794f42f5029101c2cf5d91 \ No newline at end of file