{I" class:EFI"ProcessedAsset;FI"logical_path;FI"$teaspoon/base/reporters/html.js;FI" pathname;FI"b/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html.coffee;FI"content_type;FI"application/javascript;FI" mtime;Fl+Qú½QI" length;FiìI" digest;F"%828849fb40604368852c458584484bb5I" 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; }; Teaspoon.Reporters.HTML = (function(_super) { __extends(HTML, _super); function HTML() { this.toggleConfig = __bind(this.toggleConfig, this); this.reportRunnerResults = __bind(this.reportRunnerResults, this); this.start = new Teaspoon.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", Teaspoon.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 = Teaspoon.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 = "teaspoon-interface"; el.innerHTML = Teaspoon.Reporters.HTML.template; return document.body.appendChild(el); }; HTML.prototype.buildSuiteSelect = function() { var options, suite, _i, _len, _ref; if (Teaspoon.suites.all.length === 1) { return ""; } options = []; _ref = Teaspoon.suites.all; for (_i = 0, _len = _ref.length; _i < _len; _i++) { suite = _ref[_i]; options.push("" + suite + ""); } return ""; }; HTML.prototype.buildProgress = function() { this.progress = Teaspoon.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", "teaspoon-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 Teaspoon.Spec(spec); if (this.config["build-full-report"]) { this.reportView = new Teaspoon.Reporters.HTML.SpecView(spec, this); } return this.specStart = new Teaspoon.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 Teaspoon.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 Teaspoon.Spec(spec); result = spec.result(); if (result.skipped || result.status === "pending") { this.updateStat("skipped", this.total.skipped += 1); return; } elapsed = new Teaspoon.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 Teaspoon.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 = "teaspoon-" + status; }; HTML.prototype.setFilters = function() { var link; link = [Teaspoon.root, Teaspoon.suites.active].join('/'); if (Teaspoon.params["file"]) { this.filters.push("remove by file: " + Teaspoon.params["file"]); } if (Teaspoon.params["grep"]) { return this.filters.push("remove by match: " + Teaspoon.params["grep"]); } }; HTML.prototype.readConfig = function() { var config; if (config = this.cookie("teaspoon")) { 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(/^teaspoon-/, ""); this.config[name] = !this.config[name]; this.cookie("teaspoon", this.config); return this.refresh(); }; HTML.prototype.changeSuite = function() { return window.location.href = [Teaspoon.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 Teaspoon.Date(); date.setDate(date.getDate() + 365); return document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; expires=" + (date.toUTCString()) + "; path=/;"; } }; return HTML; })(Teaspoon.Reporters.BaseView); }).call(this); ;TI"dependency_digest;F"%af3447f60d4cbf1847f6325a4a10692eI"required_paths;F[ I"l/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/base_view.coffee;FI"b/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html.coffee;FI"p/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/progress_view.coffee;FI"l/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/spec_view.coffee;FI"o/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/failure_view.coffee;FI"m/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/suite_view.coffee;FI"k/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/template.coffee;FI"dependency_paths;F[ {I" path;FI"b/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%cc3a2eed2f1e6ae8dcc05f7b20e7e659{I" path;FI"l/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/base_view.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%9051f8f2796a2e23a06b9e7e6d5be6c3{I" path;FI"p/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/progress_view.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%53c443ced8da34a4cb607f9378d7729c{I" path;FI"l/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/spec_view.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%eebad2d15769dd0d5b77fbbc7263049b{I" path;FI"o/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/failure_view.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%683711e2070d27985aa15679fb183746{I" path;FI"m/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/suite_view.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%66ec8384f8db74391232e8f4a6fdb646{I" path;FI"k/Users/jejacks0n/Projects/teaspoon/app/assets/javascripts/teaspoon/base/reporters/html/template.coffee;FI" mtime;FI"2013-06-16T11:48:01-06:00;FI" digest;F"%778671b239c47f2417cf2626c9425b58I" _version;F"%7097359102b3db973d6242ce2db779ef