spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 in teabag-0.3.3 vs spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 in teabag-0.3.4
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1355714152.5011451:@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-16T20:14:50-07:00; FI"length; FiÿI"digest; F"%bcc799cef216fdd6e43fadf21bb42aa4I"source; FI"ÿ(function() {
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1356051794.3177228:@value"Qf{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-20T14:09:05-07:00; FI"length; FiudI"digest; F"%f919ccb6e5c50969029c592b94ea155bI"source; FI"ud(function() {
this.Teabag = (function() {
function Teabag() {}
@@ -33,17 +33,780 @@
return Teabag;
})();
}).call(this);
-; TI"dependency_digest; F"%4cfa420a62d4a43938befeb49df9e3c0I"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"Y/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters.coffee; FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/console.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"dependency_paths; F[{I" path; FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/teabag.coffee; FI"
-mtime; FI"2012-12-16T20:14:50-07:00; FI"digest; F"%988ed097add0855e75d9af72cfe28146{I" path; FI"V/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/runner.coffee; FI"
-mtime; FI"2012-12-12T16:01:50-07:00; FI"digest; F"%754c2544eaa4336c105b44ed842b3516{I" path; FI"R/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters; FI"
-mtime; FI"2012-12-16T20:14:56-07:00; FI"digest; F"%58c7533af04fd9c74a66182368276d09{I" path; FI"W/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html; FI"
-mtime; FI"2012-12-13T21:57:07-07:00; FI"digest; F"%4963c28ed3ff05482898b678002b6be2{I" path; FI"Y/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters.coffee; FI"
-mtime; FI"2012-12-14T00:06:18-07:00; FI"digest; F"%dc7fe75109e045a125f4c8a02a62bea4{I" path; FI"a/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/console.coffee; FI"
-mtime; FI"2012-12-16T20:14:56-07:00; FI"digest; F"%c813e3bbff2a9f32efd1de30127b3736{I" path; FI"^/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html.coffee; FI"
-mtime; FI"2012-12-13T23:35:32-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
+(function() {
+
+ Teabag.Runner = (function() {
+
+ Runner.run = false;
+
+ function Runner() {
+ if (this.constructor.run) {
+ return;
+ }
+ this.constructor.run = true;
+ this.fixturePath = Teabag.fixturePath;
+ 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.setup = function() {};
+
+ return Runner;
+
+ })();
+
+}).call(this);
+(function() {
+
+ Teabag.Reporters.NormalizedSpec = (function() {
+
+ function NormalizedSpec(spec) {
+ var _base, _base1;
+ this.spec = spec;
+ this.fullDescription = (typeof (_base = this.spec).getFullName === "function" ? _base.getFullName() : void 0) || this.spec.fullTitle();
+ this.description || (this.description = this.spec.description || this.spec.title);
+ this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
+ this.parent = this.spec.suite || this.spec.parent;
+ this.suiteName = (typeof (_base1 = this.parent).getFullName === "function" ? _base1.getFullName() : void 0) || this.parent.fullTitle();
+ this.viewId = this.spec.viewId;
+ this.pending = this.spec.pending;
+ }
+
+ NormalizedSpec.prototype.errors = function() {
+ var item, _i, _len, _ref, _results;
+ if (this.spec.err) {
+ return [this.spec.err];
+ }
+ if (!this.spec.results) {
+ return [];
+ }
+ _ref = this.spec.results().getItems();
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ item = _ref[_i];
+ if (item.passed()) {
+ continue;
+ }
+ _results.push({
+ message: item.message,
+ stack: item.trace.stack
+ });
+ }
+ return _results;
+ };
+
+ NormalizedSpec.prototype.result = function() {
+ var results, skipped, status;
+ status = "failed";
+ if (this.spec.results) {
+ results = this.spec.results();
+ if (results.passed()) {
+ status = "passed";
+ }
+ skipped = results.skipped;
+ } else {
+ if (this.spec.state === "passed" || this.spec.state === "skipped") {
+ status = "passed";
+ }
+ skipped = this.spec.state === "skipped";
+ }
+ if (this.spec.pending) {
+ status = "pending";
+ }
+ return {
+ status: status,
+ skipped: skipped
+ };
+ };
+
+ return NormalizedSpec;
+
+ })();
+
+ Teabag.Reporters.NormalizedSuite = (function() {
+
+ function NormalizedSuite(suite) {
+ var _base;
+ this.suite = suite;
+ this.fullDescription = (typeof (_base = this.suite).getFullName === "function" ? _base.getFullName() : void 0) || this.suite.fullTitle();
+ this.description = this.suite.description || this.suite.title;
+ this.link = "?grep=" + (encodeURIComponent(this.fullDescription));
+ this.parent = this.getParent();
+ this.viewId = this.suite.viewId;
+ }
+
+ NormalizedSuite.prototype.getParent = function() {
+ if (this.suite.parent) {
+ if (this.suite.parent.root) {
+ return null;
+ } else {
+ return this.suite.parent;
+ }
+ } else {
+ return this.suite.parentSuite;
+ }
+ };
+
+ return NormalizedSuite;
+
+ })();
+
+ 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.innerText = 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); }; };
+
+ Teabag.Reporters.Console = (function() {
+
+ function Console() {
+ this.reportRunnerResults = __bind(this.reportRunnerResults, this);
+ this.start = new Teabag.Date().getTime();
+ }
+
+ Console.prototype.reportSpecResults = function(spec) {
+ var result;
+ this.spec = new Teabag.Reporters.NormalizedSpec(spec);
+ result = this.spec.result();
+ switch (result.status) {
+ case "pending":
+ return this.trackPending();
+ case "failed":
+ return this.trackFailure();
+ default:
+ return this.log({
+ type: "spec",
+ suite: this.spec.suiteName,
+ spec: this.spec.description,
+ status: result.status,
+ skipped: result.skipped,
+ full_description: this.spec.fullDescription
+ });
+ }
+ };
+
+ Console.prototype.trackPending = function() {
+ var result;
+ result = this.spec.result();
+ return this.log({
+ type: "spec",
+ suite: this.spec.suiteName,
+ spec: this.spec.description,
+ status: result.status,
+ skipped: result.skipped,
+ full_description: this.spec.fullDescription
+ });
+ };
+
+ 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,
+ spec: this.spec.description,
+ status: result.status,
+ skipped: result.skipped,
+ full_description: this.spec.fullDescription,
+ link: this.spec.link,
+ message: error.message,
+ trace: error.stack || error.message || "Stack Trace Unavailable"
+ }));
+ }
+ return _results;
+ };
+
+ Console.prototype.reportRunnerResults = function() {
+ this.log({
+ type: "results",
+ elapsed: ((new Teabag.Date().getTime() - this.start) / 1000).toFixed(5)
+ });
+ return Teabag.finished = true;
+ };
+
+ Console.prototype.log = function(obj) {
+ if (obj == null) {
+ obj = {};
+ }
+ obj["_teabag"] = true;
+ return Teabag.console.log(JSON.stringify(obj));
+ };
+
+ return Console;
+
+ })();
+
+}).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.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\">∞</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\">Use Try/Catch</button>\n <button id=\"teabag-build-full-report\">Build Full Report</button>\n <button id=\"teabag-display-progress\">Display Progress</button>\n </div>\n <div id=\"teabag-filtered\">\n <button onclick=\"window.location.href = window.location.pathname\">Run All Specs</button>\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.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) {
+ console.debug(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);
+(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.Reporters.NormalizedSuite(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);
+; FI"required_assets_digest; F"%ba00099fd38f73f1c6272b23a645f82aI"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file