spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.5.1 vs spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 in teabag-0.5.2
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357882151.109913:@value"!X{I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357971343.144897:@value"Z{I"
class:EFI"BundledAsset; FI"logical_path; FI"teabag/mocha.js; FI"
pathname; FI"P/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/mocha.coffee; FI"content_type; FI"application/javascript; FI"
-mtime; FI"2013-01-08T23:34:44-07:00; FI"length; FiOVI"digest; F"%0e83d50b079348bd097203c53240eb45I"source; FI"OV;(function(){
+mtime; FI"2013-01-11T23:15:01-07:00; FI"length; FiEXI"digest; F"%9fdd07e5bc8e36bddfe6ccf6af2560a1I"source; FI"EX;(function(){
// CommonJS require()
function require(p){
@@ -5076,11 +5076,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;
@@ -5395,34 +5395,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) {
@@ -5430,20 +5433,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", "...");
}
@@ -5533,16 +5543,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")) {
@@ -5561,11 +5574,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;
};
@@ -5580,11 +5593,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;
@@ -5872,10 +5885,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() {
@@ -6030,11 +6048,10 @@
__extends(HTML, _super);
function HTML(runner) {
this.reportSpecResults = __bind(this.reportSpecResults, this);
HTML.__super__.constructor.apply(this, arguments);
- this.setFilter(Teabag.Reporters.HTML.filter);
this.reportRunnerStarting(runner);
runner.on("fail", this.reportSpecResults);
runner.on("test end", this.reportSpecResults);
runner.on("end", this.reportRunnerResults);
}
@@ -6092,11 +6109,10 @@
}
Runner.prototype.setup = function() {
var reporter;
reporter = this.getReporter();
- reporter.filter = this.params["grep"];
return env.setup({
reporter: reporter
});
};
@@ -6214,6 +6230,6 @@
})(Teabag.fixture);
env = mocha.setup("bdd");
}).call(this);
-; TI"required_assets_digest; F"%3b1580e86f17387876618958cd37bed4I"
_version; F"%6776f581a4329e299531e1d52aa59832
+; TI"required_assets_digest; F"%6c6b35b8a015013e28d04926dd12c9a0I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file