spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 in teabag-0.5.1 vs spec/dummy/tmp/cache/assets/C59/250/sprockets%2Fa80d3fe493d2476e58c4323996064512 in teabag-0.5.2
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357882773.535486:@value"¦x{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1358363406.327755:@value"ýz{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"2013-01-08T23:34:44-07:00; FI"length; FiÊvI"digest; F"%8aef159bbaf671442405ded5727420d6I"source; FI"Êv(function() {
+mtime; FI"2013-01-11T23:15:01-07:00; FI"length; Fi!yI"digest; F"%8829d462b1f2851da006aab233cf918eI"source; FI"!y(function() {
this.Teabag = (function() {
function Teabag() {}
@@ -63,11 +63,11 @@
if (this.constructor.run) {
return;
}
this.constructor.run = true;
this.fixturePath = "" + Teabag.root + "/fixtures";
- this.params = this.getParams();
+ this.params = Teabag.params = this.getParams();
this.setup();
}
Runner.prototype.getParams = function() {
var name, param, params, value, _i, _len, _ref, _ref1;
@@ -382,34 +382,37 @@
};
this.views = {
specs: {},
suites: {}
};
- this.filter = false;
+ this.filters = [];
+ this.setFilters();
this.readConfig();
HTML.__super__.constructor.apply(this, arguments);
}
HTML.prototype.build = function() {
var _ref;
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.findEl("suites").innerHTML = this.buildSuiteSelect();
if ((_ref = this.findEl("suite-select")) != null) {
_ref.onchange = this.changeSuite;
}
+ this.el = this.findEl("report-all");
this.showConfiguration();
- return this.buildProgress();
+ this.buildProgress();
+ return this.buildFilters();
};
HTML.prototype.buildLayout = function() {
var el;
el = this.createEl("div");
document.body.appendChild(el);
- return el.innerHTML = "<div id=\"teabag-html-reporter\">\n <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\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-filter\">\n " + (this.buildSuiteSelect()) + "\n <button onclick=\"window.location.href = window.location.pathname\">Run All</button>\n <span id=\"teabag-filter-info\">\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>\n</div>";
+ return el.innerHTML = Teabag.Reporters.HTML.template;
};
HTML.prototype.buildSuiteSelect = function() {
var options, suite, _i, _len, _ref;
if (Teabag.suites.all.length === 1) {
@@ -417,20 +420,27 @@
}
options = [];
_ref = Teabag.suites.all;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
suite = _ref[_i];
- options.push("<option" + (Teabag.suites.active === suite ? " selected='selected'" : "") + " value=\"" + suite + "\">" + suite + " suite</option>");
+ options.push("<option" + (Teabag.suites.active === suite ? " selected='selected'" : "") + " value=\"" + suite + "\">" + suite + "</option>");
}
return "<select id=\"teabag-suite-select\">" + (options.join("")) + "</select>";
};
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", "<li>" + (this.filters.join("</li><li>")), true);
+ };
+
HTML.prototype.reportRunnerStarting = function(runner) {
this.total.exist = runner.total || runner.specs().length;
if (this.total.exist) {
return this.setText("stats-duration", "...");
}
@@ -520,16 +530,19 @@
HTML.prototype.setStatus = function(status) {
return document.body.className = "teabag-" + status;
};
- HTML.prototype.setFilter = function(filter) {
- if (!filter) {
- return;
+ HTML.prototype.setFilters = function() {
+ var link;
+ link = [Teabag.root, Teabag.suites.active].join('/');
+ if (Teabag.params["file"]) {
+ this.filters.push("<a href='" + link + "'>remove</a> by file: " + Teabag.params["file"]);
}
- this.setClass("filter", "teabag-filtered");
- return this.setHtml("filter-info", "" + filter, true);
+ if (Teabag.params["grep"]) {
+ return this.filters.push("<a href='" + link + "'>remove</a> by match: " + Teabag.params["grep"]);
+ }
};
HTML.prototype.readConfig = function() {
var config;
if (config = this.cookie("teabag")) {
@@ -548,11 +561,11 @@
this.cookie("teabag", this.config);
return this.refresh();
};
HTML.prototype.changeSuite = function() {
- return window.location.href = "/teabag/" + this.options[this.options.selectedIndex].value;
+ return window.location.href = [Teabag.root, this.options[this.options.selectedIndex].value].join('/');
};
HTML.prototype.refresh = function() {
return window.location.href = window.location.href;
};
@@ -567,11 +580,11 @@
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 document.cookie = "" + name + "=" + (escape(JSON.stringify(value))) + "; expires=" + (date.toUTCString()) + "; path=/;";
}
};
return HTML;
@@ -859,10 +872,15 @@
})(Teabag.Reporters.BaseView);
}).call(this);
(function() {
+
+ Teabag.Reporters.HTML.template = "<div id=\"teabag-interface\">\n <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\" title=\"Toggle using try/catch wrappers when possible\">Try/Catch</button>\n <button id=\"teabag-build-full-report\" title=\"Toggle building the full report\">Full Report</button>\n <button id=\"teabag-display-progress\" title=\"Toggle displaying progress as tests run\">Progress</button>\n </div>\n <div id=\"teabag-suites\"></div>\n </div>\n\n <hr/>\n\n <div id=\"teabag-filter\">\n <h1>Filtering</h1>\n <ul id=\"teabag-filter-list\"></ul>\n </div>\n\n <div id=\"teabag-report\">\n <ol id=\"teabag-report-failures\"></ol>\n <ol id=\"teabag-report-all\"></ol>\n </div>\n</div>";
+
+}).call(this);
+(function() {
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Teabag.Reporters.Console = (function() {
function Console() {
@@ -974,6 +992,6 @@
return Console;
})();
}).call(this);
-; FI"required_assets_digest; F"%fb936ff8179033a29538d205fac91b64I"
_version; F"%6776f581a4329e299531e1d52aa59832
+; FI"required_assets_digest; F"%71a60ab6dd25527e06b138cd4be1e8a6I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file