o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1367990550.835506: @value"c*{I" class:EFI"ProcessedAsset;FI"logical_path;FI""teabag/base/reporters/html.js;FI" pathname;FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-03-04T16:58:12-07:00;FI" length;Fi¬I" digest;F"%0cb7367b759847298bf77fd7a2c3c27bI" source;FI"¬(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.filters = []; this.setFilters(); this.readConfig(); 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(); if ((_ref = this.findEl("suite-select")) != null) { _ref.onchange = this.changeSuite; } this.findEl("root-link").href = Teabag.root; this.el = this.findEl("report-all"); this.showConfiguration(); this.buildProgress(); 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; for (_i = 0, _len = _ref.length; _i < _len; _i++) { suite = _ref[_i]; options.push("" + suite + ""); } return ""; }; HTML.prototype.buildProgress = function() { this.progress = Teabag.Reporters.HTML.ProgressView.create(this.config["display-progress"]); return this.progress.appendTo(this.findEl("progress")); }; HTML.prototype.buildFilters = function() { if (this.filters.length) { this.setClass("filter", "teabag-filtered"); } return this.setHtml("filter-list", "
  • " + (this.filters.join("
  • ")), true); }; HTML.prototype.reportRunnerStarting = function(runner) { this.total.exist = runner.total || (typeof runner.specs === "function" ? runner.specs().length : void 0) || 0; 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.setFilters = function() { var link; link = [Teabag.root, Teabag.suites.active].join('/'); if (Teabag.params["file"]) { this.filters.push("remove by file: " + Teabag.params["file"]); } if (Teabag.params["grep"]) { return this.filters.push("remove by match: " + Teabag.params["grep"]); } }; 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.root, this.options[this.options.selectedIndex].value].join('/'); }; 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))) + "; expires=" + (date.toUTCString()) + "; path=/;"; } }; return HTML; })(Teabag.Reporters.BaseView); }).call(this); ;TI"dependency_digest;F"%dfc6517ad02090f10eb126d49579b9daI"required_paths;F[ I"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"g/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/template.coffee;FI"dependency_paths;F[ {I" path;FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee;FI" mtime;FI"2013-03-04T16:58:12-07:00;FI" digest;F"%cdb864f0715c2d843fc6688e4a37e243{I" path;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/base_view.coffee;FI" mtime;FI"2013-01-21T15:52:04-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"2013-01-21T15:52:04-07:00;FI" digest;F"%aca5cfdb86fd679f67291a8267d32be8{I" path;FI"h/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/spec_view.coffee;FI" mtime;FI"2013-02-16T12:44:45-07:00;FI" digest;F"%25ede1fd9a3f7bd9853fba3e03492734{I" path;FI"k/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/failure_view.coffee;FI" mtime;FI"2013-01-21T15:52:04-07:00;FI" digest;F"%3d81cd64261f2056a5ed1a9174651fe1{I" path;FI"i/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/suite_view.coffee;FI" mtime;FI"2013-01-21T15:52:04-07:00;FI" digest;F"%fa964355aeeb57aa8164ab442fef9a04{I" path;FI"g/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/template.coffee;FI" mtime;FI"2013-03-04T16:57:50-07:00;FI" digest;F"%7e096068b0b6485a30650ae237e25f8aI" _version;F"%6776f581a4329e299531e1d52aa59832