o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356059376.099839:@value"J&{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"2012-12-20T18:59:53-07:00; FI"length; Fi I"digest; F"%be0201a6fc7348cb52e5d4ff22892f2aI"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.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.showConfiguration();
return this.buildProgress();
};
HTML.prototype.buildLayout = function() {
var el;
el = this.createEl("div");
document.body.appendChild(el);
return el.innerHTML = "
\n
\n
\n
\n - passes: 0
\n - failures: 0
\n - skipped: 0
\n - duration: ∞
\n
\n
\n\n\n
\n \n \n \n
\n
\n \n
\n
\n\n
\n\n";
};
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.Reporters.NormalizedSpec(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.Reporters.NormalizedSpec(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("filtered", "teabag-filtered");
return this.setHtml("filtered", "" + 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.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);
; TI"dependency_digest; F"%ef210f59bac77fc15c337d1373cf3551I"required_paths; F[
I"^/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"dependency_paths; F[
{I" path; FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee; FI"
mtime; FI"2012-12-20T18:59:53-07:00; FI"digest; F"%4c451584a45eff562eb936bfff0ef0fc{I" path; FI"l/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/progress_view.coffee; FI"
mtime; FI"2012-12-13T20:46:27-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-13T21:56:26-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-13T20:33:17-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-13T20:40:53-07:00; FI"digest; F"%4016da37093a670eec7ad40461df3772I"
_version; F"%6776f581a4329e299531e1d52aa59832