o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1358449150.616778: @value"d{I" class:EFI"BundledAsset;FI"logical_path;FI"0teabag/base/reporters/html/progress_view.js;FI" pathname;FI"l/Users/jejacks0n/Projects/teabag/app/assets/javascripts/teabag/base/reporters/html/progress_view.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-01T20:19:07-07:00;FI" length;Fi\I" digest;F"%5a7ff651c6f0b465c36abe82b1fa0b4cI" source;FI"\(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 new 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 = "0%\n"; }; 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 = "\n0%"; }; 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); ;FI"required_assets_digest;F"%fa6d51e77ffdaaa56dd8eb3c207f8e91I" _version;F"%ffd318ca8b794f42f5029101c2cf5d91