o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1371410624.566266: @value"á*{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;FI"2013-06-16T11:48:01-06:00;FI" length;FiìI" digest;F"%62ebb80b8a1d895cf8330184f438126fI" 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"%a9a6f4efe2256f6f9b9d254d8c0119fbI"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"%582ed12b20750dfb7530727bcd0298c7{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"%aad82c2791aa239d62abe53f3458d1dd{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"%65df13f7d4c182f2c2c19c7fa8a4e0e4{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"%2a0dc16f183391d1672b49b73736f3fc{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"%02c9868fc8bcecc49cf5f21cd8927214{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"%2b1f5ae2230f4ee19ad3fb7a37e5cbfc{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"%02fdb48e11c8c3ef488f7afbf1140651I" _version;F"%6776f581a4329e299531e1d52aa59832