spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 in teabag-0.4.3 vs spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 in teabag-0.4.4

- old
+ new

@@ -1,8 +1,8 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356732987.061406: @value"+w{I" -class:EFI"BundledAsset;FI"logical_path;FI"teabag/base/teabag.js;FI" pathname;FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee;FI"content_type;FI"application/javascript;FI" -mtime;FI"2012-12-28T15:16:25-07:00;FI" length;FiOuI" digest;F"%4d26a4a757f93189e1490e1fcaa450e2I" source;FI"Ou(function() { +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356824474.76735: @value"({I" +class:EFI"ProcessedAsset;FI"logical_path;FI"teabag/base/teabag.js;FI" pathname;FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee;FI"content_type;FI"application/javascript;FI" +mtime;FI"2012-12-28T16:06:57-07:00;FI" length;FiCI" digest;F"%4507373b1d29c9088f9367cead9001feI" source;FI"C(function() { this.Teabag = (function() { function Teabag() {} @@ -48,923 +48,16 @@ return Teabag; })(); }).call(this); -(function() { - - Teabag.Runner = (function() { - - Runner.run = false; - - function Runner() { - if (this.constructor.run) { - return; - } - this.constructor.run = true; - this.fixturePath = "" + Teabag.root + "/fixtures"; - this.params = this.getParams(); - 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]; - params[decodeURIComponent(name)] = decodeURIComponent(value); - } - return params; - }; - - Runner.prototype.getReporter = function() { - if (this.params["reporter"]) { - return Teabag.Reporters[this.params["reporter"]]; - } else { - if (window.navigator.userAgent.match(/PhantomJS/)) { - return Teabag.Reporters.Console; - } else { - return Teabag.Reporters.HTML; - } - } - }; - - Runner.prototype.setup = function() {}; - - return Runner; - - })(); - -}).call(this); -(function() { - var __slice = [].slice; - - Teabag.fixture = (function() { - var addContent, cleanup, create, load, loadComplete, preload, putContent, set, xhr, xhrRequest, - _this = this; - - fixture.cache = {}; - - fixture.el = null; - - 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)); - } - 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") { - urls.push(append); - append = false; - } - _results = []; - for (index = _j = 0, _len = urls.length; _j < _len; index = ++_j) { - url = urls[index]; - _results.push(load(url, append || index > 0)); - } - 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") { - htmls.push(append); - append = false; - } - _results = []; - for (index = _j = 0, _len = htmls.length; _j < _len; index = ++_j) { - html = htmls[index]; - _results.push(set(html, append || index > 0)); - } - return _results; - }; - - fixture.cleanup = function() { - return cleanup(); - }; - - function fixture() { - Teabag.fixture.load.apply(window, arguments); - } - - xhr = null; - - preload = function(url) { - 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); - } - value = null; - xhrRequest(url, function() { - if (xhr.readyState !== 4) { - return; - } - if (xhr.status !== 200) { - throw "Unable to load fixture \"" + url + "\"."; - } - return value = loadComplete(url, xhr.getResponseHeader("content-type"), xhr.responseText, append, preload); - }); - return value; - }; - - loadComplete = function(url, type, content, append, preload) { - Teabag.fixture.cache[url] = { - type: type, - content: content - }; - if (type.match(/application\/json;/)) { - return fixture.json[fixture.json.push(JSON.parse(content)) - 1]; - } - if (preload) { - return content; - } - if (append) { - addContent(content); - } else { - putContent(content); - } - return Teabag.fixture.el; - }; - - set = function(content, append) { - if (append) { - return addContent(content); - } else { - return putContent(content); - } - }; - - putContent = function(content) { - cleanup(); - create(); - return Teabag.fixture.el.innerHTML = content; - }; - - addContent = function(content) { - if (!Teabag.fixture.el) { - create(); - } - return Teabag.fixture.el.innerHTML += content; - }; - - create = function() { - var _ref; - Teabag.fixture.el = document.createElement("div"); - 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) { - if (window.XMLHttpRequest) { - xhr = new XMLHttpRequest(); - } else if (window.ActiveXObject) { - try { - xhr = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - xhr = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - - } - } - } - if (!xhr) { - throw "Unable to make Ajax Request"; - } - xhr.onreadystatechange = callback; - xhr.open("GET", "" + Teabag.root + "/fixtures/" + url, false); - return xhr.send(); - }; - - return fixture; - - }).call(this); - -}).call(this); -(function() { - - Teabag.Reporters.BaseView = (function() { - - function BaseView() { - this.elements = {}; - this.build(); - } - - BaseView.prototype.build = function(className) { - return this.el = this.createEl("li", className); - }; - - BaseView.prototype.appendTo = function(el) { - return el.appendChild(this.el); - }; - - BaseView.prototype.append = function(el) { - 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) { - return el.innerHTML += value; - } else { - return el.innerHTML = value; - } - }; - - 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; - }; - - return BaseView; - - })(); - -}).call(this); -(function() { - 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.config = { - "use-catch": true, - "build-full-report": false, - "display-progress": true - }; - this.total = { - exist: 0, - run: 0, - passes: 0, - failures: 0, - skipped: 0 - }; - this.views = { - specs: {}, - suites: {} - }; - this.filter = false; - this.readConfig(); - HTML.__super__.constructor.apply(this, arguments); - } - - HTML.prototype.build = function() { - this.buildLayout(); - this.el = this.findEl("report-all"); - this.setText("env-info", this.envInfo()); - this.setText("version", Teabag.version); - this.findEl("toggles").onclick = this.toggleConfig; - this.findEl("suite-select").onchange = this.changeSuite; - this.showConfiguration(); - return this.buildProgress(); - }; - - HTML.prototype.buildLayout = function() { - var el; - el = this.createEl("div"); - document.body.appendChild(el); - return el.innerHTML = "<div class=\"teabag-clearfix\">\n <div id=\"teabag-title\">\n <h1>Teabag</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-filter\">\n " + (this.buildSuiteSelect()) + "\n <button onclick=\"window.location.href = window.location.pathname\">Run All</button>\n <span id=\"teabag-filter-info\">\n </div>\n</div>\n\n<hr/>\n\n<div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n</div>"; - }; - - HTML.prototype.buildSuiteSelect = function() { - var options, suite, _i, _len, _ref; - if (Teabag.suites.all.length === 1) { - return ""; - } - options = []; - _ref = Teabag.suites.all; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - suite = _ref[_i]; - options.push("<option" + (Teabag.suites.active === suite ? " selected='selected'" : "") + " value=\"" + suite + "\">" + suite + " suite</option>"); - } - return "<select id=\"teabag-suite-select\">" + (options.join("")) + "</select>"; - }; - - HTML.prototype.buildProgress = function() { - this.progress = Teabag.Reporters.HTML.ProgressView.create(this.config["display-progress"]); - return this.progress.appendTo(this.findEl("progress")); - }; - - HTML.prototype.reportRunnerStarting = function(runner) { - this.total.exist = runner.total || runner.specs().length; - if (this.total.exist) { - return this.setText("stats-duration", "..."); - } - }; - - HTML.prototype.reportSpecStarting = function(spec) { - spec = new Teabag.Spec(spec); - if (this.config["build-full-report"]) { - this.reportView = new Teabag.Reporters.HTML.SpecView(spec, this); - } - return this.specStart = new Teabag.Date().getTime(); - }; - - HTML.prototype.reportSpecResults = function(spec) { - this.total.run += 1; - this.updateProgress(); - return this.updateStatus(spec); - }; - - HTML.prototype.reportRunnerResults = function() { - if (!this.total.run) { - return; - } - this.setText("stats-duration", this.elapsedTime()); - if (!this.total.failures) { - this.setStatus("passed"); - } - this.setText("stats-passes", this.total.passes); - this.setText("stats-failures", this.total.failures); - if (this.total.run < this.total.exist) { - this.total.skipped = this.total.exist - this.total.run; - this.total.run = this.total.exist; - } - this.setText("stats-skipped", this.total.skipped); - return this.updateProgress(); - }; - - HTML.prototype.elapsedTime = function() { - return "" + (((new Teabag.Date().getTime() - this.start) / 1000).toFixed(3)) + "s"; - }; - - HTML.prototype.updateStat = function(name, value) { - if (!this.config["display-progress"]) { - return; - } - 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; - } - elapsed = new Teabag.Date().getTime() - this.specStart; - if (result.status === "passed") { - this.updateStat("passes", this.total.passes += 1); - return (_ref = this.reportView) != null ? _ref.updateState("passed", elapsed) : void 0; - } else { - this.updateStat("failures", this.total.failures += 1); - if ((_ref1 = this.reportView) != null) { - _ref1.updateState("failed", elapsed); - } - if (!this.config["build-full-report"]) { - new Teabag.Reporters.HTML.FailureView(spec).appendTo(this.findEl("report-failures")); - } - return this.setStatus("failed"); - } - }; - - HTML.prototype.updateProgress = function() { - 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" : "")); - } - return _results; - }; - - HTML.prototype.setStatus = function(status) { - return document.body.className = "teabag-" + status; - }; - - HTML.prototype.setFilter = function(filter) { - if (!filter) { - return; - } - this.setClass("filter", "teabag-filtered"); - return this.setHtml("filter-info", "" + filter, true); - }; - - 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-/, ""); - this.config[name] = !this.config[name]; - this.cookie("teabag", this.config); - return this.refresh(); - }; - - HTML.prototype.changeSuite = function() { - return window.location.href = "/teabag/" + this.options[this.options.selectedIndex].value; - }; - - HTML.prototype.refresh = function() { - 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"); - match = document.cookie.match(new RegExp("(?:^|;)\\s?" + name + "=(.*?)(?:;|$)", "i")); - return match && JSON.parse(unescape(match[1]).split(" ")[0]); - } else { - date = new Teabag.Date(); - date.setDate(date.getDate() + 365); - return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; path=\"/\"; expires=" + (date.toUTCString()) + ";"; - } - }; - - return HTML; - - })(Teabag.Reporters.BaseView); - -}).call(this); -(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.ProgressView = (function(_super) { - - __extends(ProgressView, _super); - - function ProgressView() { - return ProgressView.__super__.constructor.apply(this, arguments); - } - - ProgressView.create = function(displayProgress) { - if (displayProgress == null) { - displayProgress = true; - } - if (!displayProgress) { - return new Teabag.Reporters.HTML.ProgressView(); - } - if (Teabag.Reporters.HTML.RadialProgressView.supported) { - return new Teabag.Reporters.HTML.RadialProgressView(); - } else { - return Teabag.Reporters.HTML.SimpleProgressView(); - } - }; - - ProgressView.prototype.build = function() { - return this.el = this.createEl("div", "teabag-indicator modeset-logo"); - }; - - ProgressView.prototype.update = function() {}; - - return ProgressView; - - })(Teabag.Reporters.BaseView); - - Teabag.Reporters.HTML.SimpleProgressView = (function(_super) { - - __extends(SimpleProgressView, _super); - - function SimpleProgressView() { - return SimpleProgressView.__super__.constructor.apply(this, arguments); - } - - 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); - } - - 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; - 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) { - - } - }; - - 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; - } - half = this.size / 2; - this.ctx.clearRect(0, 0, this.size, this.size); - this.ctx.beginPath(); - this.ctx.arc(half, half, half - 1, 0, Math.PI * 2 * (percent / 100), false); - return this.ctx.stroke(); - }; - - return RadialProgressView; - - })(Teabag.Reporters.HTML.ProgressView); - -}).call(this); -(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.SpecView = (function(_super) { - var viewId; - - __extends(SpecView, _super); - - viewId = 0; - - function SpecView(spec, reporter) { - this.spec = spec; - this.reporter = reporter; - this.views = this.reporter.views; - this.spec.viewId = viewId += 1; - this.views.specs[this.spec.viewId] = this; - 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(" ")); - this.el.innerHTML = "<a href=\"" + this.spec.link + "\">" + this.spec.description + "</a>"; - this.parentView = this.buildParent(); - 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); - return this.views.suites[view.suite.viewId] = view; - } - }; - - 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]; - html += "" + (this.htmlSafe(error.stack || error.message || "Stack trace unavailable")); - } - div.innerHTML = html; - 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"); - } - if (state !== "failed") { - this.el.innerHTML += "<span>" + elapsed + "ms</span>"; - } - this.el.className = classes.join(" "); - if (result.status !== "passed") { - this.buildErrors(); - } - return typeof (_base = this.parentView).updateState === "function" ? _base.updateState(state) : void 0; - }; - - return SpecView; - - })(Teabag.Reporters.BaseView); - -}).call(this); -(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]; - html += "<div>" + (this.htmlSafe(error.stack || error.message || "Stack trace unavailable")) + "</div>"; - } - return this.el.innerHTML = html; - }; - - return FailureView; - - })(Teabag.Reporters.BaseView); - -}).call(this); -(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.SuiteView = (function(_super) { - var viewId; - - __extends(SuiteView, _super); - - viewId = 0; - - function SuiteView(suite, reporter) { - this.suite = suite; - this.reporter = reporter; - this.views = this.reporter.views; - this.suite.viewId = viewId += 1; - this.views.suites[this.suite.viewId] = this; - this.suite = new Teabag.Suite(suite); - SuiteView.__super__.constructor.apply(this, arguments); - } - - SuiteView.prototype.build = function() { - SuiteView.__super__.build.call(this, "suite"); - this.el.innerHTML = "<h1><a href=\"" + this.suite.link + "\">" + this.suite.description + "</a></h1>"; - this.parentView = this.buildParent(); - 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) { - return this.views.suites[parent.viewId]; - } else { - view = new Teabag.Reporters.HTML.SuiteView(parent, this.reporter); - return this.views.suites[view.suite.viewId] = view; - } - }; - - SuiteView.prototype.append = function(el) { - if (!this.ol) { - SuiteView.__super__.append.call(this, this.ol = this.createEl("ol")); - } - 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") { - _base.updateState(state); - } - return this.state = state; - }; - - return SuiteView; - - })(Teabag.Reporters.BaseView); - -}).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.suites = {}; - } - - Console.prototype.reportRunnerStarting = function(runner) { - return this.log({ - type: "runner", - total: runner.total || runner.specs().length, - start: JSON.parse(JSON.stringify(this.start)) - }); - }; - - 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]) { - continue; - } - this.suites[suite.fullDescription] = true; - _results.push(this.log({ - type: "suite", - label: suite.description, - level: index - })); - } - return _results; - }; - - Console.prototype.reportSpecResults = function(spec) { - var result; - this.spec = new Teabag.Spec(spec); - result = this.spec.result(); - this.reportSuites(); - switch (result.status) { - case "pending": - return this.trackPending(); - case "failed": - return this.trackFailure(); - default: - return this.log({ - type: "spec", - suite: this.spec.suiteName, - label: this.spec.description, - status: result.status, - skipped: result.skipped - }); - } - }; - - Console.prototype.trackPending = function() { - var result; - result = this.spec.result(); - return this.log({ - type: "spec", - suite: this.spec.suiteName, - label: this.spec.description, - status: result.status, - skipped: result.skipped - }); - }; - - 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]; - _results.push(this.log({ - type: "spec", - suite: this.spec.suiteName, - label: this.spec.description, - status: result.status, - skipped: result.skipped, - link: this.spec.link, - message: error.message, - trace: error.stack || error.message || "Stack Trace Unavailable" - })); - } - return _results; - }; - - Console.prototype.reportRunnerResults = function() { - this.log({ - type: "result", - elapsed: ((new Teabag.Date().getTime() - this.start.getTime()) / 1000).toFixed(5) - }); - return Teabag.finished = true; - }; - - Console.prototype.log = function(obj) { - if (obj == null) { - obj = {}; - } - obj["_teabag"] = true; - return Teabag.log(JSON.stringify(obj)); - }; - - return Console; - - })(); - -}).call(this); -;FI"required_assets_digest;F"%1ea237f009f25f5162ef2278312d50c9I" _version;F"%6776f581a4329e299531e1d52aa59832 +;TI"dependency_digest;F"%0b8610fde9a55b2a28db7cadc6ccd647I"required_paths;F[I"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee;FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/runner.coffee;FI"W/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/fixture.coffee;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/base_view.coffee;FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee;FI"l/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/progress_view.coffee;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/spec_view.coffee;FI"k/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/failure_view.coffee;FI"i/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/suite_view.coffee;FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/console.coffee;FI"dependency_paths;F[{I" path;FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee;FI" +mtime;FI"2012-12-28T16:06:57-07:00;FI" digest;F"%c541224daee6e363c2abe9cc1cbed422{I" path;FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/runner.coffee;FI" +mtime;FI"2012-12-26T15:35:43-07:00;FI" digest;F"%a409d33b74e03500c266b2e1fba9ea36{I" path;FI"W/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/fixture.coffee;FI" +mtime;FI"2012-12-28T15:16:25-07:00;FI" digest;F"%856b00ea5455ab70171c6afdcb2e0534{I" path;FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee;FI" +mtime;FI"2012-12-29T16:40:48-07:00;FI" digest;F"%8b78cb2d547707ef6e387230dec46cd1{I" path;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/base_view.coffee;FI" +mtime;FI"2012-12-23T15:44:52-07:00;FI" digest;F"%6044e074812a7e19861a7a2675151888{I" path;FI"l/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/progress_view.coffee;FI" +mtime;FI"2012-12-23T15:13:03-07:00;FI" digest;F"%078a6e02b0a603c5519ff287d6d94ba6{I" path;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/spec_view.coffee;FI" +mtime;FI"2012-12-24T16:10:29-07:00;FI" digest;F"%f4af4672c4e46ce23f14757d7247a9ef{I" path;FI"k/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/failure_view.coffee;FI" +mtime;FI"2012-12-23T15:12:59-07:00;FI" digest;F"%65a3546a13e20aa847cecb3e94897ecc{I" path;FI"i/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/suite_view.coffee;FI" +mtime;FI"2012-12-23T15:13:11-07:00;FI" digest;F"%fa964355aeeb57aa8164ab442fef9a04{I" path;FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/console.coffee;FI" +mtime;FI"2012-12-23T17:19:22-07:00;FI" digest;F"%162e42ee52888ef4af15e7983a34f666I" _version;F"%6776f581a4329e299531e1d52aa59832 \ No newline at end of file